Hi.. It's quiet long time since I use OpenGL what is most common GL math library?
I downloaded GLM.
Is this very common??
I'm 3D engine maker so I must use very common library
Thanks
Hi.. It's quiet long time since I use OpenGL what is most common GL math library?
I downloaded GLM.
Is this very common??
I'm 3D engine maker so I must use very common library
Thanks
Since there is no official math library for OpenGL like there is for DirectX, I expect that most people either roll their own (my choice) or find an API-agnostic vector math library.
D3D isn't directly tied to a specific math library either. Yes, there is D3DX, XnaMath.h and DirectXMath, which have all been designed by Microsoft to provide math code that works with D3D, but the actual D3D API doens't directly interact with any of them, so it's just as valid to use GLM with D3D, or DirectXMath with GL!
There is quite a lot of them - here is a list of few I've been working with:
One of the most common is probably glm http://glm.g-truc.net/
Another good one is Eigen (Probably most generic out of these) http://eigen.tuxfamily.org/index.php?title=Main_Page
Then there is Sony's vectormath (used in Bullet engine) http://bullet.svn.sourceforge.net/viewvc/bullet/trunk/Extras/vectormathlibrary/include/vectormath/
You might also look into http://sourceforge.net/projects/simdx86/ although it's under LGPL license.
Another open sourced (fully written in sse2 intrinsics) - https://github.com/LiraNuna/glsl-sse2/tree/master/source
GLM creates its types around the ones used in OpenGL (ie, mat4, vec3, column major order and so on). So its probably the most easy to set up for using directly with OpenGL.
GLM is the most common. I use GLM, its good library, haven't had any issues with it, and its just headers no .lib files, so very easy to use.