GLBLENDCOLOR(3G)

πŸ’… GLBLENDCOLOR (3G) β€” ok bestie, let's talk blend color ✨

So you wanna set the blend color? Say less. This is the 3G manual page for glBlendColor, and honestly she's a short one but she matters. Come sit with me 🫢


🌸 NAME

glBlendColor β€” set the blend color 🎨


✨ C SPECIFICATION

Like, here's exactly how you call her, no cap:

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

πŸŽ€ PARAMETERS

  • red, green, blue, alpha β€” these four besties specify the components of GL_BLEND_COLOR πŸ’–

πŸ¦‹ DESCRIPTION

Okay so here's the tea β˜• β€” GL_BLEND_COLOR may be used to calculate the source and destination blending factors. Iconic behavior, truly.

The color components are clamped to the range 0 1 before being stored. So don't try anything funny with your values, she will clamp you πŸ™ˆ

For a complete description of the blending operations, go see glBlendFunc() β€” she's the main character of that particular story πŸ‘‘

And the starting point? Initially the GL_BLEND_COLOR is set to (0, 0, 0, 0). That's the default, periodt. 🌈


πŸ’€ NOTES

Not me having to tell you this, but the type of the red, green, blue, and alpha parameters was changed from GLclampf to GLfloat. And before you panic β€” this change is transparent to user code 😌 It's described in detail on the removedTypes() page, iykyk.


πŸ”₯ ASSOCIATED GETS

Wanna read the value back? You do it with glGet() with an argument of GL_BLEND_COLOR. That's it, that's the whole vibe check ⭐


πŸ‘‘ VERSION SUPPORT

Okay so this is the part where the original drops a whole spreadsheet at us πŸ“Š β€” but the short version is very cute: glBlendColor is the function / feature name, and she's supported in every single OpenGL version listed. Every one. All checks. All slay. πŸ’…

Here's the full list of OpenGL versions where glBlendColor gets a βœ”:

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

Twelve for twelve, she ate and left no crumbs πŸ“πŸ§š


🌟 SEE ALSO

Go check out her friends, they're all iconic:

  • glBlendEquation()
  • glBlendFunc()
  • glGetString()
  • 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


And that's the whole page, bestie! 🫢 This little cutie comes to you from [FIXME: source] and is dated 08/09/2021 β€” go forth and blend responsibly βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from