Sign in to follow this  

gluUnproject, idiot inside

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 Image Hosted by 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

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