glGetColorTableParameterfvEXT, glGetColorTableParameterivEXT

[New - Windows 95, OEM Service Release 2]

The glGetColorTableParameterfvEXT and glGetColorTableParameterivEXT functions get palette parameters from color tables.

void glGetColorTableParameterfvEXT(

    GLenum target,

 

    GLenum pname,

 

    GLint * params

 

   );

 

 

void glGetColorTableParameterivEXT(

    GLenum target,

 

    GLenum pname,

 

    GLint * params

 

   );

 

 

Parameters

target

The target texture of the palette for which you want parameter data. Must be TEXTURE_1D, TEXTURE_2D, PROXY_TEXTURE_1D, or PROXY_TEXTURE_2D.

pname

A symbolic constant for the type of palette parameter data pointed to by params.

The following table summarizes the meaning of the valid constants for the pname parameter.

Constant

Meaning

GL_COLOR_TABLE_FORMAT_EXT

Return the internal format specified by the most recent call to glColorTableEXTB1FJRZ or the default value.

GL_COLOR_TABLE_WIDTH_EXT

Return the width of the current palette.

GL_COLOR_TABLE_RED_SIZE_EXT

Return the actual size used internally to store the red component of the palette data.

GL_COLOR_TABLE_GREEN_SIZE_EXT

Return the actual size used internally to store the green component of the palette data.

GL_COLOR_TABLE_BLUE_SIZE_EXT

Return the actual size used internally to store the blue component of the palette data.

GL_COLOR_TABLE_ALPHA_SIZE_EXT

Return the actual size used internally to store the alpha component of the palette data.

 

params

Points to the color table parameter data specified by the pname parameter.

 

Remarks

You use the glGetColorTableParameterivEXT and glGetColorTableParameterfvEXT functions to retrieve specific parameter data from color tables set with glColorTableEXTB1FJRZ for targeted texture palettes. Also you can use these functions to determine the number of color table entries that glGetColorTableEXT returns.

When the target parameter is GL_PROXY_TEXTURE_1D or GL_PROXY_TEXTURE_2D, and the implementation does not support the values specified for either format or width, glColorTableEXT can fail to create the requested color table. In this case, the color table is empty and all parameters retrieved will be zero. You can determine whether OpenGL supports a particular color table format and size by calling glColorTableEXT with a proxy target, and then calling glGetColorTableParameterivEXT or glGetColorTableParameterfvEXT to determine whether the width parameter matches that set by glColorTableEXT. If the retrieved width is zero, the color table request by glColorTable failed. If the retrieved width is not zero, you can call glColorTable with the real target with TEXTURE_1D or TEXTURE_2D to set the color table.

 

Note  The glGetColorTableParameterivEXT and glGetColorTableParameterfvEXT functions are extension functions that are not part of the standard OpenGL library but are part of the GL_EXT_paletted_texture extension. To check whether your implementation of OpenGL supports glGetColorTableParameterivEXT and glGetColorTableParameterfvEXT, call glGetStringLYLZTA(GL_EXTENSIONS). If it returns GL_EXT_paletted_texture, glGetColorTableParameterivEXT and glGetColorTableParameterfvEXT are supported. To obtain the function address of an extension function, call wglGetProcAddress3OLY9MK.

 

Error Codes

The following are the error codes generated and their conditions.

Error Code

Condition

GL_INVALID_ENUM

target or pname was not an accepted value.

GL_INVALID_OPERATION

glGetColorTableParameterivEXT or glGetColorTableParameterfvEXT was called between glBegin and glEnd pairs.

 

See Also

glColorSubTableEXT, glColorTableEXT, glGetColorTableEXT, wglGetProcAddress