recently i have been programming a simple program on C++ and GLUT and i wanted to use the scroll wheel for some rotation speed increase/decrease. I have found out that scroll wheel generates 3/4 callback ( 3 for scroll up 4 for scroll down ). My problem is that on windows i get no callback at all! left right and middle mouse click generate 0,1 and 2 but scroll wheel nothing. ( I work on Visual Studio 2015 and Windows 10) On my Ubuntu system with the same libraries scroll wheel generates the callbacks just fine but on windows nothing. here is the code that i use on glutMouseFunc()
void setRotationSpeed(int button, int dir, int x, int y)
{
printf("button is %d\n", button);
if (button == 3)
{
rotationSpeed += 0.1;
}
if (button == 4)
{
if (rotationSpeed > 0.0)
rotationSpeed -= 0.1;
}
}
I have searched without any luck. At first i thought that maybe the libraries i use had problem but then i took the ones that i used on Ubuntu and i had the same problem so if anyone has something to suggest i would be very gratefull!