Jump to content
  • Advertisement
Sign in to follow this  
clapton

OpenGL Internal matrix representation

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

Hello! I am reading "Essential Mathematics for Games & Interactive Applications" by Van Verth and Bishop, where authors say : 'And even in OpenGL, despite the fact that the documentation is written using column vectors, the internal representation premultiplies the vectors; that is, it expects row vectors as well.' Ok, I understand that matrices in OGL are stored in column major order to pretranspose a matrix in the storage representation. But still - in OpenGL one always combines transformations in the opposite order, so how is it possible, that 'internal representation premultiplies the vectors'? Definately, I must have misunderstood something. I would be thankful for making this one clear for me. :)

Share this post


Link to post
Share on other sites
Advertisement
The math is like this

M * v = result_vector

Then

P * result_vector = another_vector

I'm not clear on "premultiplies"
Also, the column major form is good for SSE operations.

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
Also, the column major form is good for SSE operations.


Not to mention the fact that we can do one memcpy as opposed to three to extract the translation from our matrix when we're in column major :)

Share this post


Link to post
Share on other sites
Thanks for your replies. I guess that there is a little mistake since 'premultiplies' is a bit misleading. I'll ask the question to the Author of the book (he is available on the forum).

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.

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!