I'm new to OpenGL. I'm using Java/JOGL.
I'm having difficulty with polygon faces. I want to be able to control which side is the front or back. I've been working through this documentation.
I thought this line of code, in my display()
method, would make all poly faces be drawn, but it had no effect:
gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GLU.GLU_LINE);
Using this, I am able to flip which sides get rendered:
gl.glFrontFace(GL.GL_CW);
but half my polys are facing one way, and half are facing the other, so only half of them are ever rendered.
I tried using gl.glNormal3f()
to set the normal, hoping that that would have something to do with which is the "front", but it had no effect.
What am I supposed to be doing here?
Thanks.