GLUTSETOPTION(3)

πŸ’– glutSetOption(3) πŸ’–

okay bestie, sit down, we're doing glutSetOption(3) from the OpenGLUT library β€” the state section, no less. it's giving "let me tweak the global vibes" and honestly? it ate. 🫢


✨ SYNOPSIS ✨

#include <openglut.h>

void
glutSetOption(GLenum eWhat, int value);

like, two args, one call, zero drama. we love a low-effort icon. πŸ’…


🌸 PARAMETERS 🌸

  • eWhat β€” the enumerated parameter ID, aka which state variable you're coming for. it's the "who" of the operation, fr fr.
  • value β€” the new value. the "what" you're stuffing into it. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: it stores the value into a state variable named by eWhat. that's the whole plot. no cap. πŸŽ€

here's the rundown of the allowable eWhat IDs, and bestie, there are quite a few, so let's go:

  • GLUT_ACTION_ON_WINDOW_CLOSE β€” this one controls what happens when a window is closed by the user or by the system. the options are:
    • GLUT_ACTION_EXIT β€” will immediately exit the application. and yeah, this is the default. so if you didn't pick anything, surprise, you picked this. πŸ’€
    • GLUT_ACTION_GLUTMAINLOOP_RETURNS β€” will immediately return from the main loop.
    • GLUT_ACTION_CONTINUE_EXECUTION β€” will contine execution of remaining windows. (yes, "contine" β€” that's the original spelling, i'm not touching it, it's part of the lore now πŸ™ˆ)
  • GLUT_INIT_DISPLAY_MODE β€” an alternate way to set the display mode for a new window.
  • GLUT_INIT_WINDOW_HEIGHT β€” an alternate way to set the height of new windows.
  • GLUT_INIT_WINDOW_WIDTH β€” an alternate way to set the width of new windows.
  • GLUT_INIT_WINDOW_X β€” an alternate way to set the initial horizontal position of new windows.
  • GLUT_INIT_WINDOW_Y β€” an alternate way to set the initial vertical position of new windows.
  • GLUT_RENDERING_CONTEXT β€” set this to either GLUT_CREATE_NEW_CONTEXT or GUT_USE_CURRENT_CONTEXT to indicate whether to share the current OpenGL rendering context with new windows. (and yes, it really does say GUT_USE_CURRENT_CONTEXT β€” that missing L is living its best life, i'm reporting it exactly as it is, do not come for me πŸ’…)
  • GLUT_WINDOW_CURSOR β€” attempts to set the current window's current cursor as if by glutSetCursor(). it's giving "same energy, different door" ✨
lowkey the whole page is just "here's a state variable, here's its enum, go off." but that's iconic of it honestly.

🌈 SEE ALSO 🌈


and that's the whole thing, bestie. this page is UNDATED and its manual footer is literally UNTITLED() β€” which is so real of it, mysterious main character energy, no date, no title, just vibes. πŸ§šπŸ’œ periodt.