diff options
author | Kenneth Russel <[email protected]> | 2007-04-24 00:22:32 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-04-24 00:22:32 +0000 |
commit | 27326eaf71862d27d77d8579ea1989028646cdaa (patch) | |
tree | 048b086fe842f8b7d60c5aa060a6da03cdd09ae4 /src/net/java/joglutils/msg/nodes/TriangleSet.java | |
parent | c791ac0ce54c774d8e1aa74d683acd4a4350ed53 (diff) |
Provided fallback code paths if OpenGL 1.3 (glLoadTransposeMatrixf,
glMultTransposeMatrixf) is not available
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@68 83d24430-9974-4f80-8418-2cc3294053b9
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/TriangleSet.java')
-rw-r--r-- | src/net/java/joglutils/msg/nodes/TriangleSet.java | 8 |
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 |