GLCLEARCOLOR(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

NAME πŸŽ€

Okay so this is glClearColor, straight from the 3G manual, and she is here to specify the clear values for your color buffers. Slay.

C SPECIFICATION ✨

The C signature is literally this, bestie β€” copy it exactly:

       void glClearColor( GLclampf red,
                          GLclampf green,
                          GLclampf blue,
                          GLclampf alpha )

PARAMETERS πŸ’–

  • red, green, blue, alpha β€” these specify the red, green, blue, and alpha values used when the color buffers are cleared. The initial values are all 0.

DESCRIPTION πŸ¦‹

glClearColor specifies the red, green, blue, and alpha values that glClear uses to clear the color buffers. The way that works is simple: you pick the values, and glClear does the clearing with them.

Any values you specify with glClearColor get clamped to the range [0, 1]. Periodt.

No cap: if you pass something outside that range, it’s getting clamped, not kept as-is. πŸ’…

ERRORS 🚨

GL_INVALID_OPERATION is generated if glClearColor is executed between the execution of glBegin and the corresponding execution of glEnd.

Bestie, do not call this inside a glBegin / glEnd block. That is giving β€œerror message incoming” energy. 😭

ASSOCIATED GETS πŸ‘€

You can ask for it back with glGet using the argument GL_COLOR_CLEAR_VALUE.

SEE ALSO 🌈

  • glClear(3G) β€” the iconique bestie that actually clears using the values you set here.

That’s the whole page, bestie πŸ’œ β€” the footer is just the GLCLEARCOLOR(3G) manual tag, with no extra source/version or date info beyond that. 🫢

πŸ“¦ where this page comes from