<<< Other Matrix functions | Index | glm::value_ptr example >>> |
glm::value_ptr takes any of the core template types. It returns a pointer to the memory layout of the object. For example, given
glm::mat4 m4( 1.0f ); // construct identity matrix
expressions
glm::value_ptr( m4 ) &m4[0][0]
are equivalent.
value_ptr() returns a direct pointer to the matrix data in column-major order, making it useful for uploading data to OpenGL.
<<< Other Matrix functions | Index | glm::value_ptr example >>> |