From 7f700910e4e885623cf170a04de4c7b20a169988 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sat, 1 Jul 2006 02:43:37 +0000 Subject: 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 --- src/classes/com/sun/opengl/util/GLUT.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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(); } -- cgit v1.2.3