Glut Interaction
- Keyboard information
- glutGetModifiers() returns information about the meta keys
that were pressed.
- This is a bitmask
- GLUT_ACTIVE_SHIFT
- GLUT_ACTIVE_CTRL
- GLUT_ACTIVE_ALT
- glutSpecialFunc() returns information about special keyboard
keys.
- Too numerous to mention here, but
- GLUT_KEY_F1
- GLUT_KEY_F12
- GLUT_KEY_LEFT
- GLUT_KEY_HOME
- escape, backspace and delete generate ascii
- Mouse Interaction
- Like the keyboard function, we need to register a mouse interaction
function.
- glutMouseFunc
- This points to a function with the following parameters
- int button
- GLUT_LEFT_BUTTON
- GLUT_MIDDLE_BUTTON
- GLUT_RIGHT_BUTTON
- On a single button mouse system, only a GLUT_LEFT_BUTTON
is generated.
- int state
- int x
- int y
- glutMotionFunc
- parameters x, and y locations
- Returns when there is mouse motion in the window with the button down.
- glutPassiveMotionFunc
- As above but no button is pressed.
- There are calls to deal with a spaceball
- And to deal with a
tablet,
button box
, and a dial box.
- And some Example Code