d04e7fbaccd57b7aad887d2542fb4ff0a5b422e4
[clinton/guile-figl.git] / upstream-man-pages / man2 / glCompressedTexSubImage1D.xml
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="glCompressedTexSubImage1D">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>1991-2006</year>
9 <holder>Silicon Graphics, Inc.</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glCompressedTexSubImage1D</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glCompressedTexSubImage1D</refname>
17 <refpurpose>specify a one-dimensional texture subimage in a compressed format</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glCompressedTexSubImage1D</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLint <parameter>level</parameter></paramdef>
25 <paramdef>GLint <parameter>xoffset</parameter></paramdef>
26 <paramdef>GLsizei <parameter>width</parameter></paramdef>
27 <paramdef>GLenum <parameter>format</parameter></paramdef>
28 <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
29 <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
30 </funcprototype>
31 </funcsynopsis>
32 </refsynopsisdiv>
33 <!-- eqn: ignoring delim $$ -->
34 <refsect1 id="parameters"><title>Parameters</title>
35 <variablelist>
36 <varlistentry>
37 <term><parameter>target</parameter></term>
38 <listitem>
39 <para>
40 Specifies the target texture.
41 Must be <constant>GL_TEXTURE_1D</constant>.
42 </para>
43 </listitem>
44 </varlistentry>
45 <varlistentry>
46 <term><parameter>level</parameter></term>
47 <listitem>
48 <para>
49 Specifies the level-of-detail number.
50 Level 0 is the base image level.
51 Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
52 </para>
53 </listitem>
54 </varlistentry>
55 <varlistentry>
56 <term><parameter>xoffset</parameter></term>
57 <listitem>
58 <para>
59 Specifies a texel offset in the x direction within the texture array.
60 </para>
61 </listitem>
62 </varlistentry>
63 <varlistentry>
64 <term><parameter>width</parameter></term>
65 <listitem>
66 <para>
67 Specifies the width of the texture subimage.
68 </para>
69 </listitem>
70 </varlistentry>
71 <varlistentry>
72 <term><parameter>format</parameter></term>
73 <listitem>
74 <para>
75 Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
76 </para>
77 </listitem>
78 </varlistentry>
79 <varlistentry>
80 <term><parameter>imageSize</parameter></term>
81 <listitem>
82 <para>
83 Specifies the number of unsigned bytes of image data starting at the
84 address specified by <parameter>data</parameter>.
85 </para>
86 </listitem>
87 </varlistentry>
88 <varlistentry>
89 <term><parameter>data</parameter></term>
90 <listitem>
91 <para>
92 Specifies a pointer to the compressed image data in memory.
93 </para>
94 </listitem>
95 </varlistentry>
96 </variablelist>
97 </refsect1>
98 <refsect1 id="description"><title>Description</title>
99 <para>
100 Texturing maps a portion of a specified texture image onto each graphical
101 primitive for which texturing is enabled. To enable and disable
102 one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
103 <constant>GL_TEXTURE_1D</constant>.
104 </para>
105 <para>
106 <function>glCompressedTexSubImage1D</function> redefines a contiguous subregion of an existing one-dimensional
107 texture image. The texels referenced by <parameter>data</parameter> replace the portion of the
108 existing texture array with x indices <parameter>xoffset</parameter> and
109 <inlineequation><mml:math>
110 <!-- eqn: xoffset + width - 1:-->
111 <mml:mrow>
112 <mml:mi mathvariant="italic">xoffset</mml:mi>
113 <mml:mo>+</mml:mo>
114 <mml:mi mathvariant="italic">width</mml:mi>
115 <mml:mo>-</mml:mo>
116 <mml:mn>1</mml:mn>
117 </mml:mrow>
118 </mml:math></inlineequation>,
119 inclusive. This region may not include any texels
120 outside the range of the texture array as it was originally specified. It
121 is not an error to specify a subtexture with width of 0, but such a
122 specification has no effect.
123 </para>
124 <para>
125 <parameter>format</parameter> must be an extension-specified
126 compressed-texture format. The <parameter>format</parameter> of the compressed texture
127 image is selected by the GL implementation that compressed it (see
128 <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>), and should be queried at the time the texture was
129 compressed with <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
130 </para>
131 <para>
132 If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
133 (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
134 specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
135 </para>
136 </refsect1>
137 <refsect1 id="notes"><title>Notes</title>
138 <para>
139 <function>glCompressedTexSubImage1D</function> is available only if the GL version is 1.3 or greater.
140 </para>
141 </refsect1>
142 <refsect1 id="errors"><title>Errors</title>
143 <para>
144 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is one of these generic compressed internal formats:
145 <constant>GL_COMPRESSED_ALPHA</constant>,
146 <constant>GL_COMPRESSED_LUMINANCE</constant>,
147 <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
148 <constant>GL_COMPRESSED_INTENSITY</constant>,
149 <constant>GL_COMPRESSED_RGB</constant>,
150 <constant>GL_COMPRESSED_RGBA</constant>,
151 <constant>GL_COMPRESSED_SLUMINANCE</constant>,
152 <constant>GL_COMPRESSED_SLUMINANCE_ALPHA</constant>,
153 <constant>GL_COMPRESSED_SRGB</constant>,
154 <constant>GL_COMPRESSED_SRGBA</constant>, or
155 <constant>GL_COMPRESSED_SRGB_ALPHA</constant>.
156 </para>
157 <para>
158 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
159 the format, dimensions, and contents of the specified compressed image
160 data.
161 </para>
162 <para>
163 <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
164 supported by the specific compressed internal format as specified in the
165 specific texture compression extension.
166 </para>
167 <para>
168 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
169 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
170 </para>
171 <para>
172 <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
173 <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
174 object such that the memory reads required would exceed the data store size.
175 </para>
176 <para>
177 <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexSubImage1D</function>
178 is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
179 and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
180 </para>
181 <para>
182 Undefined results, including abnormal program termination, are generated if
183 <parameter>data</parameter> is not encoded in a manner consistent with the extension
184 specification defining the internal compression format.
185 </para>
186 </refsect1>
187 <refsect1 id="associatedgets"><title>Associated Gets</title>
188 <para>
189 <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
190 </para>
191 <para>
192 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
193 </para>
194 <para>
195 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
196 </para>
197 <para>
198 <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
199 and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
200 </para>
201 <para>
202 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
203 </para>
204 </refsect1>
205 <refsect1 id="seealso"><title>See Also</title>
206 <para>
207 <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
208 <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
209 <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
210 <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
211 <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
212 <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
213 <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
214 <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
215 <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
216 <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
217 <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
218 <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
219 <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
220 <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
221 <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
222 <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
223 <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
224 <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
225 <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
226 <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
227 <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
228 <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
229 <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
230 <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
231 <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
232 <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>
233 </para>
234 </refsect1>
235 <refsect1 id="Copyright"><title>Copyright</title>
236 <para>
237 Copyright <trademark class="copyright"></trademark> 1991-2006
238 Silicon Graphics, Inc. This document is licensed under the SGI
239 Free Software B License. For details, see
240 <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
241 </para>
242 </refsect1>
243 </refentry>