GLUTINITDISPLAYMODE(3)

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

πŸ’– glutInitDisplayMode(3) πŸ’–

okay bestie, welcome to the OpenGLUT - window manual page, the one and only glutInitDisplayMode. this is the glow-up your windows get before they even exist. slay. ✨


πŸ¦‹ NAME πŸ¦‹

glutInitDisplayMode β€” Set the window creation display mode.


πŸ“š LIBRARY πŸ“š

OpenGLUT - window


πŸŽ€ SYNOPSIS πŸŽ€

#include <openglut.h>

void
glutInitDisplayMode(unsigned int displayMode);

πŸ“ PARAMETERS πŸ“

  • displayMode β€” the requested display mode bitmask. it's giving "wishlist for my future window" energy fr fr.

✨ DESCRIPTION ✨

so like, glutInitDisplayMode() lets you control the mode for subsequent OpenGLUT windows. you're basically setting the vibe before the window even shows up. main character energy πŸ’…

the allowable displayMode is a combination of these little icons:

  • GLUT_RGB β€” Red, green, blue framebuffer.
  • GLUT_RGBA β€” Red, green, blue, alpha framebuffer.
  • GLUT_INDEX β€” Indexed color framebuffer.
  • GLUT_SINGLE β€” Single-buffered mode.
  • GLUT_DOUBLE β€” Double-buffered mode.
  • GLUT_ACCUM β€” Accumulation buffer.
  • GLUT_ALPHA β€” Alpha channel.
  • GLUT_DEPTH β€” Depth buffering.
  • GLUT_STENCIL β€” Stencil buffering.
  • GLUT_MULTISAMPLE β€” Multisampling mode. (not always available πŸ™ˆ)
  • GLUT_STEREO β€” Left and right framebuffers.
  • GLUT_LUMINANCE β€” Greyscale color mode.

🌈 experimental era 🌈

additionally, the following experimental features are implemented:

  • GLUT_OFFSCREEN β€” Offscreen windows are very much like onscreen windows that have been dragged off of the edge of the screen. The biggest issue is that offscreen windows do not support subwindows. Other than that, onscreen windows that are dragged off of the edge may not store graphics that you render (while GLUT_OFFSCREEN windows do), and there is no way to drag an offscreen window onscreen for user interaction.
  • GLUT_BORDERLESS β€” Borderless windows are very experimental, and their precise behavior is not set in stone. See also glutCreateMenuWindow().

πŸ‘‘ the defaults πŸ‘‘

the following are defaults:

  • GLUT_RGB
  • GLUT_SINGLE

⚠️ CAVEATS ⚠️

  • Some display mode features were introduced by OpenGLUT.
  • Not all features or combinations of features are valid for all platforms.
  • There is no way to change the display mode of an open window.
bestie that last one is a hard no. once the window is open, that mode is locked in. no take-backs, no glow-up mid-scroll. periodt. 😭

πŸ’€ BUGS πŸ’€

  • GLUT_OFFSCREEN windows do not work with nVidia cards/drivers. (Both Win32 and X11)
  • GLUT_BORDERLESS seems to vary by the window manager on X11, though twm (for example) performs very similarly to WIN32. But KDE's window manager (for example) does not let you send keystrokes to borderless windows without OpenGLUT hacks.
ngl the borderless situation is giving chaos. it lowkey depends on your window manager. 🫠

🫢 SEE ALSO 🫢

glutCreateMenuWindow(3) glutInit(3) glutInitWindowSize(3) glutInitWindowPosition(3) glutInitDisplayString(3) glutSwapBuffers(3)


and that's the whole page, bestie!! this one came from the OpenGLUT era, dated UNDATED, and the footer just says UNTITLED() like it's too mysterious to name itself. iconic honestly. go forth and set your display mode πŸ’–πŸŒΈπŸ§š