1UNTITLED LOCAL UNTITLED
2
4 glutDeviceGet — Allows you to get some device state/option variables.
5
7 OpenGLUT - inputstate
8
10 #include <openglut.h>
11
12 int
13 glutDeviceGet(GLenum eWhat);
14
16 eWhat Enumerated parameter ID.
17
19 Retrieves some system-specific information about attached devices. Sup‐
20 ported device queries are:
21
22 - GLUT_HAS_JOYSTICK
23 Return non-zero if there is a joystick.
24
25 - GLUT_HAS_KEYBOARD
26 Return non-zero if there is a keyboard.
27
28 - GLUT_HAS_MOUSE
29 Return non-zero if there is a mouse.
30
31 - GLUT_HAS_SPACEBALL
32 Return non-zero if there is a spaceball.
33
34 - GLUT_JOYSTICK_AXES
35 Return the number of axes for the joystick.
36
37 - GLUT_JOYSTICK_POLL_RATE
38 Return the rate (in GLUT timer ticks?) at which the joystick is polled.
39
40 - GLUT_NUM_MOUSE_BUTTONS
41 Return the number of buttons that the user's mouse has.
42
43 - GLUT_OWNS_JOYSTICK
44 Return non-zero if OpenGLUT believes that it has successfully acquired
45 access to the joystick.
46
47 - GLUT_DEVICE_IGNORE_KEY_REPEAT
48 Return non-zero if the current window is set to disable key repeating.
49
50 - GLUT_DEVICE_KEY_REPEAT
51 Described as returning the key repeat rate in one place, but actually
52 returns a key repeat mode.
53
54 - GLUT_HAS_DIAL_AND_BUTTON_BOX
55 Return non-zero if a dials-and-buttons box is present.
56
57 - GLUT_HAS_TABLET
58 Return non-zero if a tablet is present.
59
60 - GLUT_NUM_BUTTON_BOX_BUTTONS
61 Return the number of buttons on a dials-and-buttons box, if any.
62
63 - GLUT_NUM_DIALS
64 Return the number of dials on a dials-and-buttons box, if any.
65
66 - GLUT_NUM_SPACEBALL_BUTTONS
67 Return the number of buttons on a spaceball, if any.
68
69 - GLUT_NUM_TABLET_BUTTONS
70 Return the number of buttons on a tablet, if any.
71
73 Only supports querying for one joystick.
74
75 Consider moving to a table-based approach rather than a switch(), letting
76 us move to modular functions.
77
79 Keyboards are optional, but OpenGLUT doesn't detect their absence.
80
81 Mice are optional, but OpenGLUT is only able to check for them under
82 WIN32.
83
84 Mice can have a varying number of buttons, but OpenGLUT assumes exactly 3
85 on UNIX_X11.
86
87 Not all joystick queries are implemented yet.
88
89 GLUT_DEVICE_KEY_REPEAT returns the key repeat mode, but the comment
90 says it returns the rate .
91
92 Some things, like joystick poll rates, seem to have insufficient context.
93 Which joystick? Which window? Maybe we assume the current window and
94 the current joystick (or the first one)?
95
96 GLUT_DEVICE_KEY_REPEAT should probably return ogState.KeyRepeat.
97
99 glutSetOption(3) glutGet(3) glutGetModifiers(3) glutLayerGet(3)
100
101
102
103
104 Epoch