I need to perform some operations with different openGL functions.
There for I have a cube initialized as glList. What I'm doing is some transformation with glu standard functions and I like to do exactly the same operations with matrix multiplication. But I got stuck with the rotation function. I want to rotate the cube around the x achsis e.g. 90°:
glRotatef(90.0, 1.0f, 0.0f, 0.0f);
should be replaced by:
GLdouble m[16] ={1.0, 0.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0,-1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0 };
glMultMatrixd(m);
I found this very usefull site but some how it's not doing exactly the same as the above function. Is there a generell principle how to transform the glRotatef() function to a gl transformation matrix?
UPDATE: sorry, I missed the important note a the beginning of the document that the matrices from the document needed to be transposed for use in openGL.