OpenGL Keyboard AND Mouse input?

Started by
1 comment, last by CrazyCdn 16 years, 9 months ago
I'm trying to select multiple units at once, using the Shift key. In my Selection function (used in glutMouseFunc), is there a way to see if the Shift key is being pressed down? Or do you just have to have a boolean that keeps track of it being up or down? Jeff
Advertisement
If your implementation of GLUT has glutGetModifiers, you can use it.

Otherwise, you're stuck with flags.

I think glutGetModifiers only works when you have a keyboard event already, so you'll probably have to store a flag anyway.
Just from my understanding GLUT is a dead library, no one is maintaining it. I do believe it's been replaced by GLFW.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

This topic is closed to new replies.

Advertisement