mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-27 01:25:53 +00:00
188 lines
11 KiB
XML
188 lines
11 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
|
||
|
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
|
||
|
<refentry id="glFogCoordPointer">
|
||
|
<refmeta>
|
||
|
<refmetainfo>
|
||
|
<copyright>
|
||
|
<year>1991-2006</year>
|
||
|
<holder>Silicon Graphics, Inc.</holder>
|
||
|
</copyright>
|
||
|
</refmetainfo>
|
||
|
<refentrytitle>glFogCoordPointer</refentrytitle>
|
||
|
<manvolnum>3G</manvolnum>
|
||
|
</refmeta>
|
||
|
<refnamediv>
|
||
|
<refname>glFogCoordPointer</refname>
|
||
|
<refpurpose>define an array of fog coordinates</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsynopsisdiv><title>C Specification</title>
|
||
|
<funcsynopsis>
|
||
|
<funcprototype>
|
||
|
<funcdef>void <function>glFogCoordPointer</function></funcdef>
|
||
|
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||
|
<paramdef>GLsizei <parameter>stride</parameter></paramdef>
|
||
|
<paramdef>GLvoid * <parameter>pointer</parameter></paramdef>
|
||
|
</funcprototype>
|
||
|
</funcsynopsis>
|
||
|
</refsynopsisdiv>
|
||
|
<!-- eqn: ignoring delim $$ -->
|
||
|
<refsect1 id="parameters"><title>Parameters</title>
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>type</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies the data type of each fog coordinate.
|
||
|
Symbolic constants
|
||
|
<constant>GL_FLOAT</constant>,
|
||
|
or <constant>GL_DOUBLE</constant>
|
||
|
are accepted. The initial value is <constant>GL_FLOAT</constant>.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>stride</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies the byte offset between consecutive fog coordinates.
|
||
|
If <parameter>stride</parameter> is 0, the array elements are understood
|
||
|
to be tightly packed. The initial value is 0.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>pointer</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specifies a pointer to the first coordinate of the first fog coordinate in the
|
||
|
array. The initial value is 0.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</refsect1>
|
||
|
<refsect1 id="description"><title>Description</title>
|
||
|
<para>
|
||
|
<function>glFogCoordPointer</function> specifies the location and data format of an array of fog coordinates
|
||
|
to use when rendering. <parameter>type</parameter> specifies the data type of each fog
|
||
|
coordinate, and <parameter>stride</parameter> specifies the byte stride from one fog coordinate to
|
||
|
the next, allowing vertices and attributes to be packed into a single array
|
||
|
or stored in separate arrays.
|
||
|
</para>
|
||
|
<para>
|
||
|
If a non-zero named buffer object is bound to the <constant>GL_ARRAY_BUFFER</constant> target
|
||
|
(see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a fog coordinate array is
|
||
|
specified, <parameter>pointer</parameter> is treated as a byte offset into the buffer object's data store.
|
||
|
Also, the buffer object binding (<constant>GL_ARRAY_BUFFER_BINDING</constant>) is saved as fog coordinate vertex array
|
||
|
client-side state (<constant>GL_FOG_COORD_ARRAY_BUFFER_BINDING</constant>).
|
||
|
</para>
|
||
|
<para>
|
||
|
When a fog coordinate array is specified,
|
||
|
<parameter>type</parameter>, <parameter>stride</parameter>, and <parameter>pointer</parameter> are saved as client-side
|
||
|
state, in addition to the current vertex array buffer object binding.
|
||
|
</para>
|
||
|
<para>
|
||
|
To enable and disable the fog coordinate array, call
|
||
|
<citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisableClientState</refentrytitle></citerefentry> with the argument
|
||
|
<constant>GL_FOG_COORD_ARRAY</constant>. If
|
||
|
enabled, the fog coordinate array is used
|
||
|
when <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>, or
|
||
|
<citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry> is called.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="notes"><title>Notes</title>
|
||
|
<para>
|
||
|
<function>glFogCoordPointer</function> is available only if the GL version is 1.4 or greater.
|
||
|
</para>
|
||
|
<para>
|
||
|
Fog coordinates are not supported for interleaved vertex array formats
|
||
|
(see <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>).
|
||
|
</para>
|
||
|
<para>
|
||
|
The fog coordinate array is initially disabled and isn't accessed when
|
||
|
<citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>
|
||
|
is called.
|
||
|
</para>
|
||
|
<para>
|
||
|
Execution of <function>glFogCoordPointer</function> is not allowed between the execution of
|
||
|
<citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>,
|
||
|
but an error may or may not be generated. If no error is generated,
|
||
|
the operation is undefined.
|
||
|
</para>
|
||
|
<para>
|
||
|
<function>glFogCoordPointer</function> is typically implemented on the client side with no protocol.
|
||
|
</para>
|
||
|
<para>
|
||
|
Fog coordinate array parameters are client-side state and are
|
||
|
therefore not saved or restored by <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPopAttrib</refentrytitle></citerefentry>.
|
||
|
Use <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry> and
|
||
|
<citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry> instead.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="errors"><title>Errors</title>
|
||
|
<para>
|
||
|
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not either <constant>GL_FLOAT</constant>
|
||
|
or <constant>GL_DOUBLE</constant>.
|
||
|
</para>
|
||
|
<para>
|
||
|
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>stride</parameter> is negative.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY</constant>
|
||
|
</para>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_STRIDE</constant>
|
||
|
</para>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_TYPE</constant>
|
||
|
</para>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_BUFFER_BINDING</constant>
|
||
|
</para>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ARRAY_BUFFER_BINDING</constant>
|
||
|
</para>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry> with argument <constant>GL_FOG_COORD_ARRAY_POINTER</constant>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="seealso"><title>See Also</title>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glDisableClientState</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glFogCoord</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="Copyright"><title>Copyright</title>
|
||
|
<para>
|
||
|
Copyright <trademark class="copyright"></trademark> 1991-2006
|
||
|
Silicon Graphics, Inc. This document is licensed under the SGI
|
||
|
Free Software B License. For details, see
|
||
|
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
</refentry>
|