GLUTGET(3)
β¨ GLUTGET(3) β the glow-up edition β¨
okay bestie, so this is a page from OpenGLUT, and it lives in the state corner of the library. Its whole vibe? Answering the question "hey, what's the current value of literally everything?" π¦
π NAME π
glutGet β Allows you to query some general state/option variables. That's it, that's the whole job. She's a gossip who knows everyone's business. π
π LIBRARY π
OpenGLUT - state
πΈ SYNOPSIS πΈ
#include <openglut.h>
int
glutGet(GLenum eWhat);
π PARAMETERS π
eWhatβ Enumerated parameter ID. Basically you hand her a name tag and she tells you what that thing currently is. π
β¨ DESCRIPTION β¨
So this function lets you query the current value of many, many different OpenGLUT state variables. Not a few. Not some. Many. She has receipts on all of them. The current list is:
GLUT_ACTION_ON_WINDOW_CLOSEβ Allows you to do something other than die if the user closes one of your windows. π no cap, "die" is the default energy here, so this one is the difference between a graceful exit and a whole tragedy.GLUT_DISPLAY_MODE_POSSIBLEGLUT_ELAPSED_TIMEGLUT_INIT_DISPLAY_MODEGLUT_INIT_STATEGLUT_INIT_WINDOW_HEIGHTGLUT_INIT_WINDOW_WIDTHGLUT_INIT_WINDOW_XGLUT_INIT_WINDOW_YGLUT_MENU_NUM_ITEMSGLUT_RENDERING_CONTEXTβ Allows you to specify context-sharing when you open new windows. besties sharing a vibe, but for contexts. π«ΆGLUT_SCREEN_HEIGHTGLUT_SCREEN_HEIGHT_MMβ Height in millimeters.GLUT_SCREEN_WIDTHGLUT_SCREEN_WIDTH_MMβ Width in millimeters.GLUT_VERSIONGLUT_WINDOW_ACCUM_ALPHA_SIZEGLUT_WINDOW_ACCUM_BLUE_SIZEGLUT_WINDOW_ACCUM_GREEN_SIZEGLUT_WINDOW_ACCUM_RED_SIZEGLUT_WINDOW_ALPHA_SIZEGLUT_WINDOW_BLUE_SIZEGLUT_WINDOW_BORDER_WIDTHGLUT_WINDOW_BUFFER_SIZEGLUT_WINDOW_COLORMAP_SIZEGLUT_WINDOW_CURSORGLUT_WINDOW_DEPTH_SIZEGLUT_WINDOW_DOUBLEBUFFERGLUT_WINDOW_FORMAT_IDβ System dependant. (spelling is the original's, don't come for me π)GLUT_WINDOW_GREEN_SIZEGLUT_WINDOW_HEADER_HEIGHTGLUT_WINDOW_HEIGHTGLUT_WINDOW_NUM_CHILDRENGLUT_WINDOW_NUM_SAMPLESGLUT_WINDOW_PARENTGLUT_WINDOW_RED_SIZEGLUT_WINDOW_RGBAGLUT_WINDOW_STENCIL_SIZEGLUT_WINDOW_STEREOGLUT_WINDOW_WIDTHGLUT_WINDOW_XGLUT_WINDOW_Y
Most of the above are very obvious, and so full documentation is postponed for now. (read: the authors said "we'll get to it" and then did not get to it π§)
π₯ TODO π₯
- Go back and flesh out the above list.
- This function is a bit messy, especially the WINCE part. Fix.
- Lots of code uses
returnto hop out. Since it's such a sprawling function, it's easy to be in the middle and not be 100% sure if there's anything important at the end of the function, or if it is safe to just "drop out" of the current case and head for the bottom. - Causes crashes (assertion failure) if you call this before having called
glutInit()β other thanGLUT_INIT_STATEandGLUT_ELAPSED_TIME. Because various things can cause OpenGLUT to become deinitialized, we should probably either return default values of some kind or do minimal initialization if we are called without proper initialization.
π¨ real talk bestie: call this beforeglutInit()and you're rolling the dice on an assertion failure crash. The only two safe ones pre-init areGLUT_INIT_STATEandGLUT_ELAPSED_TIME. Everything else? init first, questions later. π
π SEE ALSO π
glutSetOption(3) glutDeviceGet(3) glutGetModifiers(3) glutLayerGet(3)
and that's the whole page, bestie π this lil' legend comes to you from the OpenGLUT manual, page dated UNDATED, and the footer was giving absolutely nothing β literally just UNTITLED() sitting there with no title energy whatsoever π so we're honoring it as-is, no notes. mwah π
π¦ 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