Jump to content
  • Advertisement

Archived

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

Esap1

OGL.Matrix[x][y] || [y][x]?

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

In OpenGL, does a Matrix get called as Matrix[X][Y], or is it the other way around? for example: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 If I wanted the 1, would I get it by Matrix[1][3], or by Matrix[3][1]? Thanks for the help, later

Share this post


Link to post
Share on other sites
Advertisement
OpenGL matricies are stored in column major order, so use matrix[col][row]. A OpenGL matrix for 16 values would look like this in memory.

0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15

Hope this helps.

Oops messed up.

Nate
http://nate.scuzzy.net


Edited by - Nate on June 25, 2000 11:58:46 PM

Share this post


Link to post
Share on other sites
Standard mathematical rotation is M[r][c], OpenGL uses M[c][r] c = column, r = row

---
www.crazycrackerz.org

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.

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

Sign me up!