glutDeviceGet (3) Linux Manual Page
glutDeviceGet – Allows you to get some device state/option variables.
Library
OpenGLUT – inputstateSynopsis
In openglut.h Ft int Fn glutDeviceGet GLenum eWhatParameters
Bf EmDescription
Retrieves some system-specific information about attached devices. Supported device queries are:
Return non-zero if there is a joystick.
Return non-zero if there is a keyboard.
Return non-zero if there is a mouse.
Return non-zero if there is a spaceball.
Return the number of axes for the joystick.
Return the rate (in GLUT timer ticks?) at which the joystick is polled.
Return the number of buttons that the user’s mouse has.
Return non-zero if OpenGLUT believes that it has successfully acquired access to the joystick.
Return non-zero if the Bf Li
Described as returning the key repeat rate in one place, but actually returns a key repeat mode.
Return non-zero if a dials-and-buttons box is present.
Return non-zero if a tablet is present.
Return the number of buttons on a dials-and-buttons box, if any.
Return the number of dials on a dials-and-buttons box, if any.
Return the number of buttons on a spaceball, if any.
Return the number of buttons on a tablet, if any.
Todo
Only supports querying for one joystick.Consider moving to a table-based approach rather than a switch(), letting us move to modular functions.
Bugs
Keyboards are optional, but OpenGLUT doesn’t detect their absence.Mice are optional, but OpenGLUT is only able to check for them under WIN32.
Mice can have a varying number of buttons, but OpenGLUT assumes exactly 3 on UNIX_X11.
Not all joystick queries are implemented yet.
Bf Sy
Some things, like joystick poll rates, seem to have insufficient context. Which joystick? Which window? Maybe we assume the Bf Li
Bf Sy
