View Full Version : problems with text while rotating cube
11-21-2003, 08:54 AM
I am rotating a cube by clicking in either the first, second, third or fourth quadrant. Each one rotates about a different axis, and the last pauses the rotation. My problem is, I want to put text in the corners of the window in all quadrants displaying what clicking in that quadrant will do, but the text is rotating with the cube and I cant figure out how to make it stay put. Thanks in advance
11-21-2003, 10:02 AM
You should be able to use glPushMatrix and glPopMatrix for this. Something like:
glRotate( angle, 1, 0, 0 );
glTranslate( x, y, z );
glPopMatrix() loads an identity matrix onto the stack, and then all you transformations after than start from there. When you use glPopMatrix() it replaces the original matrix back onto the stack.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.