Jump to content
  • Advertisement
Sign in to follow this  
SpaceRanger

gluPickMatrix question

This topic is 4100 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
Advertisement
Sign in to follow this  

  • 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!