Sign in to follow this  

gluPickMatrix question

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

In all the Opengl pick routine I found online, they all use the following call: gluPickMatrix ((GLdouble) nX , (GLdouble) (viewport[3] - nY), (GLdouble) pickWidth, (GLdouble) pickHeight, viewport); I have used this call and have gotten opengl picking to work with 1 single viewport. I understand that the viewport[3] - nY is to convert window's Y position to glut's. But now, I have divided my window up into 4 viewports. (1/2 width, 1/2 height) The get viewport function returns the viewport of the last drawn viewport. glGetIntegerv (GL_VIEWPORT, viewport);//set the viewport However, when the bottom half of the screen is selected, viewport[3] - nY is a negative number. Does the gluPickMatrix function above have to be modified inorder to get opengl picking to work in multiple viewports?

Share this post


Link to post
Share on other sites

This topic is 3736 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.

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