summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java')
-rw-r--r--src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java b/src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java
index 6c8d7d2..3dfad8f 100644
--- a/src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java
+++ b/src/net/java/joglutils/msg/elements/GLProjectionMatrixElement.java
@@ -69,7 +69,13 @@ public class GLProjectionMatrixElement extends ProjectionMatrixElement {
super.setElt(matrix);
GL gl = GLU.getCurrentGL();
gl.glMatrixMode(GL.GL_PROJECTION);
- gl.glLoadTransposeMatrixf(matrix.getRowMajorData(), 0);
+ if (gl.isExtensionAvailable("GL_VERSION_1_3")) {
+ gl.glLoadTransposeMatrixf(matrix.getRowMajorData(), 0);
+ } else {
+ float[] tmp = new float[16];
+ matrix.getColumnMajorData(tmp);
+ gl.glLoadMatrixf(tmp, 0);
+ }
gl.glMatrixMode(GL.GL_MODELVIEW);
}
}