Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- camera.rotation = glm::normalize(glm::angleAxis(1.0f/75.0f, vec3{1.0f,0.0f, 0.0f}) * camera.rotation);
- vec3 target = camera.rotation * vec3{0.0f, 0.0f, -1.0f};
- mat4 camera_mat = glm::lookAt(camera.position, target, vec3{ 0.0f, 1.0f, 0.0f });
- glUniformMatrix4fv(glGetUniformLocation(plain, "camera"), 1, GL_FALSE, glm::value_ptr(camera_mat));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement