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="glFogCoordPointer"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>1991-2006</year> | |
9 | <holder>Silicon Graphics, Inc.</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glFogCoordPointer</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glFogCoordPointer</refname> | |
17 | <refpurpose>define an array of fog coordinates</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glFogCoordPointer</function></funcdef> | |
23 | <paramdef>GLenum <parameter>type</parameter></paramdef> | |
24 | <paramdef>GLsizei <parameter>stride</parameter></paramdef> | |
25 | <paramdef>GLvoid * <parameter>pointer</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | </refsynopsisdiv> | |
29 | <!-- eqn: ignoring delim $$ --> | |
30 | <refsect1 id="parameters"><title>Parameters</title> | |
31 | <variablelist> | |
32 | <varlistentry> | |
33 | <term><parameter>type</parameter></term> | |
34 | <listitem> | |
35 | <para> | |
36 | Specifies the data type of each fog coordinate. | |
37 | Symbolic constants | |
38 | <constant>GL_FLOAT</constant>, | |
39 | or <constant>GL_DOUBLE</constant> | |
40 | are accepted. The initial value is <constant>GL_FLOAT</constant>. | |
41 | </para> | |
42 | </listitem> | |
43 | </varlistentry> | |
44 | <varlistentry> | |
45 | <term><parameter>stride</parameter></term> | |
46 | <listitem> | |
47 | <para> | |
48 | Specifies the byte offset between consecutive fog coordinates. | |
49 | If <parameter>stride</parameter> is 0, the array elements are understood | |
50 | to be tightly packed. The initial value is 0. | |
51 | </para> | |
52 | </listitem> | |
53 | </varlistentry> | |
54 | <varlistentry> | |
55 | <term><parameter>pointer</parameter></term> | |
56 | <listitem> | |
57 | <para> | |
58 | Specifies a pointer to the first coordinate of the first fog coordinate in the | |
59 | array. The initial value is 0. | |
60 | </para> | |
61 | </listitem> | |
62 | </varlistentry> | |
63 | </variablelist> | |
64 | </refsect1> | |
65 | <refsect1 id="description"><title>Description</title> | |
66 | <para> | |
67 | <function>glFogCoordPointer</function> specifies the location and data format of an array of fog coordinates | |
68 | to use when rendering. <parameter>type</parameter> specifies the data type of each fog | |
69 | coordinate, and <parameter>stride</parameter> specifies the byte stride from one fog coordinate to | |
70 | the next, allowing vertices and attributes to be packed into a single array | |
71 | or stored in separate arrays. | |
72 | </para> | |
73 | <para> | |
74 | If a non-zero named buffer object is bound to the <constant>GL_ARRAY_BUFFER</constant> target | |
75 | (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a fog coordinate array is | |
76 | specified, <parameter>pointer</parameter> is treated as a byte offset into the buffer object's data store. | |
77 | Also, the buffer object binding (<constant>GL_ARRAY_BUFFER_BINDING</constant>) is saved as fog coordinate vertex array | |
78 | client-side state (<constant>GL_FOG_COORD_ARRAY_BUFFER_BINDING</constant>). | |
79 | </para> | |
80 | <para> | |
81 | When a fog coordinate array is specified, | |
82 | <parameter>type</parameter>, <parameter>stride</parameter>, and <parameter>pointer</parameter> are saved as client-side | |
83 | state, in addition to the current vertex array buffer object binding. | |
84 | </para> | |
85 | <para> | |
86 | To enable and disable the fog coordinate array, call | |
87 | <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisableClientState</refentrytitle></citerefentry> with the argument | |
88 | <constant>GL_FOG_COORD_ARRAY</constant>. If | |
89 | enabled, the fog coordinate array is used | |
90 | when <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, | |
91 | <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>, or | |
92 | <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry> is called. | |
93 | </para> | |
94 | </refsect1> | |
95 | <refsect1 id="notes"><title>Notes</title> | |
96 | <para> | |
97 | <function>glFogCoordPointer</function> is available only if the GL version is 1.4 or greater. | |
98 | </para> | |
99 | <para> | |
100 | Fog coordinates are not supported for interleaved vertex array formats | |
101 | (see <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>). | |
102 | </para> | |
103 | <para> | |
104 | The fog coordinate array is initially disabled and isn't accessed when | |
105 | <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>, | |
106 | <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry> | |
107 | is called. | |
108 | </para> | |
109 | <para> | |
110 | Execution of <function>glFogCoordPointer</function> is not allowed between the execution of | |
111 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>, | |
112 | but an error may or may not be generated. If no error is generated, | |
113 | the operation is undefined. | |
114 | </para> | |
115 | <para> | |
116 | <function>glFogCoordPointer</function> is typically implemented on the client side with no protocol. | |
117 | </para> | |
118 | <para> | |
119 | Fog coordinate array parameters are client-side state and are | |
120 | therefore not saved or restored by <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPopAttrib</refentrytitle></citerefentry>. | |
121 | Use <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry> and | |
122 | <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry> instead. | |
123 | </para> | |
124 | </refsect1> | |
125 | <refsect1 id="errors"><title>Errors</title> | |
126 | <para> | |
127 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not either <constant>GL_FLOAT</constant> | |
128 | or <constant>GL_DOUBLE</constant>. | |
129 | </para> | |
130 | <para> | |
131 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>stride</parameter> is negative. | |
132 | </para> | |
133 | </refsect1> | |
134 | <refsect1 id="associatedgets"><title>Associated Gets</title> | |
135 | <para> | |
136 | <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY</constant> | |
137 | </para> | |
138 | <para> | |
139 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_STRIDE</constant> | |
140 | </para> | |
141 | <para> | |
142 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_TYPE</constant> | |
143 | </para> | |
144 | <para> | |
145 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_BUFFER_BINDING</constant> | |
146 | </para> | |
147 | <para> | |
148 | <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ARRAY_BUFFER_BINDING</constant> | |
149 | </para> | |
150 | <para> | |
151 | <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_POINTER</constant> | |
152 | </para> | |
153 | </refsect1> | |
154 | <refsect1 id="seealso"><title>See Also</title> | |
155 | <para> | |
156 | <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>, | |
157 | <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>, | |
158 | <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>, | |
159 | <citerefentry><refentrytitle>glDisableClientState</refentrytitle></citerefentry>, | |
160 | <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, | |
161 | <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, | |
162 | <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>, | |
163 | <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>, | |
164 | <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry>, | |
165 | <citerefentry><refentrytitle>glFogCoord</refentrytitle></citerefentry>, | |
166 | <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>, | |
167 | <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>, | |
168 | <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>, | |
169 | <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>, | |
170 | <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>, | |
171 | <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry>, | |
172 | <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>, | |
173 | <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>, | |
174 | <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>, | |
175 | <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>, | |
176 | <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry> | |
177 | </para> | |
178 | </refsect1> | |
179 | <refsect1 id="Copyright"><title>Copyright</title> | |
180 | <para> | |
181 | Copyright <trademark class="copyright"></trademark> 1991-2006 | |
182 | Silicon Graphics, Inc. This document is licensed under the SGI | |
183 | Free Software B License. For details, see | |
184 | <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>. | |
185 | </para> | |
186 | </refsect1> | |
187 | </refentry> |