inside glUnproject

Started by
1 comment, last by edwinnie 19 years, 11 months ago
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]
Advertisement
This is what you''re looking for (Firebird tells me I need some math fonts to view it properly, don''t know about IE):

http://pyopengl.sourceforge.net/documentation/manual/gluUnProject.3G.html
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
HI THX fer replying!
aniwae, jus copied off mesa''s code...feelling abit guilty...

thx!
Edwinz

This topic is closed to new replies.

Advertisement