OGL.Matrix[x][y] || [y][x]?
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
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
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
Standard mathematical rotation is M[r][c], OpenGL uses M[c][r] c = column, r = row
---
www.crazycrackerz.org
---
www.crazycrackerz.org
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement