1GLPIXELMAP(3G)                                                  GLPIXELMAP(3G)
2
3
4

NAME

6       glPixelMapfv, glPixelMapuiv, glPixelMapusv - set up pixel transfer maps
7
8

C SPECIFICATION

10       void glPixelMapfv( GLenum map,
11                          GLint mapsize,
12                          const GLfloat *values )
13       void glPixelMapuiv( GLenum map,
14                           GLint mapsize,
15                           const GLuint *values )
16       void glPixelMapusv( GLenum map,
17                           GLint mapsize,
18                           const GLushort *values )
19
20

PARAMETERS

22       map      Specifies a symbolic map name.  Must be one of the following:
23                GL_PIXEL_MAP_I_TO_I, GL_PIXEL_MAP_S_TO_S, GL_PIXEL_MAP_I_TO_R,
24                GL_PIXEL_MAP_I_TO_G, GL_PIXEL_MAP_I_TO_B, GL_PIXEL_MAP_I_TO_A,
25                GL_PIXEL_MAP_R_TO_R, GL_PIXEL_MAP_G_TO_G, GL_PIXEL_MAP_B_TO_B,
26                or GL_PIXEL_MAP_A_TO_A.
27
28       mapsize  Specifies the size of the map being defined.
29
30       values   Specifies an array of mapsize values.
31

DESCRIPTION

33       glPixelMap sets up translation tables, or maps, used by glCopyPixels,
34       glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D,
35       glCopyTexSubImage2D, glCopyTexSubImage3D, glDrawPixels, glReadPixels,
36       glTexImage1D, glTexImage2D, glTexImage3D, glTexSubImage1D,
37       glTexSubImage2D, and glTexSubImage3D.  Additionally, if the
38       GL_ARB_imaging subset is supported, the routines glColorTable,
39       glColorSubTable, glConvolutionFilter1D, glConvolutionFilter2D,
40       glHistogram, glMinmax, and glSeparableFilter2D.  Use of these maps is
41       described completely in the glPixelTransfer reference page, and partly
42       in the reference pages for the pixel and texture image commands.  Only
43       the specification of the maps is described in this reference page.
44
45       map is a symbolic map name, indicating one of ten maps to set.  mapsize
46       specifies the number of entries in the map, and values is a pointer to
47       an array of mapsize map values.
48
49       The ten maps are as follows:
50
51       GL_PIXEL_MAP_I_TO_I           Maps color indices to color indices.
52
53       GL_PIXEL_MAP_S_TO_S           Maps stencil indices to stencil indices.
54
55       GL_PIXEL_MAP_I_TO_R           Maps color indices to red components.
56
57       GL_PIXEL_MAP_I_TO_G           Maps color indices to green components.
58
59       GL_PIXEL_MAP_I_TO_B           Maps color indices to blue components.
60
61       GL_PIXEL_MAP_I_TO_A           Maps color indices to alpha components.
62
63       GL_PIXEL_MAP_R_TO_R           Maps red components to red components.
64
65       GL_PIXEL_MAP_G_TO_G           Maps green components to green compo‐
66                                     nents.
67
68       GL_PIXEL_MAP_B_TO_B           Maps blue components to blue components.
69
70       GL_PIXEL_MAP_A_TO_A           Maps alpha components to alpha compo‐
71                                     nents.
72
73       The entries in a map can be specified as single-precision floating-
74       point numbers, unsigned short integers, or unsigned long integers.
75       Maps that store color component values (all but GL_PIXEL_MAP_I_TO_I and
76       GL_PIXEL_MAP_S_TO_S) retain their values in floating-point , with
77       unspecified mantissa and exponent sizes.  Floating-point values speci‐
78       fied by glPixelMapfv are converted directly to the internal floating-
79       point  of these maps, then clamped to the range [0,1].  Unsigned inte‐
80       ger values specified by glPixelMapusv and glPixelMapuiv are converted
81       linearly such that the largest representable integer maps to 1.0, and 0
82       maps to 0.0.
83
84       Maps that store indices, GL_PIXEL_MAP_I_TO_I and GL_PIXEL_MAP_S_TO_S,
85       retain their values in fixed-point , with an unspecified number of bits
86       to the right of the binary point.  Floating-point values specified by
87       glPixelMapfv are converted directly to the internal fixed-point  of
88       these maps.  Unsigned integer values specified by glPixelMapusv and
89       glPixelMapuiv specify integer values, with all 0's to the right of the
90       binary point.
91
92       The following table shows the initial sizes and values for each of the
93       maps.  Maps that are indexed by either color or stencil indices must
94       have mapsize = 2n for some n or the results are undefined.  The maximum
95       allowable size for each map depends on the implementation and can be
96       determined by calling glGet with argument GL_MAX_PIXEL_MAP_TABLE.  The
97       single maximum applies to all maps; it is at least 32.
98
99 ─────────────────────────────────────────────────────────────────────────────────────
100 map                    Lookup Index     Lookup Value    Initial Size   Initial Value
101 ─────────────────────────────────────────────────────────────────────────────────────
102 GL_PIXEL_MAP_I_TO_I    color index      color index          1               0
103 GL_PIXEL_MAP_S_TO_S   stencil index    stencil index         1               0
104 GL_PIXEL_MAP_I_TO_R    color index           R               1               0
105 GL_PIXEL_MAP_I_TO_G    color index           G               1               0
106 GL_PIXEL_MAP_I_TO_B    color index           B               1               0
107 GL_PIXEL_MAP_I_TO_A    color index           A               1               0
108 GL_PIXEL_MAP_R_TO_R         R                R               1               0
109 GL_PIXEL_MAP_G_TO_G         G                G               1               0
110 GL_PIXEL_MAP_B_TO_B         B                B               1               0
111 GL_PIXEL_MAP_A_TO_A         A                A               1               0
112 ─────────────────────────────────────────────────────────────────────────────────────
113
114

ERRORS

116       GL_INVALID_ENUM is generated if map is not an accepted value.
117
118       GL_INVALID_VALUE is generated if mapsize is less than one or larger
119       than GL_MAX_PIXEL_MAP_TABLE.
120
121       GL_INVALID_VALUE is generated if map is GL_PIXEL_MAP_I_TO_I,
122       GL_PIXEL_MAP_S_TO_S, GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G,
123       GL_PIXEL_MAP_I_TO_B, or GL_PIXEL_MAP_I_TO_A, and mapsize is not a power
124       of two.
125
126       GL_INVALID_OPERATION is generated if glPixelMap is executed between the
127       execution of glBegin and the corresponding execution of glEnd.
128

ASSOCIATED GETS

130       glGetPixelMap
131       glGet with argument GL_PIXEL_MAP_I_TO_I_SIZE
132       glGet with argument GL_PIXEL_MAP_S_TO_S_SIZE
133       glGet with argument GL_PIXEL_MAP_I_TO_R_SIZE
134       glGet with argument GL_PIXEL_MAP_I_TO_G_SIZE
135       glGet with argument GL_PIXEL_MAP_I_TO_B_SIZE
136       glGet with argument GL_PIXEL_MAP_I_TO_A_SIZE
137       glGet with argument GL_PIXEL_MAP_R_TO_R_SIZE
138       glGet with argument GL_PIXEL_MAP_G_TO_G_SIZE
139       glGet with argument GL_PIXEL_MAP_B_TO_B_SIZE
140       glGet with argument GL_PIXEL_MAP_A_TO_A_SIZE
141       glGet with argument GL_MAX_PIXEL_MAP_TABLE
142

SEE ALSO

144       glColorTable(3G), glColorSubTable(3G), glConvolutionFilter1D(3G),
145       glConvolutionFilter2D(3G), glCopyPixels(3G), glCopyTexImage1D(3G),
146       glCopyTexImage2D(3G), glCopyTexSubImage1D(3G), glCopyTexSubImage2D(3G),
147       glDrawPixels(3G), glHistogram(3G), glMinmax(3G), glPixelStore(3G),
148       glPixelTransfer(3G), glReadPixels(3G), glSeparableFilter2D(3G),
149       glTexImage1D(3G), glTexImage2D(3G), glTexImage3D(3G),
150       glTexSubImage1D(3G), glTexSubImage2D(3G), glTexSubImage3D(3G)
151
152
153
154                                                                GLPIXELMAP(3G)
Impressum