Jump to content
  • Advertisement
Sign in to follow this  
_biobrain_

gluUnproject, idiot inside

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

Hello people, I've another problem with my app. Sorry I'm at work and I've no code, but I try to explain in better way. I'm trying to use gluUnproject (I've read the article on NeHe site) so I've my code like this:

main loop
   check MousePos
   Draw
end main loop



in drawing function, I've this stuff:

draw
   clear
   get matrix
   Draw
   write
end draw



Note that draw and write are pushin' and poppin' matrix... the check mouse are the same nehe code. Now, the problem: I don't know if I've to use glOrtho for gluUnproject, but I'm trying to draw a triangle with topper vertex following the cursor; but I've this problem: Image Hosted by ImageShack.us Image Hosted by ImageShack.us When the mouse pointer (red) are in the triangle area (blue) the vertex follow the pointer, but there's a triangle (yellow) that flip on it. If I move the mouse, the blue real triangle became idiot, and doesn't follow my pointer! bof, if someone could help...Tonight I'll post code and snapshot of app!!! Thanks

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!