Created
February 23, 2015 04:30
-
-
Save humbletim/24f5ce7029b29aa096bd to your computer and use it in GitHub Desktop.
GLM Example - C++11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define GLM_FORCE_RADIANS 1 | |
#include <glm/glm.hpp> | |
#include <glm/ext.hpp> | |
static auto mrot = glm::angleAxis(glm::radians(45.0f), glm::vec3(0,1,0)); | |
auto m1 = glm::mat4(1.0f); | |
auto m2 = glm::mat4(2.0f); | |
int main() { | |
auto m3 = m1 * m2; | |
m3 *= glm::toMat4(mrot); | |
printf("%s\n", glm::to_string(m3).c_str()); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment