Saturday, October 4, 2014

Ogre Matrix4 - A case of strange format


Personally to me, there is no reason to have different alignment of the matrix elements. The Ogre developers, because they want to use column-major notation, could have decided to use the bracket operator instead of using the C/C++ 2D array iteration.

Also, because of such strange alignment of the elements, the OpenGL rendering module of Ogre has to transpose Ogre matrices into 16-element float-arrays; And they do it with nested, double for-loop, no less -- That's inefficient!