glRotatef

BlitzMax Forums/OpenGL Module/glRotatef

plash(Posted 2008) [#1]
Say I have a 64x64 image. I want to rotate that image to the right by 45.0 degrees (x?), and slant it backwards by 15.0 degrees (z?).

How does glRotatef work? (an example would be nice)
Should I use glPushMatrix and glPopMatrix to get back to the unrotated state?

EDIT:
I can rotate it to the right.. but how do I tilt it back? (z = x?)
How can I retain the original position of the tile?




kfprimm(Posted 2008) [#2]
I'm guessing,
glRotatef(15.0,1,0,0)



plash(Posted 2008) [#3]
Nope. I tried all combination's I could think of - including that..

Doesn't matter anymore, I got it working using standard max2d transformation variables.


ImaginaryHuman(Posted 2008) [#4]
I think it'd be like:

glMatrixMode GL_MODELVIEW
glRotatef(45,1,0,0)
glRotatef(15,0,1,0)

or something like that.