Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

glGetColorTableParameterivEXT function

Applies to: desktop apps only

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


void WINAPI glGetColorTableParameterivEXT(
  GLenum target,
  GLenum pname,
  GLint *params



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.


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

The following are the accepted symbolic constants and their meanings.


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


Return the width of the current palette.


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


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


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


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



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

Return value

This function does not return a value.


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.


Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server



See also




Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

© 2015 Microsoft