summaryrefslogtreecommitdiffstats
path: root/src/demos/readbuffer/ReadBuffer2Screen.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-05-07 05:51:31 +0200
committerSven Gothel <[email protected]>2023-05-07 05:51:31 +0200
commit473197df152f000211945d1e1c8e780eddda4cc7 (patch)
tree82be696b9f1e41bf6cc7037a5d03fb8876add2bb /src/demos/readbuffer/ReadBuffer2Screen.java
parent42ebc710aac9d4bce185ac3759ff07c6028bfcac (diff)
Fix PMVMatrix changes and minor cleanup
Diffstat (limited to 'src/demos/readbuffer/ReadBuffer2Screen.java')
-rwxr-xr-xsrc/demos/readbuffer/ReadBuffer2Screen.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/demos/readbuffer/ReadBuffer2Screen.java b/src/demos/readbuffer/ReadBuffer2Screen.java
index bb6200f..f1530ab 100755
--- a/src/demos/readbuffer/ReadBuffer2Screen.java
+++ b/src/demos/readbuffer/ReadBuffer2Screen.java
@@ -96,6 +96,7 @@ public class ReadBuffer2Screen extends ReadBufferBase {
((GLLightingFunc)gl).glShadeModel(GLLightingFunc.GL_SMOOTH);
}
+ final float[] f16 = new float[16];
GLMatrixFunc glM;
if(gl instanceof GLMatrixFunc) {
glM = (GLMatrixFunc)gl;
@@ -109,7 +110,7 @@ public class ReadBuffer2Screen extends ReadBufferBase {
pmvMatrix.glTranslatef(0, 0, -2.5f);
if(null!=glM) {
glM.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
- glM.glLoadMatrixf(pmvMatrix.glGetMvMatrixf());
+ glM.glLoadMatrixf(pmvMatrix.getMvMat().get(f16), 0);
}
// Set location in front of camera
@@ -118,7 +119,7 @@ public class ReadBuffer2Screen extends ReadBufferBase {
pmvMatrix.gluPerspective(45.0f, (float)width / (float)height, 1.0f, 100.0f);
if(null!=glM) {
glM.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
- glM.glLoadMatrixf(pmvMatrix.glGetPMatrixf());
+ glM.glLoadMatrixf(pmvMatrix.getPMat().get(f16), 0);
}
}