glGetColorTableParameterfvEXT, glGetColorTableParameterivEXT Function

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


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


  • 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

    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.


  • params
    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.

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 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
Header Gl.h
Library Opengl32.lib
DLL Opengl32.dll

See Also





Send comments about this topic to Microsoft

Build date: 6/9/2009