mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 12:52:19 +00:00
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:
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) {
|
||||
|
||||
Reference in new issue
Block a user