Jump to content
  • Advertisement
Sign in to follow this  
taytay

OpenGL vector-math library compatible with OpenGL

This topic is 2648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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;" smile.gif).

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!