programmerdude
programmerdude

Reputation: 21

glm::perspective function's near plane and far plane and aspect ratio

two questions but the first one is, in the learnopengl.com website, for the glm::perspective function, it tells me to input 0.1f for the near plane, and 100.0f for the far plane. Why do I supply positive numbers. Isn't OpenGL using a right handed coordinate system so the negative z axis is forward so shouldn't the near and far plane both be negative numbers (-0.1f and -100.0f)?

Second question is, what is the aspect ratio in the glm::perspection function for? Is it for sizing the near and far planes? Depending on how big the screen is, it's going to make the near and far planes the same ratio?

Upvotes: 2

Views: 427

Answers (0)

Related Questions