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="glGetColorTableParameter"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glGetColorTableParameter</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glGetColorTableParameter</refname> | |
17 | <refpurpose>get color lookup table parameters</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glGetColorTableParameterfv</function></funcdef> | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
24 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
25 | <paramdef>GLfloat * <parameter>params</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | <funcsynopsis> | |
29 | <funcprototype> | |
30 | <funcdef>void <function>glGetColorTableParameteriv</function></funcdef> | |
31 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
32 | <paramdef>GLenum <parameter>pname</parameter></paramdef> | |
33 | <paramdef>GLint * <parameter>params</parameter></paramdef> | |
34 | </funcprototype> | |
35 | </funcsynopsis> | |
36 | </refsynopsisdiv> | |
37 | <!-- eqn: ignoring delim $$ --> | |
38 | <refsect1 id="parameters"><title>Parameters</title> | |
39 | <variablelist> | |
40 | <varlistentry> | |
41 | <term><parameter>target</parameter></term> | |
42 | <listitem> | |
43 | <para> | |
44 | The target color table. | |
45 | Must be | |
46 | <constant>GL_COLOR_TABLE</constant>, | |
47 | <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, | |
48 | <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>, | |
49 | <constant>GL_PROXY_COLOR_TABLE</constant>, | |
50 | <constant>GL_PROXY_POST_CONVOLUTION_COLOR_TABLE</constant>, or | |
51 | <constant>GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE</constant>. | |
52 | </para> | |
53 | </listitem> | |
54 | </varlistentry> | |
55 | <varlistentry> | |
56 | <term><parameter>pname</parameter></term> | |
57 | <listitem> | |
58 | <para> | |
59 | The symbolic name of a color lookup table parameter. | |
60 | Must be one of | |
61 | <constant>GL_COLOR_TABLE_BIAS</constant>, | |
62 | <constant>GL_COLOR_TABLE_SCALE</constant>, | |
63 | <constant>GL_COLOR_TABLE_FORMAT</constant>, | |
64 | <constant>GL_COLOR_TABLE_WIDTH</constant>, | |
65 | <constant>GL_COLOR_TABLE_RED_SIZE</constant>, | |
66 | <constant>GL_COLOR_TABLE_GREEN_SIZE</constant>, | |
67 | <constant>GL_COLOR_TABLE_BLUE_SIZE</constant>, | |
68 | <constant>GL_COLOR_TABLE_ALPHA_SIZE</constant>, | |
69 | <constant>GL_COLOR_TABLE_LUMINANCE_SIZE</constant>, or | |
70 | <constant>GL_COLOR_TABLE_INTENSITY_SIZE</constant>. | |
71 | </para> | |
72 | </listitem> | |
73 | </varlistentry> | |
74 | <varlistentry> | |
75 | <term><parameter>params</parameter></term> | |
76 | <listitem> | |
77 | <para> | |
78 | A pointer to an array where the values of the parameter will be stored. | |
79 | </para> | |
80 | </listitem> | |
81 | </varlistentry> | |
82 | </variablelist> | |
83 | </refsect1> | |
84 | <refsect1 id="description"><title>Description</title> | |
85 | <para> | |
86 | Returns parameters specific to color table <parameter>target</parameter>. | |
87 | </para> | |
88 | <para> | |
89 | When <parameter>pname</parameter> is set to <constant>GL_COLOR_TABLE_SCALE</constant> or | |
90 | <constant>GL_COLOR_TABLE_BIAS</constant>, <function>glGetColorTableParameter</function> returns the color | |
91 | table scale or bias parameters for the table specified by <parameter>target</parameter>. | |
92 | For these queries, <parameter>target</parameter> must be set to | |
93 | <constant>GL_COLOR_TABLE</constant>, | |
94 | <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, | |
95 | or <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant> and | |
96 | <parameter>params</parameter> points to an array of four elements, which receive | |
97 | the scale or bias factors for red, green, blue, and alpha, in that order. | |
98 | </para> | |
99 | <para> | |
100 | <function>glGetColorTableParameter</function> can also be used to retrieve the format and size parameters | |
101 | for a color table. For these queries, set <parameter>target</parameter> to either the | |
102 | color table target or the proxy color table target. | |
103 | The format and size parameters are set by <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>. | |
104 | </para> | |
105 | <para> | |
106 | The following table lists the format and size parameters that may | |
107 | be queried. | |
108 | For each symbolic constant listed below for <parameter>pname</parameter>, | |
109 | <parameter>params</parameter> must point to an array of the | |
110 | given length and receive the values indicated. | |
111 | </para> | |
112 | <para> | |
113 | </para> | |
114 | <informaltable frame="topbot"> | |
115 | <tgroup cols="3" align="left"> | |
116 | <colspec colwidth="4*" /> | |
117 | <colspec colwidth="1*" align="center"/> | |
118 | <colspec colwidth="3*" /> | |
119 | <thead> | |
120 | <row> | |
121 | <entry rowsep="1" align="left"><emphasis role="bold"> | |
122 | Parameter | |
123 | </emphasis></entry> | |
124 | <entry rowsep="1" align="center"><emphasis role="bold"> | |
125 | N | |
126 | </emphasis></entry> | |
127 | <entry rowsep="1" align="left"><emphasis role="bold"> | |
128 | Meaning | |
129 | </emphasis></entry> | |
130 | </row> | |
131 | </thead> | |
132 | <tbody> | |
133 | <row> | |
134 | <entry align="left"> | |
135 | <constant>GL_COLOR_TABLE_FORMAT</constant> | |
136 | </entry> | |
137 | <entry align="center"> | |
138 | 1 | |
139 | </entry> | |
140 | <entry align="left"> | |
141 | Internal format (e.g., <constant>GL_RGBA</constant>) | |
142 | </entry> | |
143 | </row> | |
144 | <row> | |
145 | <entry align="left"> | |
146 | <constant>GL_COLOR_TABLE_WIDTH</constant> | |
147 | </entry> | |
148 | <entry align="center"> | |
149 | 1 | |
150 | </entry> | |
151 | <entry align="left"> | |
152 | Number of elements in table | |
153 | </entry> | |
154 | </row> | |
155 | <row> | |
156 | <entry align="left"> | |
157 | <constant>GL_COLOR_TABLE_RED_SIZE</constant> | |
158 | </entry> | |
159 | <entry align="center"> | |
160 | 1 | |
161 | </entry> | |
162 | <entry align="left"> | |
163 | Size of red component, in bits | |
164 | </entry> | |
165 | </row> | |
166 | <row> | |
167 | <entry align="left"> | |
168 | <constant>GL_COLOR_TABLE_GREEN_SIZE</constant> | |
169 | </entry> | |
170 | <entry align="center"> | |
171 | 1 | |
172 | </entry> | |
173 | <entry align="left"> | |
174 | Size of green component | |
175 | </entry> | |
176 | </row> | |
177 | <row> | |
178 | <entry align="left"> | |
179 | <constant>GL_COLOR_TABLE_BLUE_SIZE</constant> | |
180 | </entry> | |
181 | <entry align="center"> | |
182 | 1 | |
183 | </entry> | |
184 | <entry align="left"> | |
185 | Size of blue component | |
186 | </entry> | |
187 | </row> | |
188 | <row> | |
189 | <entry align="left"> | |
190 | <constant>GL_COLOR_TABLE_ALPHA_SIZE</constant> | |
191 | </entry> | |
192 | <entry align="center"> | |
193 | 1 | |
194 | </entry> | |
195 | <entry align="left"> | |
196 | Size of alpha component | |
197 | </entry> | |
198 | </row> | |
199 | <row> | |
200 | <entry align="left"> | |
201 | <constant>GL_COLOR_TABLE_LUMINANCE_SIZE</constant> | |
202 | </entry> | |
203 | <entry align="center"> | |
204 | 1 | |
205 | </entry> | |
206 | <entry align="left"> | |
207 | Size of luminance component | |
208 | </entry> | |
209 | </row> | |
210 | <row> | |
211 | <entry align="left"> | |
212 | <constant>GL_COLOR_TABLE_INTENSITY_SIZE</constant> | |
213 | </entry> | |
214 | <entry align="center"> | |
215 | 1 | |
216 | </entry> | |
217 | <entry align="left"> | |
218 | Size of intensity component | |
219 | </entry> | |
220 | </row> | |
221 | </tbody> | |
222 | </tgroup> | |
223 | </informaltable> | |
224 | <para> | |
225 | </para> | |
226 | </refsect1> | |
227 | <refsect1 id="notes"><title>Notes</title> | |
228 | <para> | |
229 | <function>glGetColorTableParameter</function> is present only if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry> | |
230 | is called with an argument of <constant>GL_EXTENSIONS</constant>. | |
231 | </para> | |
232 | </refsect1> | |
233 | <refsect1 id="errors"><title>Errors</title> | |
234 | <para> | |
235 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not | |
236 | an acceptable value. | |
237 | </para> | |
238 | <para> | |
239 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetColorTableParameter</function> is executed | |
240 | between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding | |
241 | execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. | |
242 | </para> | |
243 | </refsect1> | |
244 | <refsect1 id="seealso"><title>See Also</title> | |
245 | <para> | |
246 | <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>, | |
247 | <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>, | |
248 | <citerefentry><refentrytitle>glColorTableParameter</refentrytitle></citerefentry> | |
249 | </para> | |
250 | </refsect1> | |
251 | <refsect1 id="Copyright"><title>Copyright</title> | |
252 | <para> | |
253 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
254 | Silicon Graphics, Inc. This document is licensed under the SGI | |
255 | Free Software B License. For details, see | |
256 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
257 | </para> | |
258 | </refsect1> | |
259 | </refentry> |