From a0646456d33550aa0bdf1447d61b91bfbd0fa7a2 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sat, 6 Jan 2024 14:43:53 -0800 Subject: [PATCH] So binding a texture in a display list compile won't change it, but it'll capture the change..... (#146) * So binding a texture in a display list compile won't change it, but it'll capture the change..... --- .../angelica/glsm/GLStateManager.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/gtnewhorizons/angelica/glsm/GLStateManager.java b/src/main/java/com/gtnewhorizons/angelica/glsm/GLStateManager.java index ef95d1d81..218fb0bcb 100644 --- a/src/main/java/com/gtnewhorizons/angelica/glsm/GLStateManager.java +++ b/src/main/java/com/gtnewhorizons/angelica/glsm/GLStateManager.java @@ -443,21 +443,13 @@ public class GLStateManager { } public static void glBindTexture(int target, int texture) { - if(target != GL11.GL_TEXTURE_2D) { - // We're only supporting 2D textures for now + if(target != GL11.GL_TEXTURE_2D || glListMode == GL11.GL_COMPILE) { + // We're only supporting 2D textures for now, and display lists don't bind the texture during compile + // but when they're called. GL11.glBindTexture(target, texture); return; } - if(glListMode == GL11.GL_COMPILE ) { - if(AngelicaMod.lwjglDebug) { - // Binding a texture, while building a list, is not allowed and is a silent noop - final Throwable throwable = new Throwable(); - LOGGER.info("Naughty naughty, someone's making a texture binding in a display list!", throwable); - } - return; - } - final TextureBinding textureUnit = textures.getTextureUnitBindings(GLStateManager.activeTextureUnit.topInt()); if (GLStateManager.BYPASS_CACHE || textureUnit.getBinding() != texture || runningSplash) {