Jump to content
  • Advertisement

OpenGL Perspective Projection Matrix

Recommended Posts

Posted (edited)

Below is the perspective projection matrix as defined in the article: http://www.songho.ca/opengl/gl_projectionmatrix.html

OpenGL Perspective Projection Matrix

I am trying to do a bit of matrix multiplication myself so that I can better understand the constituents of the final MVP matrix. 

My question is, if the perspective projection matrix is created via glm, like so:

glm::perspective(glm::radians(fov), aspect, near, far)

Then how can we know what the r, l, t, b values are in the matrix, being that in the glm function, those values aren't specifically defined...?


EDIT: (SOLVED) For future visitors of this topic, the perspective projection matrix defined at the top of this thread doesn't seem to be based on the glm function. If you are using glm, then you can better understand the projection matrix's constituents with this matrix:


Edited by calioranged

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!