Jump to content
  • Advertisement
Sign in to follow this  
too_many_stars

missing matrix_projection.hpp from glm

This topic is 670 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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.

 

Thanks,

 

Mike

 

 

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!