Skip to content

Instantly share code, notes, and snippets.

@AlexanderSavochkin
Created August 23, 2016 05:52
Show Gist options
  • Save AlexanderSavochkin/1300eabeb4fbfb0507e6f5b04e7d8cb2 to your computer and use it in GitHub Desktop.
Save AlexanderSavochkin/1300eabeb4fbfb0507e6f5b04e7d8cb2 to your computer and use it in GitHub Desktop.
Model and MVP matrices for static cube (from OpenGL tutorial)
// Model matrix : an identity matrix (model will be at the origin)
glm::mat4 Model = glm::mat4(1.0f);
// Our ModelViewProjection : multiplication of our 3 matrices
glm::mat4 MVP = Projection * View * Model; // Remember, matrix multiplication is the other way around
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment