GLCOPYCOLORSUBTABLE(3G)

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

πŸ’… GLCOPYCOLORSUBTABLE πŸ’… (that's the 3G manual, bestie)

okay so real talk: this is glCopyColorSubTable, and she does exactly one thing β€” she respecifies a portion of a color table. Not the whole thing. A portion. She's a snipper, a little detail-oriented queen. βœ‚οΈβœ¨


✨ NAME ✨

glCopyColorSubTable β€” respecify a portion of a color table πŸŽ€


🌸 C SPECIFICATION 🌸

void glCopyColorSubTable( GLenum target,
                          GLsizei start,
                          GLint x,
                          GLint y,
                          GLsizei width )

copy it exactly, don't freestyle it, i'm begging 🫢


πŸ¦‹ PARAMETERS πŸ¦‹

  • target β€” has to be one of GL_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, or GL_POST_COLOR_MATRIX_COLOR_TABLE. that's the whole guest list, no plus-ones.
  • start β€” the starting index of the portion of the color table that's getting replaced. where the makeover begins πŸ’…
  • x, y β€” the window coordinates of the left corner of the row of pixels to be copied. left corner. row of pixels. got it.
  • width β€” how many table entries get replaced. the size of the glow-up.

πŸ’– DESCRIPTION πŸ’–

so glCopyColorSubTable respecifies a contiguous portion of a color table that was previously defined using glColorTable. like, the table already exists, you're just editing a slice of it.

the pixels copied from the framebuffer replace the portion of the existing table from indices $"start"~+~"x"~-~1$, inclusive. yes that's literally how it's written, i don't make the rules, i just deliver them verbatim πŸ’€

⚠️ this region may not include any entries outside the range of the color table, as was originally specified. stay in your lane, diva.

and here's the chill part: it is not an error to specify a subtexture with a width of 0. but such a specification has no effect. so like... you can. it just does nothing. iconic behaviour honestly 🌈


πŸ”₯ NOTES πŸ”₯

glCopyColorSubTable is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. no GL_ARB_imaging, no function. check before you wreck (your render pipeline) πŸ’€


πŸ‘‘ ERRORS πŸ‘‘

  • GL_INVALID_VALUE is generated if target is not a previously defined color table. πŸ‘€
  • GL_INVALID_VALUE is generated if target is not one of the allowable values.
  • GL_INVALID_VALUE is generated if $"start"~+~"x"~>~width$. yeah. that's the condition. copy it exactly, bestie, do NOT paraphrase this one.
  • GL_INVALID_OPERATION is generated if glCopyColorSubTable is executed between the execution of glBegin and the corresponding execution of glEnd. 🚫 do not do this inside a glBegin/glEnd sandwich. it's giving forbidden.

⭐ ASSOCIATED GETS ⭐

glGetColorTable, glGetColorTableParameter β€” the little info-gathering besties that hang out with her 🫢


πŸŽ€ SEE ALSO πŸŽ€

glColorSubTable(3G), glColorTableParameter(3G), glCopyColorTable(3G), glCopyColorSubTable(3G), glGetColorTable(3G)

(yes she's in her own SEE ALSO. self-love, we stan πŸ’…)


and that's the whole page, no notes, no cap. this was GLCOPYCOLORSUBTABLE(3G) β€” the 3G being the manual section, obviously β€” and the page footer was just her name again, GLCOPYCOLORSUBTABLE(3G), because she's that confident. mwah. πŸ’‹βœ¨πŸŒΈ

πŸ“¦ where this page comes from