GLCOLORTABLEPARAMETER(3G)
π glColorTableParameteriv / glColorTableParameterfv β set color lookup table parameters π
okay bestie, welcome to the GLCOLORTABLEPARAMETER page, section 3G, she's an OpenGL girly and she's here to help you set color lookup table parameters β¨ no cap, this one's short and sweet, let's go π¦
β¨ C SPECIFICATION β¨
void glColorTableParameteriv( GLenum target,
GLenum pname,
const GLint *params )
void glColorTableParameterfv( GLenum target,
GLenum pname,
const GLfloat *params )
two functions, same energy, one takes GLint and one takes GLfloat, and honestly? iconic of them π
π PARAMETERS π
targetβ the target color table, queen. must beGL_COLOR_TABLE,GL_POST_CONVOLUTION_COLOR_TABLE, orGL_POST_COLOR_MATRIX_COLOR_TABLE. that's the vibe check, no substitutions π₯pnameβ the symbolic name of a texture color lookup table parameter. must be one ofGL_COLOR_TABLE_SCALEorGL_COLOR_TABLE_BIAS. pick one, bestie π«Άparamsβ a pointer to an array where the values of the parameters are stored. yes it's a pointer. yes you have to keep it alive. we don't make the rules π
πΈ DESCRIPTION πΈ
so glColorTableParameter is the function that lets you specify the scale factors and the bias terms that get applied to color components when they're loaded into a color table. like, before the color even lands in the table, it gets scaled and biased. glow-up in transit, fr fr β¨
target tells you which color table those scale and bias terms apply to. it must be set to GL_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, or GL_POST_COLOR_MATRIX_COLOR_TABLE. one of those three, periodt.
pname must be GL_COLOR_TABLE_SCALE if you're setting the scale factors. in that case, params points to an array of four values, and those four values are the scale factors for red, green, blue, and alpha, in that order. in that exact order. don't get cute with the order, bestie π
pname must be GL_COLOR_TABLE_BIAS if you're setting the bias terms. in this case, params points to an array of four values, which are the bias terms for red, green, blue, and alpha, in that order. same deal, same order, same four-value situation π
and the color tables themselves? those are specified by calling glColorTable. so this function is like, the seasoning, and glColorTable is the actual meal π
π NOTES π
glColorTableParameter is available only if GL_ARB_imaging is returned from calling glGetString with an argument of GL_EXTENSIONS.
so like, check for GL_ARB_imaging first, or you're gonna have a bad time π this is a conditional availability situation, not a "just trust me" situation.
π₯ ERRORS π₯
GL_INVALID_ENUMis generated iftargetorpnameis not an acceptable value. so if you passed something unhinged, the universe will let you know πGL_INVALID_OPERATIONis generated ifglColorTableParameteris executed between the execution ofglBeginand the corresponding execution ofglEnd.
literally do not call this in betweenglBeginandglEnd. that's the forbidden window. that's the "not me doing this" moment. don't be that girl π
β ASSOCIATED GETS β
glGetColorTableParameter
the way that you can just go ask her what she's got set π iykyk
π SEE ALSO π
glColorTable(3G), glPixelTransfer(3G)
that's the whole page bestie, you ate it, you understood it, main character energy all around π«Άπ
later babes β this was GLCOLORTABLEPARAMETER(3G), living in section 3G of the manual, signed off at the bottom like every good page is πβ¨ bye!! πΈπ¦
π¦ where this page comes from
- opensuse-leap 16.0: Mesa-libGL-devel 24.1.7-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- opensuse-leap 16.0: Mesa-libGL-devel 24.3.3-160000.3.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms