Jump to content
  • Advertisement
Sign in to follow this  
geo2004

gluPickMatrix - need help

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

I'm trying to implement a sweep selection for an RTS using OpenGL. I have one question about gluPickMatrix. On the OGL site, it says: PARAMETERS x, y Specify the center of a picking region in window coordinates. delX, delY Specify the width and height, respectively, of the picking region in window coordinates. If x and y is the center, does it select a region delX to the right, and delX to the left? Or is it delX wide, and x is located at delX/2. Jeff

Share this post


Link to post
Share on other sites
Advertisement
After much time debugging and trial and error, I figured it out. The x and y coordinates are the middle of the matrix, and the matrix ix delX wide, and delY tall.

My problem was in selecting the y from the viewport. But its all good now.

Jeff

Share this post


Link to post
Share on other sites
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!