PDA

View Full Version : Controlling Rotations



jjoseph1981
03-15-2002, 10:09 PM
I have trouble in controlling only certain objects that I have drawn. For example, take a look at this pseudo-code:

glRotatef(rotateSquare)
glBegin(GL_QUADS)
Square vertices
glEnd

glBegin(GL_TRIANGLE_FAN)
glEnd

My triangle fan is also being rotated. Why is that? What can I do to restrict the rotation to only the square?

zed
03-15-2002, 10:32 PM
use glPushMatrix() + glPopMatrix() to enclose the various drawing stuffs check the red book for what they do