Advertisement Jump to content


This topic is now archived and is closed to further replies.


inside glUnproject

This topic is 5347 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

hi there! i was wondering if anyone can explain wats inside the function, basically i know wat it does, and there is an inverse of the modelview projection matrix being calculated inside, but i cannot seem to understand how it does the actual full calculation with respect to the near plane distance and the current camera viewpoint. eg: given that the inverse MVproj matrix is 1.333 0 0 0 0 1 0 0 0 0 0 -500 0 0 -1 500 the near plane distance is 0.001f and the camera eye is (0,0,10) and the topleft NDC is (-1,1,-1) the glUnproject gave a result of (-0.00133, -0.001, 9.999). currently i could only guess that the inverse modelview projection matrix did something to the normalized device coordinates... i serach the forum and someone posted screen coord * NDC * inverse proj * inverse camera I tried but doesnt seem to work hope someone can sheld some light here... thx! Edwinz EDIT: nvm i go find mesa's source [edited by - edwinnie on May 28, 2004 11:44:03 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!