GLUTGET(3)

πŸ“¦
version 3.8.0 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

✨ 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_POSSIBLE
  • GLUT_ELAPSED_TIME
  • GLUT_INIT_DISPLAY_MODE
  • GLUT_INIT_STATE
  • GLUT_INIT_WINDOW_HEIGHT
  • GLUT_INIT_WINDOW_WIDTH
  • GLUT_INIT_WINDOW_X
  • GLUT_INIT_WINDOW_Y
  • GLUT_MENU_NUM_ITEMS
  • GLUT_RENDERING_CONTEXT β€” Allows you to specify context-sharing when you open new windows. besties sharing a vibe, but for contexts. 🫢
  • GLUT_SCREEN_HEIGHT
  • GLUT_SCREEN_HEIGHT_MM β€” Height in millimeters.
  • GLUT_SCREEN_WIDTH
  • GLUT_SCREEN_WIDTH_MM β€” Width in millimeters.
  • GLUT_VERSION
  • GLUT_WINDOW_ACCUM_ALPHA_SIZE
  • GLUT_WINDOW_ACCUM_BLUE_SIZE
  • GLUT_WINDOW_ACCUM_GREEN_SIZE
  • GLUT_WINDOW_ACCUM_RED_SIZE
  • GLUT_WINDOW_ALPHA_SIZE
  • GLUT_WINDOW_BLUE_SIZE
  • GLUT_WINDOW_BORDER_WIDTH
  • GLUT_WINDOW_BUFFER_SIZE
  • GLUT_WINDOW_COLORMAP_SIZE
  • GLUT_WINDOW_CURSOR
  • GLUT_WINDOW_DEPTH_SIZE
  • GLUT_WINDOW_DOUBLEBUFFER
  • GLUT_WINDOW_FORMAT_ID β€” System dependant. (spelling is the original's, don't come for me πŸ™ˆ)
  • GLUT_WINDOW_GREEN_SIZE
  • GLUT_WINDOW_HEADER_HEIGHT
  • GLUT_WINDOW_HEIGHT
  • GLUT_WINDOW_NUM_CHILDREN
  • GLUT_WINDOW_NUM_SAMPLES
  • GLUT_WINDOW_PARENT
  • GLUT_WINDOW_RED_SIZE
  • GLUT_WINDOW_RGBA
  • GLUT_WINDOW_STENCIL_SIZE
  • GLUT_WINDOW_STEREO
  • GLUT_WINDOW_WIDTH
  • GLUT_WINDOW_X
  • GLUT_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 return to 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 than GLUT_INIT_STATE and GLUT_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 before glutInit() and you're rolling the dice on an assertion failure crash. The only two safe ones pre-init are GLUT_INIT_STATE and GLUT_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 πŸ’–