I tried GML but didn't like it much. I used DirectX before and looking for a math library similiar to the one used in DirectX. For example I couldn't use vec3 in opengl calls as float* and it does not support some operator overloading capabilities as good as the DirectX library
Is there a better alternative?
vector-math library compatible with OpenGL
A quick glance at the GLM manual suggests that you use glm::value_ptr() to get a pointer to the data of the vector or the matrix.
Anyway, you can use pretty much any library. I use CML myself. Also, if you like the linear algebra library in DirectX, then I'm not aware of any problems using it with OpenGL either. It is, as far as I understand, a stand-alone library not directly tied to and dependent on the other libraries
Anyway, you can use pretty much any library. I use CML myself. Also, if you like the linear algebra library in DirectX, then I'm not aware of any problems using it with OpenGL either. It is, as far as I understand, a stand-alone library not directly tied to and dependent on the other libraries
Best c++ math library I've found is Eigen: http://eigen.tuxfamily.org/index.php?title=Main_Page
I've been using GLM for a while and have been very happy with it. It's not perfect, but it certainly beats writing the world's billionth version of matrix multiplication functions. (And as for getting a float pointer to a vec3, you can use simple C++: "vec3 v; float* p = &v.x;" ).
I agree that it's sometimes hard to know if GLM supports what you need or not. A GLM quick reference / cheat sheet would be very helpful for the library. On the other hand, I've found the author of the library be responsive in maintaining a library: I logged two defects and they were both fixed rather quickly.
For what it's worth, I've found GLM to be a pretty solid library once you spend enough time to know your way around it.
I agree that it's sometimes hard to know if GLM supports what you need or not. A GLM quick reference / cheat sheet would be very helpful for the library. On the other hand, I've found the author of the library be responsive in maintaining a library: I logged two defects and they were both fixed rather quickly.
For what it's worth, I've found GLM to be a pretty solid library once you spend enough time to know your way around it.
I couldnt find a math lib that I was comfortable with, so I developed one with the help of some guys from this forum. It is fully designed for opengl and is easy to use. You can find it at libmymath.sf.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement