GLM_GTC_type_ptr: Memory layout access
GTC Extensions (Stable)

Handles the interaction between pointers and vector, matrix types.

This extension defines an overloaded function, glm::value_ptr, which takes any of the core template types. It returns a pointer to the memory layout of the object. Matrix types store their values in column-major order.

This is useful for uploading data to matrices or copying data to buffer objects.

Example:

 #include <glm/glm.hpp>
 #include <glm/gtc/type_ptr.hpp>
 
 glm::vec3 aVector(3);
 glm::mat4 someMatrix(1.0);
 
 glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector));
 glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix));

<glm/gtc/type_ptr.hpp> need to be included to use these functionalities.