Gitea Testing
This commit is contained in:
parent
480615de7a
commit
23859f9017
|
@ -3,6 +3,7 @@ package speiger.src.coreengine.rendering.textures.base;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import speiger.src.coreengine.rendering.utils.GLStateTracker;
|
import speiger.src.coreengine.rendering.utils.GLStateTracker;
|
||||||
|
import speiger.src.coreengine.rendering.utils.values.textures.GLTextureFormat;
|
||||||
|
|
||||||
public abstract class BaseTexture implements ITexture {
|
public abstract class BaseTexture implements ITexture {
|
||||||
protected int id;
|
protected int id;
|
||||||
|
@ -16,6 +17,10 @@ public abstract class BaseTexture implements ITexture {
|
||||||
track();
|
track();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int textureType() {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
protected void track() {
|
protected void track() {
|
||||||
GLStateTracker.TEXTURE_TRACKER.registerTexture(this);
|
GLStateTracker.TEXTURE_TRACKER.registerTexture(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,23 @@
|
||||||
package speiger.src.coreengine.rendering.textures.simple;
|
package speiger.src.coreengine.rendering.textures.simple;
|
||||||
|
|
||||||
import org.lwjgl.stb.STBImage;
|
import org.lwjgl.stb.STBImage;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
|
||||||
|
|
||||||
import speiger.src.coreengine.rendering.textures.base.BaseTexture;
|
import speiger.src.coreengine.rendering.textures.base.BaseTexture;
|
||||||
|
import speiger.src.coreengine.rendering.textures.base.TextureMetadata;
|
||||||
|
|
||||||
public class SimpleTexture extends BaseTexture {
|
public class SimpleTexture extends BaseTexture {
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
long imageData;
|
long imageData;
|
||||||
|
TextureMetadata metadata;
|
||||||
|
|
||||||
|
public SimpleTexture(int width, int height, long imageData, TextureMetadata metadata) {
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
this.imageData = imageData;
|
||||||
|
this.metadata = metadata;
|
||||||
|
loadTexture();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reload() {
|
public void reload() {
|
||||||
|
|
Loading…
Reference in New Issue