OpenGL Mathematics (GLM) Library

OpenGL Mathematics (GLM) is a library of mathematics primitives and functions that can be useful in OpenGL, shader, CUDA and other graphics related code. Everyone ends up writing their own version of this code, often with errors and waste of time. GLM could be a good choice in such cases. Note that GLM is not as featured or complex as Eigen.

Briefly, here are the types and operations you can get in GLM:

  • vec3, vec4
  • mat3, mat4
  • Vector operations like normalize, bit swizzling
  • Matrix operations
  • Use of matrices for projection and lighting operations

Installing GLM library is easy:

$ sudo apt install libglm-dev

GLM is a template header library. So, no library file needs to be specified for the linking stage of compilation.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.