Reduce stuttering on Nvidia - Track the model view and projection matrix (#56)

* Track the model view and projection matrix
* Cache ViewportState as well
* Add mixin to speedup Jabba's saveBoundTexture
This commit is contained in:
Jason Mitchell authored and GitHub committed 2023-12-25 20:16:43 -08:00
1 parent c8e6a6f34f
commit 7e24f6a395
12 files changed
+350 -21

No files matched your search

@@ -243,8 +243,7 @@ public class IrisRenderSystem {
public static void setupProjectionMatrix(Matrix4f matrix) {
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glPushMatrix();
PROJECTION_MATRIX_BUFFER.clear().rewind();
matrix.get(PROJECTION_MATRIX_BUFFER);
matrix.get(0, PROJECTION_MATRIX_BUFFER);
GL11.glLoadMatrix(PROJECTION_MATRIX_BUFFER);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
}