Sign in to follow this  

missing matrix_projection.hpp from glm

Recommended Posts

Hello Everyone,


Not sure if I am going crazy but I just downloaded the latest glm version, and I need to call: glm::perspective which I belive is in glm/gtc/the matrix_projection.hpp file in the glm library.


However, I can't find this file anywhere. Is this something new where we need to create the perspective matrix ourselves, or am I missing something embarassingly obvious.







Share this post

Link to post
Share on other sites

These are the 3 includes I used recently for a basic project that used perspective projection.


#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp>


and my code for the projection is...

P = glm::perspective(glm::radians(85.0f), 1.0f, 0.1f, 50.0f);

Edited by fleabay

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this