glGetColorTableParameterivEXT function

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

Syntax

void WINAPI 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 are the accepted symbolic constants and their meanings.

Value Meaning
GL_COLOR_TABLE_FORMAT_EXT
Return the internal format specified by the most recent call to glColorTableEXT 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.

Return value

This function does not return a value.

Remarks

You use the glGetColorTableParameterivEXT and glGetColorTableParameterfvEXT functions to retrieve specific parameter data from color tables set with glColorTableEXT 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.

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 glGetString(GL_EXTENSIONS). If it returns GL_EXT_paletted_texture, glGetColorTableParameterivEXT and glGetColorTableParameterfvEXT are supported. To obtain the function address of an extension function, call wglGetProcAddress.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Gl.h

See also

glColorSubTableEXT

glColorTableEXT

glGetColorTableEXT

glGetColorTableParameterfvEXT

wglGetProcAddress