OpenGL C bindings library: libGL.a
void glPixelMapfv(GLenum Map, GLint MapSize, const GLfloat *Values)
void glPixelMapuiv(GLenum Map, GLint MapSize, const GLuint *Values)
void glPixelMapusv(GLenum Map, GLint MapSize, const GLushort *Values)
Map | Specifies a symbolic map name. Map must be one of the following: |
MapSize | Specifies the size of the map being defined. |
Values | Specifies an array of MapSize values. |
The glPixelMap subroutine sets up translation tables, or maps, used by the glDrawPixels, glReadPixels, glCopyPixels, glTexImage1D, and glTexImage2D subroutines. See the glPixelTransfer subroutine for a complete description on using these maps. Use of these maps is also described in part in the pixel and texture image subroutines. Only the specification of the maps is described here.
The Map parameter is a symbolic map name, indicating one of 10 maps to set. The MapSize parameter specifies the number of entries in the map, and the Values parameter is a pointer to an array of MapSize map values.
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 the GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S maps) 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 [0,1]. Unsigned integer values specified by glPixelMapusv and glPixelMapuiv are converted linearly such that the largest representable integer maps to 1.0, and 0 (zero) maps to 0.0.
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 0s 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 indexes must have MapSize = 2n for some n or results are undefined. The maximum allowable size for each map depends on the implementation and can be determined by calling the glGet subroutine with argument GL_MAX_PIXEL_MAP_TABLE. The single maximum applies to all maps, and it is at least 32.
Map | Lookup Index | Lookup Value | Initial Size | Initial Value |
GL_PIXEL_MAP_I_TO_I | color index | color index | 1 | 0.0 |
GL_PIXEL_MAP_S_TO_S | stencil index | stencil index | 1 | 0 |
GL_PIXEL_MAP_I_TO_R | color index | R | 1 | 0.0 |
GL_PIXEL_MAP_I_TO_G | color index | G | 1 | 0.0 |
GL_PIXEL_MAP_I_TO_B | color index | B | 1 | 0.0 |
GL_PIXEL_MAP_I_TO_A | color index | A | 1 | 0.0 |
GL_PIXEL_MAP_R_TO_R | R | R | 1 | 0.0 |
GL_PIXEL_MAP_G_TO_G | G | G | 1 | 0.0 |
GL_PIXEL_MAP_B_TO_B | B | B | 1 | 0.0 |
GL_PIXEL_MAP_A_TO_A | A | A | 1 | 0.0 |
Associated gets for the glPixelMap subroutine are as follows. (See the glGet subroutine for more information.)
glGet with argument GL_PIXEL_MAP_I_TO_I_SIZE
glGet with argument GL_PIXEL_MAP_S_TO_S_SIZE
glGet with argument GL_PIXEL_MAP_I_TO_R_SIZE
glGet with argument GL_PIXEL_MAP_I_TO_G_SIZE
glGet with argument GL_PIXEL_MAP_I_TO_B_SIZE
glGet with argument GL_PIXEL_MAP_I_TO_A_SIZE
glGet with argument GL_PIXEL_MAP_R_TO_R_SIZE
glGet with argument GL_PIXEL_MAP_G_TO_G_SIZE
glGet with argument GL_PIXEL_MAP_B_TO_B_SIZE
glGet with argument GL_PIXEL_MAP_A_TO_A_SIZE
glGet with argument GL_MAX_PIXEL_MAP_TABLE.
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glBegin or glEnd subroutine, glCopyPixels subroutine, glDrawPixels subroutine, glGetPixelMap subroutine, glPixelStore subroutine, glPixelTransfer subroutine, glReadPixels subroutine, glTexImage1D subroutine, glTexImage2D subroutine.