glutMouseFunc Questions

I was curious if there is a way for opengl or glut to detect both the left and right button pressed at the same time? Also, I am curious if there is a way to detect the mouse wheel moving? I have done searches, and people seem to have accomplished this, but I can’t find any way to do it. And The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3 for glutMouseFunc doesn’t have any information about both mouse buttons or mouse wheel roll. Thanks for any help.

-Drew

Yeah, actually, I had the same question. Anyon eknow the answer? It’d be a big help.

The limited mouse and keyboard input is one drawbacks to GLUT. Something like SDL, would be the next step, with better mouse and keyboard input.

Originally posted by jleffelm:
[b]I was curious if there is a way for opengl or glut to detect both the left and right button pressed at the same time? Also, I am curious if there is a way to detect the mouse wheel moving? I have done searches, and people seem to have accomplished this, but I can’t find any way to do it. And The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3 for glutMouseFunc doesn’t have any information about both mouse buttons or mouse wheel roll. Thanks for any help.

-Drew

[/b]

For the two mouse button thing, just store a boolean for each mouse button. Set it to true when the button is pressed, and false when it’s released. If both booleans are true, you know that both are pressed. This is how you would have to do it even if you were using the Win32 API as there is no event like WM_BOTH_BUTTONS_PRESSED.

So far as the mouse wheel… not sure about that. Haven’t ever tried to use that in Glut before, sorry.