How to convert glRotatef() to multiplication matrice for glMultMatrixd() <p>I need to perform some operations with different openGL functions.</p> <p>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°:</p> <pre><code>glRotatef(90.0, 1.0f, 0.0f, 0.0f); </code></pre> <p>should be replaced by:</p> <pre><code>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); </code></pre> <p>I found <a href="http://www.cs.princeton.edu/~gewang/projects/darth/stuff/quat_faq.html#Q28" rel="nofollow">this very usefull site</a> <strike>but some how it's not doing exactly the same as the above function</strike>. Is there a generell principle how to transform the glRotatef() function to a gl transformation matrix?</p> <p>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. </p>