How to rotate an object around the cener of the screen

Started by
1 comment, last by theone 22 years, 12 months ago
Hi, i''m developing a 3d model viewer. the problem is if I pan the object left or right, the rotation axis also shifts left and right while i want the world to always rotate around the center of the screen Can anyone help me ???
Advertisement
I think you have to call the function "glLoadIdentity();" before you draw your world, so that the axis are resetted....

SnAkE''s Programming Resources
Oh, an other possibility is to use te glPushMatrix() and glPopMatrix() commands, before, and after you draw you models, so that your translations for the world are restored after your modelcode...

SnAkE''s Programming Resources

This topic is closed to new replies.

Advertisement