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.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/java/joglutils/msg/nodes/TriangleSet.java b/src/net/java/joglutils/msg/nodes/TriangleSet.java
index ffa0ea3..4659a19 100644
--- a/src/net/java/joglutils/msg/nodes/TriangleSet.java
+++ b/src/net/java/joglutils/msg/nodes/TriangleSet.java
@@ -73,7 +73,7 @@ public class TriangleSet extends TriangleBasedShape {
if (CoordinateElement.get(state) != null) {
// OK, we have coordinates to send down, at least
- GL gl = action.getGL();
+ GL2 gl = action.getGL();
Texture tex = null;
boolean haveTexCoords = false;
@@ -90,7 +90,7 @@ public class TriangleSet extends TriangleBasedShape {
if (tex != null) {
// Set up the texture matrix to uniformly map [0..1] to the used
// portion of the texture image
- gl.glMatrixMode(GL.GL_TEXTURE);
+ gl.glMatrixMode(GL2.GL_TEXTURE);
gl.glPushMatrix();
if (gl.isExtensionAvailable("GL_VERSION_1_3")) {
gl.glLoadTransposeMatrixf(getTextureMatrix(tex).getRowMajorData(), 0);
@@ -99,25 +99,25 @@ public class TriangleSet extends TriangleBasedShape {
getTextureMatrix(tex).getColumnMajorData(tmp);
gl.glLoadMatrixf(tmp, 0);
}
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
} else if (haveTexCoords) {
// Want to turn off the use of texture coordinates to avoid errors
// FIXME: not 100% sure whether we need to do this, but think we should
- gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY);
+ gl.glDisableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
}
// For now, assume the triangle set and the number of available
// coordinates match -- may want to add debugging information
// for this later
- gl.glDrawArrays(GL.GL_TRIANGLES, 0, 3 * getNumTriangles());
+ gl.glDrawArrays(GL2.GL_TRIANGLES, 0, 3 * getNumTriangles());
if (tex != null) {
- gl.glMatrixMode(GL.GL_TEXTURE);
+ gl.glMatrixMode(GL2.GL_TEXTURE);
gl.glPopMatrix();
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
} else if (haveTexCoords) {
// Might want this the next time we render a shape
- gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
+ gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
}
}
}