Gitea Testing

This commit is contained in:
Speiger 2024-04-08 23:14:41 +02:00
parent 480615de7a
commit 23859f9017
2 changed files with 15 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package speiger.src.coreengine.rendering.textures.base;
import org.lwjgl.opengl.GL11;
import speiger.src.coreengine.rendering.utils.GLStateTracker;
import speiger.src.coreengine.rendering.utils.values.textures.GLTextureFormat;
public abstract class BaseTexture implements ITexture {
protected int id;
@ -16,6 +17,10 @@ public abstract class BaseTexture implements ITexture {
track();
}
protected int textureType() {
return -1;
}
protected void track() {
GLStateTracker.TEXTURE_TRACKER.registerTexture(this);
}

View File

@ -1,14 +1,23 @@
package speiger.src.coreengine.rendering.textures.simple;
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.TextureMetadata;
public class SimpleTexture extends BaseTexture {
int width;
int height;
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
public void reload() {