Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save donaldmunro/a2a0a061de498b9dc0ec10be309de2b7 to your computer and use it in GitHub Desktop.
Save donaldmunro/a2a0a061de498b9dc0ec10be309de2b7 to your computer and use it in GitHub Desktop.
Access/dereference glm::mat4 contents
#include <glm/gtc/type_ptr.hpp>
..
glm::mat4 m = glm::mat4(1.0f);
..
auto p = glm::value_ptr(m);
std::cout << sizeof(p) << std::endl;
glUniformMatrix4fv(shader_uniform_m, 1, GL_FALSE, p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment