Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

billybob

OpenGL d3d matrixes compatible with openGL's?

This topic is 5815 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

i''m using a physics library that returns a thing supposedly compatible with opengl''s matrixes. can i just copy that into a dx matrix?

Share this post


Link to post
Share on other sites
Advertisement
AFAIK the **data structures** should be compatible, i.e. a GL 4x4 matrix should be compatible with a D3D 4x4 matrix.

However, the information stored may not be:

- It''s likely that the contents of the GL matrices will be *Right Handed* whereas D3D is usually *Left Handed* - Look in the D3D docs under "3-D Coordinate Systems" for more info and how to convert.

- There may also be a row major versus column major difference. If there is, simply transpose the matrix.

- Any GL perspective projection matrices are extremely likely to be different, due to (IIRC) slight differences in clip space between D3D and OpenGL. Though if you''re translating rigid body physics stuff, it''s highly unlikely you''d ever have any.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
quote:

There may also be a row major versus column major difference. If there is, simply transpose the matrix.



Yes this is true. I saw it in an article which I used for my degree project.

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!