• Advertisement
Sign in to follow this  

gluUnproject, idiot inside

This topic is 4115 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
end main loop

in drawing function, I've this stuff:

   get matrix
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
Sign in to follow this  

  • Advertisement