aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-07-01 02:43:37 +0000
committerKenneth Russel <[email protected]>2006-07-01 02:43:37 +0000
commit7f700910e4e885623cf170a04de4c7b20a169988 (patch)
tree742e12713782a3fa9610ccb1f53cdd04979bfb8f /src
parent785f2ee13aad9fe6b26e1428c26c951b7fb168c5 (diff)
Fixed problem with glutSolidTeapot() pointed out by user bahuman on
JOGL forum where if backward compatibility mode was turned off then it would affect the current matrix git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@829 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rw-r--r--src/classes/com/sun/opengl/util/GLUT.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/classes/com/sun/opengl/util/GLUT.java b/src/classes/com/sun/opengl/util/GLUT.java
index 07264b240..c81b31ccd 100644
--- a/src/classes/com/sun/opengl/util/GLUT.java
+++ b/src/classes/com/sun/opengl/util/GLUT.java
@@ -983,6 +983,7 @@ public class GLUT {
gl.glEnable(GL.GL_NORMALIZE);
gl.glEnable(GL.GL_MAP2_VERTEX_3);
gl.glEnable(GL.GL_MAP2_TEXTURE_COORD_2);
+ gl.glPushMatrix();
if (!backCompatible) {
// The time has come to have the teapot no longer be inside out
gl.glFrontFace(GL.GL_CW);
@@ -990,7 +991,6 @@ public class GLUT {
} else {
// We want the teapot in it's backward compatible position and
// orientation
- gl.glPushMatrix();
gl.glRotatef(270.0f, 1, 0, 0);
gl.glScalef((float)(0.5 * scale),
(float)(0.5 * scale),
@@ -1033,9 +1033,7 @@ public class GLUT {
evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
}
}
- if (backCompatible) {
- gl.glPopMatrix();
- }
+ gl.glPopMatrix();
gl.glPopAttrib();
}