View Full Version : green beginner here

12-16-2005, 04:25 PM
I am as green as you can be in opengl programming. I ran into a problem using glrotate and gltranslate. At the time, those commands were affecting the entire screen - i was just trying to rotate an object - so I started using numbers programmatically to rotate objects. I now believe I could have used glrotate and gltranslate - but going back and redoing everything would be alot of work. Am I loosing alot of speed because I am not using glrotate and/or gltranslate???? Any help would be appreciated.

12-16-2005, 05:17 PM
You need backup the current modelview matrix before transforming a specific object, then restore the matrix after transform.

... // translate and rotate an object here
glPopMatrix();I don't get how you transformed objects without glRotate*() and glTranslate*(). Did you write your own version of rotate and translate functions?

12-16-2005, 09:19 PM
Thank you very much for the reply. Yes - since i started i have found that pushing and popping the matrix can help with the problem i was having. And yes I just used other formulas (found in other snipets of code) to rotate the vertex's as I read them from an array. So since I was(am) rotating each vertex as I read them i must be loosing some speed i would assume. well i guess it's back to the beginning to recode what i have so far.

And thanks again