You can do this, and it is a tiny insy bit quicker than push/pop too,
but may be prone to small float errors if you do it lots.
a = 30.
x,y,z = 1., 0., 0.
# rotate to your place in the gl universe.
glRotatef(a, x,y,z)
something_rotated()
# rotate back
glRotatef(a,-x,-y,-z)
You can get the current matrix with glLoadMatrix(...) but not the
transformed coordinates. Well it is possible with shaders, with a bit
of effort.
Have fun!
http://www.holepit.com/
|