Getting mouse coordinates
I want to be able to select objects using the mouse and opengl. I know there is a way with i think glaux. I want to know if there is another way (that is easy?)? Does anyone know? Please Help! thank you!
One way is to use the GetCursorPos() to get the mouse coordinates, and adding some more code to your LRESULT CALLBACK WindowProc() that would handle events such as WM_LBUTTONDOWN (if you need that kind of control).
HTH
HTH
How who i turn my screen coordinate into 3d space to select stuff like polygons?
what is gluunproject() ?
umm.. okay i added this after the fact. I looked up gluUnProject() on MSDN. I tell me what to supply but not how to use it. Does anyone know how?
[edited by - someperson on February 7, 2004 11:03:45 AM]
what is gluunproject() ?
umm.. okay i added this after the fact. I looked up gluUnProject() on MSDN. I tell me what to supply but not how to use it. Does anyone know how?
[edited by - someperson on February 7, 2004 11:03:45 AM]
If you want to select objects with your mouse, it would probably be better to use picking. NeHe has a tutorial on picking and object selection, and so does GameTutorials. Check them out!
[edited by - JonahB on February 7, 2004 7:04:12 PM]
[edited by - JonahB on February 7, 2004 7:04:12 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement