diff --git a/src/main/java/com/github/hydos/ginger/Litecraft.java b/src/main/java/com/github/hydos/ginger/Litecraft.java index 8ff632a..66b5bf8 100644 --- a/src/main/java/com/github/hydos/ginger/Litecraft.java +++ b/src/main/java/com/github/hydos/ginger/Litecraft.java @@ -76,7 +76,8 @@ public class Litecraft extends Game{ for(BlockEntity b: chunk) { data.entities.add(b); } - + + Window.setIcon("/textures/grass.png"); FontType font = new FontType(Loader.loadFontAtlas("candara.png"), "candara.fnt"); diff --git a/src/main/java/com/github/hydos/ginger/engine/io/Window.java b/src/main/java/com/github/hydos/ginger/engine/io/Window.java index 5633351..107c3e3 100644 --- a/src/main/java/com/github/hydos/ginger/engine/io/Window.java +++ b/src/main/java/com/github/hydos/ginger/engine/io/Window.java @@ -180,6 +180,7 @@ public class Window { iconBuffer = GLFWImage.malloc(1); iconImage.set(icon.getWidth(), icon.getHeight(), icon.getImage()); iconBuffer.put(0, iconImage); + GLFW.glfwSetWindowIcon(window, iconBuffer); } public static void showIcon() { diff --git a/src/main/java/com/github/hydos/ginger/engine/render/texture/Image.java b/src/main/java/com/github/hydos/ginger/engine/render/texture/Image.java index c5fcd25..f203e6b 100644 --- a/src/main/java/com/github/hydos/ginger/engine/render/texture/Image.java +++ b/src/main/java/com/github/hydos/ginger/engine/render/texture/Image.java @@ -58,8 +58,6 @@ public class Image { IntBuffer h = stack.mallocInt(1); IntBuffer comp = stack.mallocInt(1); - // Use info to read image metadata without decoding the entire image. - // We don't need this for this demo, just testing the API. if (!stbi_info_from_memory(imageBuffer, w, h, comp)) { throw new RuntimeException("Failed to read image information: " + stbi_failure_reason()); }