-
convert window coordinates to OpenGL coordinates
How can I do to convert my coordinates I get from the mouse into the coordinates used in my OpenGL window...
I want to add objects to another object at the point I define with a mouse click, but in an environment where one can rotate the object where I add my second object.
It works fine to convert the coordinates if I donīt rotate the first object, but if I rotate, everything goes wrong (naturaly)
Thanks in advance!!
/grodslukaren
-
Re: convert window coordinates to OpenGL coordinates
Read up on gluUnproject. It is expressly for the purpose of converting window coordinates to object coordinates.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules