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.....
This commit is contained in:
Jason Mitchell authored and GitHub committed 2024-01-06 22:43:53 +00:00
1 parent 7a783b9d45
commit a0646456d3
1 file changed
+3 -11
@@ -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) {