diff options
author | Sven Gothel <[email protected]> | 2023-05-07 05:51:31 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-07 05:51:31 +0200 |
commit | 473197df152f000211945d1e1c8e780eddda4cc7 (patch) | |
tree | 82be696b9f1e41bf6cc7037a5d03fb8876add2bb /src/demos/readbuffer/ReadBuffer2Screen.java | |
parent | 42ebc710aac9d4bce185ac3759ff07c6028bfcac (diff) |
Fix PMVMatrix changes and minor cleanup
Diffstat (limited to 'src/demos/readbuffer/ReadBuffer2Screen.java')
-rwxr-xr-x | src/demos/readbuffer/ReadBuffer2Screen.java | 5 |
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); } } |