• Advertisement

Archived

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

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

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