From: Ingo A. <iar...@ya...> - 2012-10-04 20:24:21
|
Hi! There are some shortcomings on the current implementation as it is in Vista with regards to the wheel handling. a) if you are using freeglut (which is most often default on Linux), you are fine off, but make sure that you compile the library using the USE_NATIVE_GLUT=0 preprocessor flag. Check your cmake cache file to see the value, os normally the cmake scripts make sure to detect whether you have freeglut or the 'only' the normal glut. b) depending on your version of glut (here is where the 'luck' part starts), it reports mouse wheels as mouse button events. Check if you can find GLUT_WHEEL_<UP|DOWN> flags in your glut(.h). If that is the case, the Vista implementation is plainly not working good, as it does dispatch only the first three buttons and waits for magics to happen to the scroll wheel state. (In a nutshell: current glut implementations show the wheel as additional button). Here is why you see 0 as a value: in case the mouse button callback gets called (which happens if you use glut and not freeglut and you use the wheel), the mouse driver records the current state of the mouse. The right file to look at for your case would be VistaDeviceDrivers/VistaGlutMouseDriver/VistaGlutMouseDriver.cpp, l. 92f). This includes the current state of the variables for the wheel and the wheel state. As they are only changed in the case of freeglut installed, the state variables do not get updated. Are you sure you see "(0,0)" only? And not "(-1,0)"? The code, as it is right now can crash, so its good you pointed that out. It needs to be fixed. It would be very good to know what version of glut you are using and where we can peek at the source. Thanks, hope it helps, Ingo. On 10/04/2012 02:36 PM, Dominik Rausch wrote: > What version of glut are you using? Standard glut does not support mouse > wheels, but freeglut does, so you’ll have to built Vista with freeglut. |