summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/nodes/TriangleSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/TriangleSet.java')
-rw-r--r--src/net/java/joglutils/msg/nodes/TriangleSet.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/nodes/TriangleSet.java b/src/net/java/joglutils/msg/nodes/TriangleSet.java
index d7c55bb..ffa0ea3 100644
--- a/src/net/java/joglutils/msg/nodes/TriangleSet.java
+++ b/src/net/java/joglutils/msg/nodes/TriangleSet.java
@@ -92,7 +92,13 @@ public class TriangleSet extends TriangleBasedShape {
// portion of the texture image
gl.glMatrixMode(GL.GL_TEXTURE);
gl.glPushMatrix();
- gl.glLoadTransposeMatrixf(getTextureMatrix(tex).getRowMajorData(), 0);
+ if (gl.isExtensionAvailable("GL_VERSION_1_3")) {
+ gl.glLoadTransposeMatrixf(getTextureMatrix(tex).getRowMajorData(), 0);
+ } else {
+ float[] tmp = new float[16];
+ getTextureMatrix(tex).getColumnMajorData(tmp);
+ gl.glLoadMatrixf(tmp, 0);
+ }
gl.glMatrixMode(GL.GL_MODELVIEW);
} else if (haveTexCoords) {
// Want to turn off the use of texture coordinates to avoid errors