Jump to content
  • Advertisement

Archived

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

GLUT and mouse

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

hi everybody How can i get mouse position WITHOUT buttons press using GLUT mouse function? If it''s not possible what microsoft''s windoze function can i use? this will be my first step in windoze programming so thanks for step by step explanation (or good link/tut) thanks for the replies!! lunasol.x

Share this post


Link to post
Share on other sites
Advertisement
ok, right now im wondering if you have made any windows programs ( started a project as win32 app ) yet. if so, then the way to get the mouse location when it moves is by trapping the WM_MOUSEMOVE message. the x position is in the LOWORD( lparam ) and the y position is in the HIWORD( lparam ). but if youre not at all familiar with windows programming then i dont know about the specifics of the GLUT mouse functions. if you are interested in learning about windows programming then i suggest purchasing a copy of charles petzold''s bestseller "Programming Windows 98". or im sure there are plenty of tutorials on the net about the windows basics. at any rate i hope this helps, and if not....read a book.

Share this post


Link to post
Share on other sites
ok i get it (i''ll search a little bit longer next time before posting...)
it''s :
void glutPassiveMotionFunc(void (*func)(int x, int y));
thanks Michael for your reply. I have never made any windows program because...i have no time to learn windoze programming! one day maybe?

lunasol

Share this post


Link to post
Share on other sites
hi
which header does i include in order to use getCursorPos()? i''ve searched on the net but didn''t get it
thanks
lunasol

Share this post


Link to post
Share on other sites
thanks PeaceKeeper3!!
i have to learn to read before anything else : i red getCursorPos() instead of GetCursorPos() hum...
lunasol

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!