Jump to content
  • Advertisement
Sign in to follow this  
browny

relation between OGL and DX matrix

This topic is 4129 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
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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!