• Advertisement
Sign in to follow this  

relation between OGL and DX matrix

This topic is 4004 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OGL arranges matrix in column major order... and DX arranges in row major oder. However, the mathematical relation between DX and OGL matrices is that one is the transpose of the other. But due the different memory represention, i guess a simply memcpy actually does the transpose right.. so i am guessing float m[4][4]; which works fine for OGL should also work find for the following D3DXMATRIX16 matdx; memcpy(matdx.m, m, sizeof(m)); please correct me if am wrong.

Share this post


Link to post
Share on other sites
Advertisement
Why not try it and see? I would have thought that a memcpy() wouldn't work though.

Share this post


Link to post
Share on other sites
OpenGL does not order matrices.
Read this.

"Column-major versus row-major is purely a notational convention. Note that post-multiplying with column-major matrices produces the same result as pre-multiplying with row-major matrices. The OpenGL Specification and the OpenGL Reference Manual both use column-major notation. You can use any notation, as long as it's clearly stated."

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement