reverse vertex coordinates

BlitzMax Forums/BlitzMax Programming/reverse vertex coordinates

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

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 :)