Skip to content

Commit

Permalink
Fix up GlStateManager bindings too
Browse files Browse the repository at this point in the history
Co-Authored-By: IMS <[email protected]>
  • Loading branch information
Asek3 and IMS212 committed Nov 21, 2023
1 parent 0327654 commit c2a0cac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/net/coderbot/iris/gl/IrisRenderSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.nio.FloatBuffer;
import java.nio.IntBuffer;

import net.coderbot.iris.mixin.GlStateManagerAccessor;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.opengl.ARBDirectStateAccess;
import org.lwjgl.opengl.EXTShaderImageLoadStore;
Expand Down Expand Up @@ -378,6 +379,9 @@ public void bindTextureToUnit(int unit, int texture) {
super.bindTextureToUnit(unit, texture);
} else {
ARBDirectStateAccess.glBindTextureUnit(unit, texture);

// Manually fix GLStateManager bindings...
GlStateManagerAccessor.getTEXTURES()[unit].binding = texture;
}
}

Expand Down

0 comments on commit c2a0cac

Please sign in to comment.