GLCLEARCOLOR(3G)

🌸 NAME 🌸

okay so this page is glClearColor, manual section 3G β€” and the header’s manual slot is literally [FIXME: manual], iconic in a cursed way πŸ’€.

  • glClearColor β€” specify clear values for the color buffers. That’s the whole name-line vibe, bestie.

πŸ’» C SPECIFICATION πŸ’»

Here’s the signature, exactly as it appears, no edits, no β€œimprovements”:

void glClearColor(GLfloat red, GLfloat green, GLfloat blue,
                  GLfloat alpha);

πŸŽ€ PARAMETERS πŸŽ€

  • red, green, blue, alpha β€” the red, green, blue, and alpha values used when the color buffers get cleared. Their initial values are all 0. Yes, all four start at zero, cute.

✨ DESCRIPTION ✨

glClearColor says β€œthese are the red, green, blue, and alpha values” and glClear() uses them to clear the color buffers. The values you specify get clamped to the range 0 1 β€” so if you try to be extra, the clamp says β€œno ma’am” πŸ’….

🧠 NOTES 🧠

Plot twist: the types of red, green, blue, and alpha changed from GLclampf to GLfloat. This change is transparent to user code, and it’s described in detail on the removedTypes() page. So your code doesn’t need to panic, fr fr 🫢.

πŸ”Ž ASSOCIATED GETS πŸ”Ž

  • glGet() with argument GL_COLOR_CLEAR_VALUE β€” that’s the associated get, periodt.

πŸ“Š VERSION SUPPORT πŸ“Š

The table’s column is OpenGL Version, its row label is Function / Feature Name, and the row is glClearColor. Every listed version is a checkmark:

  • OpenGL 2.0: βœ”
  • 2.1: βœ”
  • 3.0: βœ”
  • 3.1: βœ”
  • 3.2: βœ”
  • 3.3: βœ”
  • 4.0: βœ”
  • 4.1: βœ”
  • 4.2: βœ”
  • 4.3: βœ”
  • 4.4: βœ”
  • 4.5: βœ”

So like… all the checks. Slay. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

  • glClear()
  • removedTypes()

Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.

Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group


okay bye bestie πŸ’– Source/version footer says [FIXME: source] / GLCLEARCOLOR(3G), and the date stamp is 08/09/2021. Catch you in the next draw call 🌈✨

πŸ“¦ where this page comes from