Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glGetPixelMap"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetPixelMap</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetPixelMap</refname> | |
17 | <refpurpose>return the specified pixel map</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetPixelMapfv</function></funcdef> | |
23 | <paramdef>GLenum <parameter>map</parameter></paramdef> | |
24 | <paramdef>GLfloat * <parameter>data</parameter></paramdef> | |
25 | </funcprototype> | |
26 | </funcsynopsis> | |
27 | <funcsynopsis> | |
28 | <funcprototype> | |
29 | <funcdef>void <function>glGetPixelMapuiv</function></funcdef> | |
30 | <paramdef>GLenum <parameter>map</parameter></paramdef> | |
31 | <paramdef>GLuint * <parameter>data</parameter></paramdef> | |
32 | </funcprototype> | |
33 | </funcsynopsis> | |
34 | <funcsynopsis> | |
35 | <funcprototype> | |
36 | <funcdef>void <function>glGetPixelMapusv</function></funcdef> | |
37 | <paramdef>GLenum <parameter>map</parameter></paramdef> | |
38 | <paramdef>GLushort * <parameter>data</parameter></paramdef> | |
39 | </funcprototype> | |
40 | </funcsynopsis> | |
41 | </refsynopsisdiv> | |
42 | <refsect1 id="parameters"><title>Parameters</title> | |
43 | <variablelist> | |
44 | <varlistentry> | |
45 | <term><parameter>map</parameter></term> | |
46 | <listitem> | |
47 | <para> | |
48 | Specifies the name of the pixel map to return. | |
49 | Accepted values are | |
50 | <constant>GL_PIXEL_MAP_I_TO_I</constant>, | |
51 | <constant>GL_PIXEL_MAP_S_TO_S</constant>, | |
52 | <constant>GL_PIXEL_MAP_I_TO_R</constant>, | |
53 | <constant>GL_PIXEL_MAP_I_TO_G</constant>, | |
54 | <constant>GL_PIXEL_MAP_I_TO_B</constant>, | |
55 | <constant>GL_PIXEL_MAP_I_TO_A</constant>, | |
56 | <constant>GL_PIXEL_MAP_R_TO_R</constant>, | |
57 | <constant>GL_PIXEL_MAP_G_TO_G</constant>, | |
58 | <constant>GL_PIXEL_MAP_B_TO_B</constant>, and | |
59 | <constant>GL_PIXEL_MAP_A_TO_A</constant>. | |
60 | </para> | |
61 | </listitem> | |
62 | </varlistentry> | |
63 | <varlistentry> | |
64 | <term><parameter>data</parameter></term> | |
65 | <listitem> | |
66 | <para> | |
67 | Returns the pixel map contents. | |
68 | </para> | |
69 | </listitem> | |
70 | </varlistentry> | |
71 | </variablelist> | |
72 | </refsect1> | |
73 | <refsect1 id="description"><title>Description</title> | |
74 | <para> | |
75 | See the <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry> reference page for a description of the acceptable | |
76 | values for the <parameter>map</parameter> parameter. | |
77 | <function>glGetPixelMap</function> returns in <parameter>data</parameter> the contents of the pixel map | |
78 | specified in <parameter>map</parameter>. | |
79 | Pixel maps are used during the execution of | |
80 | <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>, | |
81 | <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>, | |
82 | <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>, | |
83 | <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, | |
84 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, | |
85 | <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, | |
86 | <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>, | |
87 | <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, | |
88 | <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>, | |
89 | <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, | |
90 | <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>, | |
91 | <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>, | |
92 | <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>, and | |
93 | <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>. | |
94 | to map color indices, | |
95 | stencil indices, | |
96 | color components, | |
97 | and depth components to other values. | |
98 | </para> | |
99 | <para> | |
100 | If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target | |
101 | (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a pixel map is | |
102 | requested, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store. | |
103 | </para> | |
104 | <para> | |
105 | Unsigned integer values, | |
106 | if requested, | |
107 | are linearly mapped from the internal fixed or floating-point representation | |
108 | such that 1.0 maps to the largest representable integer value, | |
109 | and 0.0 maps to 0. | |
110 | Return unsigned integer values are undefined if the map value was | |
111 | not in the range [0,1]. | |
112 | </para> | |
113 | <para> | |
114 | To determine the required size of <parameter>map</parameter>, | |
115 | call <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with the appropriate symbolic | |
116 | constant. | |
117 | </para> | |
118 | </refsect1> | |
119 | <refsect1 id="notes"><title>Notes</title> | |
120 | <para> | |
121 | If an error is generated, | |
122 | no change is made to the contents of <parameter>data</parameter>. | |
123 | </para> | |
124 | </refsect1> | |
125 | <refsect1 id="errors"><title>Errors</title> | |
126 | <para> | |
127 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>map</parameter> is not an accepted value. | |
128 | </para> | |
129 | <para> | |
130 | <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the | |
131 | <constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped. | |
132 | </para> | |
133 | <para> | |
134 | <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the | |
135 | <constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer | |
136 | object such that the memory writes required would exceed the data store size. | |
137 | </para> | |
138 | <para> | |
139 | <constant>GL_INVALID_OPERATION</constant> is generated by <function>glGetPixelMapfv</function> if a non-zero buffer object name is bound to the | |
140 | <constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible | |
141 | into the number of bytes needed to store in memory a GLfloat datum. | |
142 | </para> | |
143 | <para> | |
144 | <constant>GL_INVALID_OPERATION</constant> is generated by <function>glGetPixelMapuiv</function> if a non-zero buffer object name is bound to the | |
145 | <constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible | |
146 | into the number of bytes needed to store in memory a GLuint datum. | |
147 | </para> | |
148 | <para> | |
149 | <constant>GL_INVALID_OPERATION</constant> is generated by <function>glGetPixelMapusv</function> if a non-zero buffer object name is bound to the | |
150 | <constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible | |
151 | into the number of bytes needed to store in memory a GLushort datum. | |
152 | </para> | |
153 | <para> | |
154 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetPixelMap</function> | |
155 | is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> | |
156 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. | |
157 | </para> | |
158 | </refsect1> | |
159 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
160 | <para> | |
161 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_I_TO_I_SIZE</constant> | |
162 | </para> | |
163 | <para> | |
164 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_S_TO_S_SIZE</constant> | |
165 | </para> | |
166 | <para> | |
167 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_I_TO_R_SIZE</constant> | |
168 | </para> | |
169 | <para> | |
170 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_I_TO_G_SIZE</constant> | |
171 | </para> | |
172 | <para> | |
173 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_I_TO_B_SIZE</constant> | |
174 | </para> | |
175 | <para> | |
176 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_I_TO_A_SIZE</constant> | |
177 | </para> | |
178 | <para> | |
179 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_R_TO_R_SIZE</constant> | |
180 | </para> | |
181 | <para> | |
182 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_G_TO_G_SIZE</constant> | |
183 | </para> | |
184 | <para> | |
185 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_B_TO_B_SIZE</constant> | |
186 | </para> | |
187 | <para> | |
188 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_MAP_A_TO_A_SIZE</constant> | |
189 | </para> | |
190 | <para> | |
191 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_PIXEL_MAP_TABLE</constant> | |
192 | </para> | |
193 | <para> | |
194 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant> | |
195 | </para> | |
196 | </refsect1> | |
197 | <refsect1 id="seealso"><title>See Also</title> | |
198 | <para> | |
199 | <citerefentry><refentrytitle>glColorSubTable</refentrytitle></citerefentry>, | |
200 | <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>, | |
201 | <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>, | |
202 | <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>, | |
203 | <citerefentry><refentrytitle>glCopyColorSubTable</refentrytitle></citerefentry>, | |
204 | <citerefentry><refentrytitle>glCopyColorTable</refentrytitle></citerefentry>, | |
205 | <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>, | |
206 | <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, | |
207 | <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>, | |
208 | <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>, | |
209 | <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>, | |
210 | <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>, | |
211 | <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>, | |
212 | <citerefentry><refentrytitle>glGetHistogram</refentrytitle></citerefentry>, | |
213 | <citerefentry><refentrytitle>glGetMinmax</refentrytitle></citerefentry>, | |
214 | <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>, | |
215 | <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>, | |
216 | <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>, | |
217 | <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>, | |
218 | <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>, | |
219 | <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, | |
220 | <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, | |
221 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> | |
222 | <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, | |
223 | <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, | |
224 | <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>, | |
225 | <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, | |
226 | <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry> | |
227 | </para> | |
228 | </refsect1> | |
229 | <refsect1 id="Copyright"><title>Copyright</title> | |
230 | <para> | |
231 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
232 | Silicon Graphics, Inc. This document is licensed under the SGI | |
233 | Free Software B License. For details, see | |
234 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
235 | </para> | |
236 | </refsect1> | |
237 | </refentry> |