void glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values) void glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values) void glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
map | Specifies a symbolic map name. Must be one of the following: GL_PIXEL_MAP_I_TO_I, GL_PIXEL_MAP_S_TO_S, GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G, GL_PIXEL_MAP_I_TO_B, GL_PIXEL_MAP_I_TO_A, GL_PIXEL_MAP_R_TO_R, GL_PIXEL_MAP_G_TO_G, GL_PIXEL_MAP_B_TO_B, or GL_PIXEL_MAP_A_TO_A. |
mapsize | Specifies the size of the map being defined. |
values | Specifies an array of mapsize values. |
map is a symbolic map name, indicating one of ten maps to set. mapsize specifies the number of entries in the map, and values is a pointer to an array of mapsize map values.
The ten maps are as follows:
The entries in a map can be specified as single-precision
floating-point numbers, unsigned short integers, or unsigned
long integers. Maps that store color component values (all
but GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S) retain
their values in floating-point format, with unspecified
mantissa and exponent sizes. Floating-point values
specified by glPixelMapfv are converted directly to the
internal floating-point format of these maps, then clamped
to the range
Maps that store indices, GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S, retain their values in fixed-point format, with an unspecified number of bits to the right of the binary point. Floating-point values specified by glPixelMapfv are converted directly to the internal fixed- point format of these maps. Unsigned integer values specified by glPixelMapusv and glPixelMapuiv specify integer values, with all 0's to the right of the binary point.
The following table shows the initial sizes and values for
each of the maps. Maps that are indexed by either color or
stencil indices must have
map | Lookup Index | Lookup Value | Initial Size | Initial Value |
---|---|---|---|---|
GL_PIXEL_MAP_I_TO_I | color index | color index | 1 | 0 |
GL_PIXEL_MAP_S_TO_S | stencil index | stencil index | 1 | 0 |
GL_PIXEL_MAP_I_TO_R | color index | R | 1 | 0 |
GL_PIXEL_MAP_I_TO_G | color index | G | 1 | 0 |
GL_PIXEL_MAP_I_TO_B | color index | B | 1 | 0 |
GL_PIXEL_MAP_I_TO_A | color index | A | 1 | 0 |
GL_PIXEL_MAP_R_TO_R | R | R | 1 | 0 |
GL_PIXEL_MAP_G_TO_G | G | G | 1 | 0 |
GL_PIXEL_MAP_B_TO_B | B | B | 1 | 0 |
GL_PIXEL_MAP_A_TO_A | A | A | 1 | 0 |
GL_INVALID_VALUE is generated if mapsize is less than one or larger than GL_MAX_PIXEL_MAP_TABLE.
GL_INVALID_VALUE is generated if map is GL_PIXEL_MAP_I_TO_I, GL_PIXEL_MAP_S_TO_S, GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G, GL_PIXEL_MAP_I_TO_B, or GL_PIXEL_MAP_I_TO_A, and mapsize is not a power of two.
GL_INVALID_OPERATION is generated if glPixelMap is executed between the execution of glBegin and the corresponding execution of glEnd.