added loading texture from image

This commit is contained in:
DaniTheSkunk 2022-09-15 23:16:48 +02:00
parent 4a16dbfc9f
commit 4ab459d515
2 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,11 @@ public class GLWindow implements IWindow {
System.out.println(GL11.glGetInteger(GL_MAX_TEXTURE_SIZE));
}
@Override
public ITexture loadTexture(Image image) {
return textureAtlas.addTexture(image);
}
@Override
public ITexture loadTexture(String path) {
var img = engine.loadImage(path);

View File

@ -1,6 +1,7 @@
package com.danitheskunk.skunkworks;
public interface IWindow {
ITexture loadTexture(Image image);
ITexture loadTexture(String path);
void renderFinish(IRenderContext context);
IRenderContext renderStart();