mouse input question
Started by omegasyphon, Jul 02 2001 06:22 AM
20 replies to this topic
#4 Members - Reputation: 100
Posted 06 July 2001 - 02:48 AM
alright why doesnt this work? if i move the mouse shouldnt it move what i have displayed or am i doing this wrong?
|
#6 Members - Reputation: 122
Posted 06 July 2001 - 06:31 AM
omegasyphon, try adding
glutPostRedisplay();
in your processmouse inputs function. this tells the renderer that the function has made an update.
paulP,
yes there is a way without glut. you use regular Win32 code. the topic goes into the WinProc, which i don''t wanna discuss, but that is where you would put your mouse processing commands.
a2k
glutPostRedisplay();
in your processmouse inputs function. this tells the renderer that the function has made an update.
paulP,
yes there is a way without glut. you use regular Win32 code. the topic goes into the WinProc, which i don''t wanna discuss, but that is where you would put your mouse processing commands.
a2k
#9 Moderators - Reputation: 1315
Posted 07 July 2001 - 01:15 AM
To answer some of your questions: Yes you can get mouse input without using the GLUT... Its called DirectInput, and it kicks ass (writing a tutorial on mouse movement with DI, and DirectAudio as we speak actually).
------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
#12 Moderators - Reputation: 1315
Posted 07 July 2001 - 05:06 AM
Hmmm... Whenever I feel like writing the tut (I just wrote a 17 page one on .md2 loading and .ms3d loading that should be up on NeHe''s site pretty soon... So I''m a little burned out on writing). But the code *IS* done, so whenever I feel like writing, I''ll write it.
------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
#15 Members - Reputation: 122
Posted 07 July 2001 - 12:39 PM
I thought abut DirectInput, but i already know how to use that, i wanted to know if there was any other pratical ways to trap the mouse!!
As for the tut's, looking forward to them, i already know how to use DirectInput, but i always benefit from looking at tutorials, i get to see all the little tricks i missed first time round!!
Will they be based on C or C++??
Edited by - PaulP on July 7, 2001 7:40:58 PM
As for the tut's, looking forward to them, i already know how to use DirectInput, but i always benefit from looking at tutorials, i get to see all the little tricks i missed first time round!!
Will they be based on C or C++??
Edited by - PaulP on July 7, 2001 7:40:58 PM
#17 Staff Emeritus - Reputation: 1668
Posted 08 July 2001 - 04:08 PM
That''s because the SDK documents are fairly complete. There isn''t too much to mouse input in DI - or keyboard either. Joystick is just a little bit more involved. So, check your SDK docs - the answer lies within.
Or some fantasy-sounding junk like that...
Or some fantasy-sounding junk like that...
#19 Members - Reputation: 174
Posted 11 July 2001 - 12:02 PM
Don''t bother with DirectInput to grab the mouse, unless you need automatic buffering (which you could set up using less code than it takes to initialize DirectInput properly). Use GetCursorPos (and SetCursorPos to set the position) instead.






