glm rotate usage in Opengl
I am rendering a cone, and I would like to rotate it, 90 degrees anti-clockwise, so that the pointy end faces west! I am using OpenGL 3+. Here is my code in my Cone.cpp so far: //PROJECTION glm::mat4 Projection = glm::perspective(45.0f, 1.0f, 0.1f, 100.0f); //VIEW glm::mat4 View = glm::mat4(1.); View = glm::translate(View, glm::vec3(2.0f,4.0f, -25.0f)); //MODEL glm::mat4 Model = glm::mat4(1.0); //Scale by factor 0.5 Model = glm::scale(glm::mat4(1.0f),glm::vec3(0.5f)); glm::mat4 MVP = Projection * View * Model; glUniformMatrix4fv(glGetUniformLocation(shaderprogram_spaceship, "MVP_matrix"), 1,