GLUTDEVICEGET(3)
π glutDeviceGet β the manual page, but make it cute π
okay bestie, welcome to glutDeviceGet from the OpenGLUT manual (section 3, the inputstate corner of the library π«Ά). This is the girl who tells you what your devices are doing. Let's get into it β¨
π LIBRARY π
OpenGLUT β specifically the inputstate part of it. she lives there π
β¨ SYNOPSIS β¨
#include <openglut.h>
int
glutDeviceGet(GLenum eWhat);
like, one function, one arg, so simple, iconic behavior honestly π
π PARAMETERS π
eWhatβ the enumerated parameter ID. basically you're telling her which device question you want answered. pick your fighter π―
π DESCRIPTION π
So the vibe is: you call her, she goes and fetches system-specific info about the devices attached to your machine. She's nosy in the best way. Here are all the device queries she supports, no cap, all of them:
GLUT_HAS_JOYSTICKβ returns non-zero if there's a joystick. πΉοΈGLUT_HAS_KEYBOARDβ returns non-zero if there's a keyboard. β¨οΈGLUT_HAS_MOUSEβ returns non-zero if there's a mouse. πGLUT_HAS_SPACEBALLβ returns non-zero if there's a spaceball. πͺGLUT_JOYSTICK_AXESβ returns the number of axes the joystick has.GLUT_JOYSTICK_POLL_RATEβ returns the rate (in GLUT timer ticks?) at which the joystick is polled. yes bestie, the question mark is in the original, she's unsure too πGLUT_NUM_MOUSE_BUTTONSβ returns how many buttons the user's mouse has. click click click π±οΈGLUT_OWNS_JOYSTICKβ returns non-zero if OpenGLUT believes it has successfully acquired access to the joystick. manifesting that ownership fr fr β¨GLUT_DEVICE_IGNORE_KEY_REPEATβ returns non-zero if the current window is set to disable key repeating.GLUT_DEVICE_KEY_REPEATβ described as returning the key repeat rate in one place, but actually returns a key repeat mode. the way she lied a little πGLUT_HAS_DIAL_AND_BUTTON_BOXβ returns non-zero if a dials-and-buttons box is present.GLUT_HAS_TABLETβ returns non-zero if a tablet is present. βοΈGLUT_NUM_BUTTON_BOX_BUTTONSβ returns the number of buttons on a dials-and-buttons box, if any.GLUT_NUM_DIALSβ returns the number of dials on a dials-and-buttons box, if any.GLUT_NUM_SPACEBALL_BUTTONSβ returns the number of buttons on a spaceball, if any.GLUT_NUM_TABLET_BUTTONSβ returns the number of buttons on a tablet, if any.
πΈ TODO πΈ
stuff she knows she needs to work on, and honestly, growth π
- Only supports querying for one joystick. one. singular. monogamous joystick energy.
- Consider moving to a table-based approach rather than a
switch(), letting us move to modular functions. glow-up pending β¨
π BUGS π
okay girlies, sit down, this is the part where we're honest:
- Keyboards are optional, but OpenGLUT doesn't detect their absence. she just assumes. bold of her.
- 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. exactly three. no more, no less, apparently. π - Not all joystick queries are implemented yet. WIP, we love a WIP π§
GLUT_DEVICE_KEY_REPEATreturns the key repeat mode, but the comment says it returns the rate. the comment is lying bestie, iykyk π- Some things, like joystick poll rates, seem to have insufficient context. Which joystick? Which window? Maybe we assume the current window and the current joystick (or the first one)? she's asking the real questions π€
GLUT_DEVICE_KEY_REPEATshould probably returnogState.KeyRepeat. just saying. put it on the vision board π
π¦ SEE ALSO π¦
k bye bestie, that's the whole page π this one came out UNDATED and honestly the title field is just UNTITLED() β she's mysterious like that π go forth and query your devices, you ate π β¨
π¦ where this page comes from
- centos-stream 10: freeglut-devel 3.4.0-9.el10 Β· MIT
- centos-stream 9: freeglut-devel 3.2.1-10.el9 Β· MIT
- centos-stream 9: freeglut-devel 3.2.1-10.el9 Β· MIT
- fedora 43: freeglut-devel 3.6.0-6.fc43 Β· MIT
- fedora 43: freeglut-devel 3.6.0-6.fc43 Β· MIT
- fedora 43: freeglut-devel 3.8.0-1.fc43 Β· MIT
- fedora 43: freeglut-devel 3.8.0-1.fc43 Β· MIT
- fedora 44: freeglut-devel 3.8.0-2.fc44 Β· MIT
- fedora 44: freeglut-devel 3.8.0-2.fc44 Β· MIT
- opensuse-leap 16.0: freeglut-devel 3.2.2-160000.2.2 Β· MIT
- opensuse-leap 16.0: freeglut-devel 3.2.2-160000.2.2 Β· MIT
- opensuse-leap 16.0: freeglut-devel 3.2.2-160000.2.2 Β· MIT
- opensuse-leap 16.0: freeglut-devel 3.2.2-160000.2.2 Β· MIT
- Copyright 2004, the OpenGLUT contributors
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms