forked from BSVino/docs.gl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglColorSubTable.xhtml
130 lines (128 loc) · 11.1 KB
/
glColorSubTable.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<div class="refentry" lang="en" xml:lang="en"><a id="glColorSubTable"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glColorSubTable — respecify a portion of a color table</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">void <b class="fsfunc">glColorSubTable</b>(</code></td><td>GLenum </td><td><var class="pdparam">target</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">start</var>, </td></tr><tr><td> </td><td>GLsizei </td><td><var class="pdparam">count</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">format</var>, </td></tr><tr><td> </td><td>GLenum </td><td><var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const GLvoid * </td><td><var class="pdparam">data</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p>
Must be one of
<code class="constant">GL_COLOR_TABLE</code>,
<code class="constant">GL_POST_CONVOLUTION_COLOR_TABLE</code>, or
<code class="constant">GL_POST_COLOR_MATRIX_COLOR_TABLE</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>start</code></em></span></dt><dd><p>
The starting index of the portion of the color table to be replaced.
</p></dd><dt><span class="term"><em class="parameter"><code>count</code></em></span></dt><dd><p>
The number of table entries to replace.
</p></dd><dt><span class="term"><em class="parameter"><code>format</code></em></span></dt><dd><p>
The format of the pixel data in <em class="parameter"><code>data</code></em>.
The allowable values are
<code class="constant">GL_RED</code>,
<code class="constant">GL_GREEN</code>,
<code class="constant">GL_BLUE</code>,
<code class="constant">GL_ALPHA</code>,
<code class="constant">GL_LUMINANCE</code>,
<code class="constant">GL_LUMINANCE_ALPHA</code>,
<code class="constant">GL_RGB</code>,
<code class="constant">GL_BGR</code>,
<code class="constant">GL_RGBA</code>, and
<code class="constant">GL_BGRA</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p>
The type of the pixel data in <em class="parameter"><code>data</code></em>.
The allowable values are
<code class="constant">GL_UNSIGNED_BYTE</code>,
<code class="constant">GL_BYTE</code>,
<code class="constant">GL_UNSIGNED_SHORT</code>,
<code class="constant">GL_SHORT</code>,
<code class="constant">GL_UNSIGNED_INT</code>,
<code class="constant">GL_INT</code>,
<code class="constant">GL_FLOAT</code>,
<code class="constant">GL_UNSIGNED_BYTE_3_3_2</code>,
<code class="constant">GL_UNSIGNED_BYTE_2_3_3_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_6_5_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4</code>,
<code class="constant">GL_UNSIGNED_SHORT_4_4_4_4_REV</code>,
<code class="constant">GL_UNSIGNED_SHORT_5_5_5_1</code>,
<code class="constant">GL_UNSIGNED_SHORT_1_5_5_5_REV</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8</code>,
<code class="constant">GL_UNSIGNED_INT_8_8_8_8_REV</code>,
<code class="constant">GL_UNSIGNED_INT_10_10_10_2</code>, and
<code class="constant">GL_UNSIGNED_INT_2_10_10_10_REV</code>.
</p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
Pointer to a one-dimensional array of pixel data that is processed to
replace the specified region of the color table.
</p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
<code class="function">glColorSubTable</code> is used to respecify a contiguous portion of a color table previously
defined using <a class="citerefentry" href="glColorTable"><span class="citerefentry"><span class="refentrytitle">glColorTable</span></span></a>. The pixels referenced by <em class="parameter"><code>data</code></em> replace the
portion of the existing table from indices <em class="parameter"><code>start</code></em> to
<math overflow="scroll">
<mrow>
<mi mathvariant="italic">start</mi>
<mo>+</mo>
<mi mathvariant="italic">count</mi>
<mo>-</mo>
<mn>1</mn>
</mrow>
</math>,
inclusive. This region may not include any
entries outside the range of the color table as it was originally specified.
It is not an error to specify a subtexture with width of 0, but such a
specification has no effect.
</p><p>
If a non-zero named buffer object is bound to the <code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target
(see <a class="citerefentry" href="glBindBuffer"><span class="citerefentry"><span class="refentrytitle">glBindBuffer</span></span></a>) while a portion of a color table is
respecified, <em class="parameter"><code>data</code></em> is treated as a byte offset into the buffer object's data store.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
<code class="function">glColorSubTable</code> is present only if <code class="code">ARB_imaging</code> is returned when <a class="citerefentry" href="glGetString"><span class="citerefentry"><span class="refentrytitle">glGetString</span></span></a>
is called with an argument of <code class="constant">GL_EXTENSIONS</code>.
</p><p>
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>target</code></em> is not one of the allowable
values.
</p><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>format</code></em> is not one of the allowable
values.
</p><p>
<code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>type</code></em> is not one of the allowable
values.
</p><p>
<code class="constant">GL_INVALID_VALUE</code> is generated if
<math overflow="scroll">
<mrow>
<mrow>
<mi mathvariant="italic">start</mi>
<mo>+</mo>
<mi mathvariant="italic">count</mi>
</mrow>
<mo>></mo>
<mi mathvariant="italic">width</mi>
</mrow>
</math>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
<code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the buffer object's data store is currently mapped.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
<code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and the data would be unpacked from the buffer
object such that the memory reads required would exceed the data store size.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if a non-zero buffer object name is bound to the
<code class="constant">GL_PIXEL_UNPACK_BUFFER</code> target and <em class="parameter"><code>data</code></em> is not evenly divisible
into the number of bytes needed to store in memory a datum indicated by <em class="parameter"><code>type</code></em>.
</p><p>
<code class="constant">GL_INVALID_OPERATION</code> is generated if <code class="function">glColorSubTable</code> is executed
between the execution of <a class="citerefentry" href="glBegin"><span class="citerefentry"><span class="refentrytitle">glBegin</span></span></a> and the corresponding
execution of <a class="citerefentry" href="glEnd"><span class="citerefentry"><span class="refentrytitle">glEnd</span></span></a>.
</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
<a class="citerefentry" href="glGetColorTable"><span class="citerefentry"><span class="refentrytitle">glGetColorTable</span></span></a>,
<a class="citerefentry" href="glGetColorTableParameter"><span class="citerefentry"><span class="refentrytitle">glGetColorTableParameter</span></span></a>
</p><p>
<a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PIXEL_UNPACK_BUFFER_BINDING</code>
</p></div>
{$pipelinestall}{$examples}
<div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
<a class="citerefentry" href="glColorTable"><span class="citerefentry"><span class="refentrytitle">glColorTable</span></span></a>,
<a class="citerefentry" href="glColorTableParameter"><span class="citerefentry"><span class="refentrytitle">glColorTableParameter</span></span></a>,
<a class="citerefentry" href="glCopyColorTable"><span class="citerefentry"><span class="refentrytitle">glCopyColorTable</span></span></a>,
<a class="citerefentry" href="glCopyColorSubTable"><span class="citerefentry"><span class="refentrytitle">glCopyColorSubTable</span></span></a>,
<a class="citerefentry" href="glGetColorTable"><span class="citerefentry"><span class="refentrytitle">glGetColorTable</span></span></a>
</p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
Copyright © 1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
<a class="ulink" href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
</p></div></div></div>