Sign in to follow this  
jm_hewitt

gluProject usage

Recommended Posts

gluProject projects the given point with the two matrices and it returns the screen position in X,Y,Z. So, to then draw at that point, can the modelview and projection matrices be set to the identity matrix? I currently do that and disable depth tests to be safe and try to draw a quad around the projected point and I do not see the point. Any suggestions of what I am missing?

Share this post


Link to post
Share on other sites
gluProject also does the viewport transform, so the point returned can not be passed to OpenGL again, given identity matrices, to get the same point. If you pass the returned point to OpenGL, the point would, effectively, be transformed by the viewport transform twice before it is rasterized.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this