summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-05-07 06:52:02 +0000
committerKenneth Russel <[email protected]>2007-05-07 06:52:02 +0000
commit6e74d094e7486f5feb3da9e0dae5b1f6fb44e773 (patch)
treebff9d4f5284844c5012f0aabee6478ad8ac3599a
parent6f8981547ef2e9158f84e1fe81cdbd06b92470b6 (diff)
Added in more state disabling in GLRenderAction prologue for better
correctness, though this is not needed right now. Fixed bug in Vec4f.toString(). git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@71 83d24430-9974-4f80-8418-2cc3294053b9
-rw-r--r--src/net/java/joglutils/msg/actions/GLRenderAction.java4
-rw-r--r--src/net/java/joglutils/msg/math/Vec4f.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/actions/GLRenderAction.java b/src/net/java/joglutils/msg/actions/GLRenderAction.java
index b058e13..e17d97b 100644
--- a/src/net/java/joglutils/msg/actions/GLRenderAction.java
+++ b/src/net/java/joglutils/msg/actions/GLRenderAction.java
@@ -107,6 +107,7 @@ public class GLRenderAction extends Action {
// 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.glColor4f(1, 1, 1, 1);
gl.glMatrixMode(GL.GL_TEXTURE);
@@ -114,6 +115,9 @@ public class GLRenderAction extends Action {
gl.glMatrixMode(GL.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);
+ // 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);
diff --git a/src/net/java/joglutils/msg/math/Vec4f.java b/src/net/java/joglutils/msg/math/Vec4f.java
index 8b120e0..0a62382 100644
--- a/src/net/java/joglutils/msg/math/Vec4f.java
+++ b/src/net/java/joglutils/msg/math/Vec4f.java
@@ -209,6 +209,6 @@ public class Vec4f {
}
public String toString() {
- return "(" + x + ", " + y + ", " + z + ")";
+ return "(" + x + ", " + y + ", " + z + ", " + w + ")";
}
}