summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/actions/GLRenderAction.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-07-18 23:32:24 +0000
committerKenneth Russel <[email protected]>2009-07-18 23:32:24 +0000
commita33fade58b3cf22b72241767e6615042a5ed22c1 (patch)
tree0f9700cb59193afbf27fef9481b2a28c2d14938d /src/net/java/joglutils/msg/actions/GLRenderAction.java
parent190d2e62712a7de5ee8e9a7989157d06b34aedd9 (diff)
Updates to joglutils workspace to work with JOGL 2 APIs. Cleaned up
build process. Added targets for joglutils.jar and joglutils-demos.jar as well as javadoc. Deleted build directory from svn. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@103 83d24430-9974-4f80-8418-2cc3294053b9
Diffstat (limited to 'src/net/java/joglutils/msg/actions/GLRenderAction.java')
-rw-r--r--src/net/java/joglutils/msg/actions/GLRenderAction.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/net/java/joglutils/msg/actions/GLRenderAction.java b/src/net/java/joglutils/msg/actions/GLRenderAction.java
index e17d97b..b65c515 100644
--- a/src/net/java/joglutils/msg/actions/GLRenderAction.java
+++ b/src/net/java/joglutils/msg/actions/GLRenderAction.java
@@ -96,31 +96,31 @@ public class GLRenderAction extends Action {
private float curAspectRatio = 1.0f;
private int applyDepth = 0;
- private GL gl;
+ private GL2 gl;
public void apply(Node node) {
int depth = applyDepth++;
try {
if (depth == 0) {
- gl = GLU.getCurrentGL();
+ gl = GLU.getCurrentGL().getGL2();
// Applying to the root of the scene graph
// Push necessary GL state
// FIXME: add in additional bits as we add more capabilities
- gl.glPushAttrib(GL.GL_ENABLE_BIT | GL.GL_CURRENT_BIT | GL.GL_DEPTH_BUFFER_BIT | GL.GL_TRANSFORM_BIT);
- gl.glDisable(GL.GL_LIGHTING);
- gl.glEnable(GL.GL_DEPTH_TEST);
+ gl.glPushAttrib(GL2.GL_ENABLE_BIT | GL2.GL_CURRENT_BIT | GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_TRANSFORM_BIT);
+ gl.glDisable(GL2.GL_LIGHTING);
+ gl.glEnable(GL2.GL_DEPTH_TEST);
gl.glColor4f(1, 1, 1, 1);
- gl.glMatrixMode(GL.GL_TEXTURE);
+ gl.glMatrixMode(GL2.GL_TEXTURE);
gl.glLoadIdentity();
- gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glLoadIdentity();
- gl.glPushClientAttrib(GL.GL_CLIENT_VERTEX_ARRAY_BIT);
- gl.glDisableClientState(GL.GL_VERTEX_ARRAY);
- gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY);
+ gl.glPushClientAttrib(GL2.GL_CLIENT_VERTEX_ARRAY_BIT);
+ gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
+ gl.glDisableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
// FIXME: should add in disabling of normal array
// Figure out the aspect ratio of the current viewport
int[] viewport = new int[4];
- gl.glGetIntegerv(GL.GL_VIEWPORT, viewport, 0);
+ gl.glGetIntegerv(GL2.GL_VIEWPORT, viewport, 0);
curAspectRatio = (float) viewport[2] / (float) viewport[3];
}
apply(table, node);
@@ -135,7 +135,7 @@ public class GLRenderAction extends Action {
}
/** Returns the GL instance being used for rendering. */
- public GL getGL() {
+ public GL2 getGL() {
return gl;
}