My glutMouseFunc() doesn’t handle the mouse scrolling.
So in order to handle it Im forced to use some alternative way apart from Glut. I’ve read about it in msdn but I didn’t figure out where and how to get control over the received mouse event messages. Any idea?
Getting hold of mouse input has always been lacking in Windows. The by Microsoft recommended way to handle this is with DirectInput, but this is a terrible solution as it drags in a large number of dependencies and is outdated as well.
However I’ve found SDL to be a good alternative. I haven’t FreeGLUT or other more recent GLUT clones, but I suspect they also have more complete input support. The original GLUT is so old, scroll wheels didn’t even exist back then.
GLFW supports scroll wheel too.
Thanx for the answares guys, but I have another question. Do I need to synchronise the threads of callbacks of those functions?
glutMouseFunc( void (* callback)( int, int, int, int ) );
glutMotionFunc( void (* callback)( int, int ) );
glutDisplayFunc( void (* callback)( void ) );
Callback are not threads. Pretty much the opposite, in fact. So no, no need to synchronize anything (unless you add your own threads, but you should not).
Two callbacks called from two paralel distinct treads are still treads. If they are called one after another in the same tread then there’s no need for tread synchronisation. So are you sure that the synchronisation is not necessary?
All glut callbacks are called in the event proc from the same function. No synchronization is needed.
The single thread nature of glut is another reason to switch to another framework.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.