Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SomePerson

Getting mouse coordinates

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

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!

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!