GLCLEARINDEX(3G)

πŸ“¦ version 1.1, in centos-stream 9, fedora 43, fedora 44

πŸ’– GLCLEARINDEX πŸ’–

okay so bestie, welcome to the glClearIndex page from the 3G manual β€” yes, that's the OpenGL one, we're being fancy today ✨


✨ NAME ✨

glClearIndex β€” specify the clear value for the color index buffers 🎨


πŸŽ€ C SPECIFICATION πŸŽ€

void glClearIndex( GLfloat c )

🌸 PARAMETERS 🌸

  • c β€” this is the index that gets used when the color index buffers are cleared. the initial value is 0. that's it, that's the whole parameter 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so glClearIndex specifies the index that glClear uses to clear the color index buffers. iconic teamwork fr fr πŸ’…

here's the thing tho β€” c is not clamped. nope, not happening. instead, c gets converted to a fixed-point value with unspecified precision to the right of the binary point. then the integer part of that value gets masked with 2mβˆ’1, where m is the number of bits in a color index stored in the frame buffer. the way that math just works β€” obsessed 😭


πŸ’€ ERRORS πŸ’€

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

bestie do NOT do that. that's the forbidden sandwich. no glClearIndex in the middle of a glBegin/glEnd pair, periodt πŸ™ˆ

πŸ”₯ ASSOCIATED GETS πŸ”₯

  • glGet with argument GL_INDEX_CLEAR_VALUE
  • glGet with argument GL_INDEX_BITS

πŸ‘‘ SEE ALSO πŸ‘‘

  • glClear(3G)

and that's the whole vibe check, bestie 🧚 we made it to the end!! this little masterpiece lives in the GLCLEARINDEX(3G) manual page β€” the footer's just the page name looking back at us, no version stamp, no date, just ✨ symmetrical bookending ✨, which honestly? main character energy. go clear some buffers, you absolute legend πŸŒˆπŸ’œ

πŸ“¦ where this page comes from