reverse vertex coordinates

BlitzMax Forums/BlitzMax Programming/reverse vertex coordinates

Armitage 1982(Posted 2006) [#1]
I was having problems of coordinates when porting value from OPENGL to DIRECTX. Everythink is upside down.
I've reverse every coordinates and now it work, so this thread is useless but as i can't remove it maybe some of you could give some informations about those cartesian differences :)


Pantheon(Posted 2006) [#2]
Yeah this problem is because DirectX uses a different matrix layout then OpenGL. One Uses Rowmajor and one uses ColumbMajor. This defines wether the columbs store the X,Y,Z transform vectors or the Row. Unfortunately I forget which ones which.

in DirectX it is customary to define matrices as Matrix:float[4,4] where as OpenGL its Matrix:float[4*4]
This is were the difference in the memory layout arizes the OpenGL one will be the transpose of the DirectX one.

Check out these articles:

http://www.gamedev.net/reference/articles/article695.asp
This is a nice introduction with details of OpenGL matrix implementations.

http://www.gamedev.net/reference/articles/article1691.asp
A whoper article that can be seen as a reference on matrices and Quaternions. Covers both DX and OGL :)


Armitage 1982(Posted 2006) [#3]
thanks ;)