Hi,
I'm having problems with the color state.
The following code does not do what it's supposed to do:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| gl.glColor3f(0.5f, 0.5f, 0.5f); gl.glLineWidth(3.0f); gl.glBegin(GL.GL_LINES); gl.glVertex3f(-1.0f, 1.0f, 0.0f); gl.glVertex3f(0.0f, 1.0f, 0.0f); gl.glEnd(); gl.glPushAttrib(GL.GL_COLOR_BUFFER_BIT); gl.glColor3f(1.0f, 0.0f, 0.0f); gl.glBegin(GL.GL_LINES); gl.glVertex3f(-1.0f, 2.0f, 0.0f); gl.glVertex3f(0.0f, 2.0f, 0.0f); gl.glEnd(); gl.glPopAttrib(); gl.glBegin(GL.GL_LINES); gl.glVertex3f(-1.0f, 3.0f, 0.0f); gl.glVertex3f(0.0f, 3.0f, 0.0f); gl.glEnd(); |
so, the color state is not restored properly.
Any ideas what causes that?
Cheers,
Alex