GLCOPYCOLORSUBTABLE(3G)
π
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 ofGL_COLOR_TABLE,GL_POST_CONVOLUTION_COLOR_TABLE, orGL_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_VALUEis generated iftargetis not a previously defined color table. πGL_INVALID_VALUEis generated iftargetis not one of the allowable values.GL_INVALID_VALUEis generated if$"start"~+~"x"~>~width$. yeah. that's the condition. copy it exactly, bestie, do NOT paraphrase this one.GL_INVALID_OPERATIONis generated ifglCopyColorSubTableis executed between the execution ofglBeginand the corresponding execution ofglEnd. π« do not do this inside aglBegin/glEndsandwich. 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
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms