Settings.DefaultEnumsFile = "GLEnums.cs";
Settings.DefaultWrappersFile = "GL.cs";
Settings.DefaultDocPath = Path.Combine(
- Settings.DefaultDocPath, "GL2");
+ Settings.DefaultDocPath, "GL");
}
}
}
Settings.DefaultEnumsFile = "GL4Enums.cs";
Settings.DefaultWrappersFile = "GL4.cs";
Settings.DefaultDocPath = Path.Combine(
- Settings.DefaultDocPath, "GL4");
+ Settings.DefaultDocPath, "GL");
Profile = "glcore";
}
</refsect1>
<refsect1 id="notes"><title>Notes</title>
<para>
- <function>glMultiTexCoord</function> is only supported if the GL version is 1.3 or greater, or if
- <code>ARB_multitexture</code> is included in the string returned by
- <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry> when called with the argument <constant>GL_EXTENSIONS</constant>.
- </para>
- <para>
The current texture coordinates can be updated at any time.
- In particular,
- <function>glMultiTexCoord</function> can be called between a call to <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- call to <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
</para>
<para>
It is always the case that <constant>GL_TEXTURE</constant>
<refsect1 id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glTexCoord</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry>
</para>
</refsect1>
+++ /dev/null
-<?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="glActiveTexture">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glActiveTexture</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glActiveTexture</refname>
- <refpurpose>select active texture unit</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glActiveTexture</function></funcdef>
- <paramdef>GLenum <parameter>texture</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>texture</parameter></term>
- <listitem>
- <para>
- Specifies which texture unit to make active. The number
- of texture units is implementation dependent, but must be at least
- two. <parameter>texture</parameter> must be one of
- <constant>GL_TEXTURE</constant><inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>,
- where
- i ranges from 0 to the larger of (<constant>GL_MAX_TEXTURE_COORDS</constant> - 1)
- and (<constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant> - 1).
- The initial value is <constant>GL_TEXTURE0</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glActiveTexture</function> selects which texture unit subsequent texture state calls will
- affect. The number of texture units an implementation supports is
- implementation dependent, but must be at least 2.
- </para>
- <para>
- Vertex arrays are client-side GL resources, which are selected by the
- <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry> routine.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glActiveTexture</function> is only supported if the GL version is 1.3 or greater, or if
- <code>ARB_multitexture</code> is included in the string returned by
- <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry> when called with the argument <constant>GL_EXTENSIONS</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>texture</parameter> is not one of
- <constant>GL_TEXTURE</constant><inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>,
- where i ranges from 0 to the larger of (<constant>GL_MAX_TEXTURE_COORDS</constant> - 1)
- and (<constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant> - 1).
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ACTIVE_TEXTURE</constant>, <constant>GL_MAX_TEXTURE_COORDS</constant>, or <constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glAttachShader">
- <refmeta>
- <refentrytitle>glAttachShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glAttachShader</refname>
- <refpurpose>Attaches a shader object to a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glAttachShader</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to which a shader
- object will be attached.</para>
- </listitem>
-
- </varlistentry>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object that is to be attached.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>In order to create an executable, there must be a way to
- specify the list of things that will be linked together. Program
- objects provide this mechanism. Shaders that are to be linked
- together in a program object must first be attached to that
- program object. <function>glAttachShader</function> attaches the
- shader object specified by <parameter>shader</parameter> to the
- program object specified by <parameter>program</parameter>. This
- indicates that <parameter>shader</parameter> will be included in
- link operations that will be performed on
- <parameter>program</parameter>.</para>
-
- <para>All operations that can be performed on a shader object
- are valid whether or not the shader object is attached to a
- program object. It is permissible to attach a shader object to a
- program object before source code has been loaded into the
- shader object or before the shader object has been compiled. It
- is permissible to attach multiple shader objects of the same
- type because each may contain a portion of the complete shader.
- It is also permissible to attach a shader object to more than
- one program object. If a shader object is deleted while it is
- attached to a program object, it will be flagged for deletion,
- and deletion will not occur until
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>
- is called to detach it from all program objects to which it is
- attached.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glAttachShader</function>
- is available only if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if either
- <parameter>program</parameter> or <parameter>shader</parameter>
- is not a value generated by OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not a shader object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is already attached to
- <parameter>program</parameter>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glAttachShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with the handle of a valid program object</para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glBeginQuery">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBeginQuery</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBeginQuery</refname>
- <refpurpose>delimit the boundaries of a query object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBeginQuery</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLuint <parameter>id</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target type of query object established between
- <function>glBeginQuery</function> and the subsequent <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>.
- The symbolic constant must be <constant>GL_SAMPLES_PASSED</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>id</parameter></term>
- <listitem>
- <para>
- Specifies the name of a query object.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glEndQuery</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target type of query object to be concluded.
- The symbolic constant must be <constant>GL_SAMPLES_PASSED</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glBeginQuery</function> and <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry> delimit the
- boundaries of a query object. If a query object with name <parameter>id</parameter> does not yet exist it is created.
- </para>
- <para>
- When <function>glBeginQuery</function> is executed, the query object's samples-passed counter is reset to 0. Subsequent
- rendering will increment the counter once for every sample that passes the depth test. When <function>glEndQuery</function>
- is executed, the samples-passed counter is assigned to the query object's result value. This value can be queried by
- calling <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry> with <parameter>pname</parameter>
- <constant>GL_QUERY_RESULT</constant>.
- </para>
- <para>
- Querying the <constant>GL_QUERY_RESULT</constant> implicitly flushes the GL pipeline until the rendering delimited by the
- query object has completed and the result is available. <constant>GL_QUERY_RESULT_AVAILABLE</constant> can be queried to
- determine if the result is immediately available or if the rendering is not yet complete.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If the samples-passed count exceeds the maximum value representable in the number of available bits, as reported by
- <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry> with <parameter>pname</parameter>
- <constant>GL_QUERY_COUNTER_BITS</constant>, the count becomes undefined.
- </para>
- <para>
- An implementation may support 0 bits in its samples-passed counter, in which case query results are always undefined
- and essentially useless.
- </para>
- <para>
- When <constant>GL_SAMPLE_BUFFERS</constant> is 0, the samples-passed counter will increment once for each fragment that passes
- the depth test. When <constant>GL_SAMPLE_BUFFERS</constant> is 1, an implementation may either increment the samples-passed
- counter individually for each sample of a fragment that passes the depth test, or it may choose to increment the counter for
- all samples of a fragment if any one of them passes the depth test.
- </para>
- <para>
- <function>glBeginQuery</function> and <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>
- are available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_SAMPLES_PASSED</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBeginQuery</function> is executed while
- a query object of the same <parameter>target</parameter> is already active.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>
- is executed when a query object of the same <parameter>target</parameter> is not active.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is 0.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name of an already active query object.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBeginQuery</function> or
- <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry> is executed between the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glDeleteQueries</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glBindAttribLocation">
- <refmeta>
- <refentrytitle>glBindAttribLocation</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBindAttribLocation</refname>
- <refpurpose>Associates a generic vertex attribute index with a named attribute variable</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBindAttribLocation</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLchar *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the handle of the program object in
- which the association is to be made.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the generic vertex
- attribute to be bound.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>name</parameter></term>
- <listitem>
- <para>Specifies a null terminated string containing
- the name of the vertex shader attribute variable to
- which <parameter>index</parameter> is to be
- bound.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glBindAttribLocation</function> is used to
- associate a user-defined attribute variable in the program
- object specified by <parameter>program</parameter> with a
- generic vertex attribute index. The name of the user-defined
- attribute variable is passed as a null terminated string in
- <parameter>name</parameter>. The generic vertex attribute index
- to be bound to this variable is specified by
- <parameter>index</parameter>. When
- <parameter>program</parameter> is made part of current state,
- values provided via the generic vertex attribute
- <parameter>index</parameter> will modify the value of the
- user-defined attribute variable specified by
- <parameter>name</parameter>.</para>
-
- <para>If <parameter>name</parameter> refers to a matrix
- attribute variable, <parameter>index</parameter> refers to the
- first column of the matrix. Other matrix columns are then
- automatically bound to locations <parameter>index+1</parameter>
- for a matrix of type mat2; <parameter>index+1</parameter> and
- <parameter>index+2</parameter> for a matrix of type mat3; and
- <parameter>index+1</parameter>, <parameter>index+2</parameter>,
- and <parameter>index+3</parameter> for a matrix of type
- mat4.</para>
-
- <para>This command makes it possible for vertex shaders to use
- descriptive names for attribute variables rather than generic
- variables that are numbered from 0 to
- <constant>GL_MAX_VERTEX_ATTRIBS</constant> -1. The values sent
- to each generic attribute index are part of current state, just
- like standard vertex attributes such as color, normal, and
- vertex position. If a different program object is made current
- by calling
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>,
- the generic vertex attributes are tracked in such a way that the
- same values will be observed by attributes in the new program
- object that are also bound to
- <parameter>index</parameter>.</para> <para>Attribute variable
- name-to-generic attribute index bindings for a program object
- can be explicitly assigned at any time by calling
- <function>glBindAttribLocation</function>. Attribute bindings do
- not go into effect until
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
- is called. After a program object has been linked successfully,
- the index values for generic attributes remain fixed (and their
- values can be queried) until the next link command
- occurs.</para>
-
- <para>Applications are not allowed to bind any of the standard
- OpenGL vertex attributes using this command, as they are bound
- automatically when needed. Any attribute binding that occurs
- after the program object has been linked will not take effect
- until the next time the program object is linked.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glBindAttribLocation</function> is available
- only if the GL version is 2.0 or greater.</para>
-
- <para><function>glBindAttribLocation</function> can be called
- before any vertex shader objects are bound to the specified
- program object. It is also permissible to bind a generic
- attribute index to an attribute variable name that is never used
- in a vertex shader.</para>
-
- <para>If <parameter>name</parameter> was bound previously, that
- information is lost. Thus you cannot bind one user-defined
- attribute variable to multiple indices, but you can bind
- multiple user-defined attribute variables to the same
- index.</para>
-
- <para>Applications are allowed to bind more than one
- user-defined attribute variable to the same generic vertex
- attribute index. This is called <emphasis>aliasing</emphasis>,
- and it is allowed only if just one of the aliased attributes is
- active in the executable program, or if no path through the
- shader consumes more than one attribute of a set of attributes
- aliased to the same location. The compiler and linker are
- allowed to assume that no aliasing is done and are free to
- employ optimizations that work only in the absence of aliasing.
- OpenGL implementations are not required to do error checking to
- detect aliasing. Because there is no way to bind standard
- attributes, it is not possible to alias generic attributes with
- conventional ones (except for generic attribute 0).</para>
-
- <para>Active attributes that are not explicitly bound will be
- bound by the linker when
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
- is called. The locations assigned can be queried by calling
- <citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>.</para>
-
- <para>OpenGL copies the <parameter>name</parameter> string when
- <function>glBindAttribLocation</function> is called, so an
- application may free its copy of the <parameter>name</parameter>
- string immediately after the function returns.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>name</parameter> starts with the reserved prefix
- "gl_".</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glBindAttribLocation</function> is executed between
- the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_ATTRIBS</constant></para>
-
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <parameter>name</parameter></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glDisableVertexAttribArray</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnableVertexAttribArray</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glBindBuffer">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBindBuffer</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBindBuffer</refname>
- <refpurpose>bind a named buffer object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBindBuffer</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLuint <parameter>buffer</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target to which the buffer object is bound.
- The symbolic constant must be
- <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>buffer</parameter></term>
- <listitem>
- <para>
- Specifies the name of a buffer object.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glBindBuffer</function> lets you create or use a named buffer object. Calling <function>glBindBuffer</function> with
- <parameter>target</parameter> set to
- <constant>GL_ARRAY_BUFFER</constant>, <constant>GL_ELEMENT_ARRAY_BUFFER</constant>, <constant>GL_PIXEL_PACK_BUFFER</constant> or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> and <parameter>buffer</parameter> set to the name
- of the new buffer object binds the buffer object name to the target.
- When a buffer object is bound to a target, the previous binding for that
- target is automatically broken.
- </para>
- <para>
- Buffer object names are unsigned integers. The value zero is reserved, but
- there is no default buffer object for each buffer object target. Instead, <parameter>buffer</parameter> set to zero
- effectively unbinds any buffer object previously bound, and restores client memory usage for that buffer object target.
- Buffer object names and the corresponding buffer object contents are local to
- the shared display-list space (see <citerefentry><refentrytitle>glXCreateContext</refentrytitle></citerefentry>) of the current
- GL rendering context;
- two rendering contexts share buffer object names only if they
- also share display lists.
- </para>
- <para>
- You may use <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry> to generate a set of new buffer object names.
- </para>
- <para>
- The state of a buffer object immediately after it is first bound is an unmapped zero-sized memory buffer with
- <constant>GL_READ_WRITE</constant> access and <constant>GL_STATIC_DRAW</constant> usage.
- </para>
- <para>
- While a non-zero buffer object name is bound, GL operations on the target to which it is
- bound affect the bound buffer object, and queries of the target to which it is bound return state
- from the bound buffer object. While buffer object name zero is bound, as in the initial state,
- attempts to modify or query state on the target to which it is bound generates an
- <constant>GL_INVALID_OPERATION</constant> error.
- </para>
- <para>
- When vertex array pointer state is changed, for example by a call to
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- the current buffer object binding (<constant>GL_ARRAY_BUFFER_BINDING</constant>) is copied into the
- corresponding client state for the vertex array type being changed, for example
- <constant>GL_NORMAL_ARRAY_BUFFER_BINDING</constant>. While a non-zero buffer object is bound to the
- <constant>GL_ARRAY_BUFFER</constant> target, the vertex array pointer parameter that is traditionally
- interpreted as a pointer to client-side memory is instead interpreted as an offset within the
- buffer object measured in basic machine units.
- </para>
- <para>
- While a non-zero buffer object is bound to the <constant>GL_ELEMENT_ARRAY_BUFFER</constant> target,
- the indices parameter of <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>, or
- <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry> that is traditionally
- interpreted as a pointer to client-side memory is instead interpreted as an offset within the
- buffer object measured in basic machine units.
- </para>
- <para>
- While a non-zero buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target,
- the following commands are affected: <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetHistogram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetMinmax</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPixelMap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPolygonStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetSeparableFilter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>. The pointer parameter that is
- traditionally interpreted as a pointer to client-side memory where the pixels are to be packed is instead
- interpreted as an offset within the buffer object measured in basic machine units.
- </para>
- <para>
- While a non-zero buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target,
- the following commands are affected: <citerefentry><refentrytitle>glBitmap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorSubTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>. The pointer parameter that is
- traditionally interpreted as a pointer to client-side memory from which the pixels are to be unpacked is
- instead interpreted as an offset within the buffer object measured in basic machine units.
- </para>
- <para>
- A buffer object binding created with <function>glBindBuffer</function> remains active until a different
- buffer object name is bound to the same target, or until the bound buffer object is
- deleted with <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>.
- </para>
- <para>
- Once created, a named buffer object may be re-bound to any target as often as needed. However,
- the GL implementation may make choices about how to optimize the storage of a buffer object based
- on its initial binding target.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBindBuffer</function> is available only if the GL version is 1.5 or greater.
- </para>
- <para>
- <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are
- available only if the GL version is 2.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the allowable
- values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBindBuffer</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ARRAY_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ELEMENT_ARRAY_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glBindTexture">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBindTexture</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBindTexture</refname>
- <refpurpose>bind a named texture to a texturing target</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBindTexture</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLuint <parameter>texture</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target to which the texture is bound.
- Must be either
- <constant>GL_TEXTURE_1D</constant>,
- <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_3D</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>texture</parameter></term>
- <listitem>
- <para>
- Specifies the name of a texture.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glBindTexture</function> lets you create or use a named texture. Calling <function>glBindTexture</function> with
- <parameter>target</parameter> set to
- <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant> or
- <constant>GL_TEXTURE_CUBE_MAP</constant> and <parameter>texture</parameter> set to the name
- of the new texture binds the texture name to the target.
- When a texture is bound to a target, the previous binding for that
- target is automatically broken.
- </para>
- <para>
- Texture names are unsigned integers. The value zero is reserved to
- represent the default texture for each texture target.
- Texture names and the corresponding texture contents are local to
- the shared display-list space (see <citerefentry><refentrytitle>glXCreateContext</refentrytitle></citerefentry>) of the current
- GL rendering context;
- two rendering contexts share texture names only if they
- also share display lists.
- </para>
- <para>
- You may use <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry> to generate a set of new texture names.
- </para>
- <para>
- When a texture is first bound, it assumes the specified target:
- A texture first bound to <constant>GL_TEXTURE_1D</constant> becomes one-dimensional texture, a
- texture first bound to <constant>GL_TEXTURE_2D</constant> becomes two-dimensional texture, a
- texture first bound to <constant>GL_TEXTURE_3D</constant> becomes three-dimensional texture, and a
- texture first bound to <constant>GL_TEXTURE_CUBE_MAP</constant>
- becomes a cube-mapped texture. The state of a one-dimensional texture
- immediately after it is first bound is equivalent to the state of the
- default <constant>GL_TEXTURE_1D</constant> at GL initialization, and similarly for two-
- and three-dimensional textures and cube-mapped textures.
- </para>
- <para>
- While a texture is bound, GL operations on the target to which it is
- bound affect the bound texture, and queries of the target to which it
- is bound return state from the bound texture. If texture mapping is active
- on the target to which a texture is bound, the bound texture is used.
- In effect, the texture targets become aliases for the textures currently
- bound to them, and the texture name zero refers to the default textures
- that were bound to them at initialization.
- </para>
- <para>
- A texture binding created with <function>glBindTexture</function> remains active until a different
- texture is bound to the same target, or until the bound texture is
- deleted with <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>.
- </para>
- <para>
- Once created, a named texture may be re-bound to its same original target as often as needed.
- It is usually much faster to use <function>glBindTexture</function> to bind an existing named
- texture to one of the texture targets than it is to reload the texture image
- using <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>.
- For additional control over performance, use
- <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>.
- </para>
- <para>
- <function>glBindTexture</function> is included in display lists.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBindTexture</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_CUBE_MAP</constant> is available only if the GL version is 1.3 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the allowable
- values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> was previously created with a target
- that doesn't match that of <parameter>target</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBindTexture</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BINDING_1D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BINDING_2D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BINDING_3D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glBlendColor">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBlendColor</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBlendColor</refname>
- <refpurpose>set the blend color</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBlendColor</function></funcdef>
- <paramdef>GLclampf <parameter>red</parameter></paramdef>
- <paramdef>GLclampf <parameter>green</parameter></paramdef>
- <paramdef>GLclampf <parameter>blue</parameter></paramdef>
- <paramdef>GLclampf <parameter>alpha</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>red</parameter></term>
- <term><parameter>green</parameter></term>
- <term><parameter>blue</parameter></term>
- <term><parameter>alpha</parameter></term>
- <listitem>
- <para>
- specify the components of <constant>GL_BLEND_COLOR</constant>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- The <constant>GL_BLEND_COLOR</constant> may be used to calculate the source and destination
- blending factors. The color components are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- before being stored. See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> for a complete description of the
- blending operations.
- Initially the <constant>GL_BLEND_COLOR</constant> is set to (0, 0, 0, 0).
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBlendColor</function> is part of the <code>ARB_imaging</code> subset. <function>glBlendColor</function> is present only
- if <code>ARB_imaging</code> is returned when <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry> is called with
- <constant>GL_EXTENSIONS</constant> as its argument.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBlendColor</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_COLOR</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBlendEquation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetString</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>
+++ /dev/null
-<?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="glBlendEquation">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBlendEquation</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBlendEquation</refname>
- <refpurpose>specify the equation used for both the RGB blend equation and the Alpha blend equation</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBlendEquation</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- specifies how source and destination colors are combined.
- It must be <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>,
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>, <constant>GL_MIN</constant>, <constant>GL_MAX</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- The blend equations determine how a new pixel (the ''source'' color)
- is combined with a pixel already in the framebuffer (the ''destination''
- color). This function sets both the RGB blend equation and the alpha
- blend equation to a single equation.
- </para>
- <para>
- These equations use the source and destination blend factors
- specified by either <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> or
- <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>
- for a description of the various blend factors.
- </para>
- <para>
- In the equations that follow, source and destination
- color components are referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub s, G sub s, B sub s, A sub s ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( R sub d, G sub d, B sub d, A sub d ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- respectively.
- The result color is referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub r, G sub r, B sub r, A sub r ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The source and destination blend factors are denoted
- <inlineequation><mml:math>
- <!-- eqn: ( s sub R, s sub G, s sub B, s sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( d sub R, d sub G, d sub B, d sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- respectively.
- For these equations all color components are understood to have values
- in the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
-
- <informaltable frame="topbot">
- <tgroup cols="3" align="left">
- <colspec colwidth="1.1*" />
- <colspec colwidth="1*" />
- <colspec colwidth="1*" />
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Mode
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- RGB Components
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Alpha Component
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_FUNC_ADD</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = R sub s s sub R + R sub d d sub R :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = G sub s s sub G + G sub d d sub G :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = B sub s s sub B + B sub d d sub B :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = A sub s s sub A + A sub d d sub A :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FUNC_SUBTRACT</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = R sub s s sub R - R sub d d sub R :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = G sub s s sub G - G sub d d sub G :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = B sub s s sub B - B sub d d sub B :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = A sub s s sub A - A sub d d sub A :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = R sub d d sub R - R sub s s sub R :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = G sub d d sub G - G sub s s sub G :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = B sub d d sub B - B sub s s sub B :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = A sub d d sub A - A sub s s sub A :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MIN</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = min ( R sub s, R sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = min ( G sub s, G sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = min ( B sub s, B sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = min ( A sub s, A sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAX</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = max ( R sub s, R sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = max ( G sub s, G sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = max ( B sub s, B sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = max ( A sub s, A sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
- <para>
- The results of these equations are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- <para>
- The <constant>GL_MIN</constant> and <constant>GL_MAX</constant> equations are useful for applications
- that analyze image data (image thresholding against a constant color,
- for example).
- The <constant>GL_FUNC_ADD</constant> equation is useful
- for antialiasing and transparency, among other things.
- </para>
- <para>
- Initially, both the RGB blend equation and the alpha blend equation are set to <constant>GL_FUNC_ADD</constant>.
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- The <constant>GL_MIN</constant>, and <constant>GL_MAX</constant> equations do not use
- the source or destination factors, only the source and destination colors.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not one of
- <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>, <constant>GL_FUNC_REVERSE_SUBTRACT</constant>,
- <constant>GL_MAX</constant>, or <constant>GL_MIN</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBlendEquation</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_EQUATION_RGB</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_EQUATION_ALPHA</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>
- <citerefentry><refentrytitle>glBlendFuncSeparate</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>
+++ /dev/null
-<?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="glBlendEquationSeparate">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBlendEquationSeparate</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBlendEquationSeparate</refname>
- <refpurpose>set the RGB blend equation and the alpha blend equation separately</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBlendEquationSeparate</function></funcdef>
- <paramdef>GLenum <parameter>modeRGB</parameter></paramdef>
- <paramdef>GLenum <parameter>modeAlpha</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>modeRGB</parameter></term>
- <listitem>
- <para>
- specifies the RGB blend equation, how the red, green, and blue components of the source and destination colors are combined.
- It must be <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>,
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>, <constant>GL_MIN</constant>, <constant>GL_MAX</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>modeAlpha</parameter></term>
- <listitem>
- <para>
- specifies the alpha blend equation, how the alpha component of the source and destination colors are combined.
- It must be <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>,
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>, <constant>GL_MIN</constant>, <constant>GL_MAX</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- The blend equations determines how a new pixel (the ''source'' color)
- is combined with a pixel already in the framebuffer (the ''destination''
- color). This function specifies one blend equation for the RGB-color
- components and one blend equation for the alpha component.
- </para>
- <para>
- The blend equations use the source and destination blend factors
- specified by either <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> or
- <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>
- for a description of the various blend factors.
- </para>
- <para>
- In the equations that follow, source and destination
- color components are referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub s, G sub s, B sub s, A sub s ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( R sub d, G sub d, B sub d, A sub d ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- respectively.
- The result color is referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub r, G sub r, B sub r, A sub r ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">r</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The source and destination blend factors are denoted
- <inlineequation><mml:math>
- <!-- eqn: ( s sub R, s sub G, s sub B, s sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( d sub R, d sub G, d sub B, d sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- respectively.
- For these equations all color components are understood to have values
- in the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
-
- <informaltable frame="topbot">
- <tgroup cols="3" align="left">
- <colspec colwidth="1.1*" />
- <colspec colwidth="1*" />
- <colspec colwidth="1*" />
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Mode
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- RGB Components
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Alpha Component
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_FUNC_ADD</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = R sub s s sub R + R sub d d sub R :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = G sub s s sub G + G sub d d sub G :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = B sub s s sub B + B sub d d sub B :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = A sub s s sub A + A sub d d sub A :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FUNC_SUBTRACT</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = R sub s s sub R - R sub d d sub R :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = G sub s s sub G - G sub d d sub G :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = B sub s s sub B - B sub d d sub B :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = A sub s s sub A - A sub d d sub A :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = R sub d d sub R - R sub s s sub R :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = G sub d d sub G - G sub s s sub G :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = B sub d d sub B - B sub s s sub B :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = A sub d d sub A - A sub s s sub A :-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MIN</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = min ( R sub s, R sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = min ( G sub s, G sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = min ( B sub s, B sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = min ( A sub s, A sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAX</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Rr = max ( R sub s, R sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Rr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Gr = max ( G sub s, G sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Gr</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- <informalequation><mml:math>
- <!-- eqn: Br = max ( B sub s, B sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Br</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: Ar = max ( A sub s, A sub d):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">Ar</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
- <para>
- The results of these equations are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- <para>
- The <constant>GL_MIN</constant> and <constant>GL_MAX</constant> equations are useful for applications
- that analyze image data (image thresholding against a constant color,
- for example).
- The <constant>GL_FUNC_ADD</constant> equation is useful
- for antialiasing and transparency, among other things.
- </para>
- <para>
- Initially, both the RGB blend equation and the alpha blend equation are set to <constant>GL_FUNC_ADD</constant>.
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBlendEquationSeparate</function> is available only if the GL version is 2.0 or greater.
- </para>
- <para>
- The <constant>GL_MIN</constant>, and <constant>GL_MAX</constant> equations do not use
- the source or destination factors, only the source and destination colors.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if either <parameter>modeRGB</parameter> or <parameter>modeAlpha</parameter> is not one of
- <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>, <constant>GL_FUNC_REVERSE_SUBTRACT</constant>,
- <constant>GL_MAX</constant>, or <constant>GL_MIN</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBlendEquationSeparate</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_EQUATION_RGB</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_BLEND_EQUATION_ALPHA</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2006 Khronos Group.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glBlendFunc">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBlendFunc</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBlendFunc</refname>
- <refpurpose>specify pixel arithmetic</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBlendFunc</function></funcdef>
- <paramdef>GLenum <parameter>sfactor</parameter></paramdef>
- <paramdef>GLenum <parameter>dfactor</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>sfactor</parameter></term>
- <listitem>
- <para>
- Specifies how the red, green, blue,
- and alpha source blending factors are computed.
- The following symbolic constants are accepted:
- <constant>GL_ZERO</constant>,
- <constant>GL_ONE</constant>,
- <constant>GL_SRC_COLOR</constant>,
- <constant>GL_ONE_MINUS_SRC_COLOR</constant>,
- <constant>GL_DST_COLOR</constant>,
- <constant>GL_ONE_MINUS_DST_COLOR</constant>,
- <constant>GL_SRC_ALPHA</constant>,
- <constant>GL_ONE_MINUS_SRC_ALPHA</constant>,
- <constant>GL_DST_ALPHA</constant>,
- <constant>GL_ONE_MINUS_DST_ALPHA</constant>,
- <constant>GL_CONSTANT_COLOR</constant>,
- <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>,
- <constant>GL_CONSTANT_ALPHA</constant>,
- <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant>, and
- <constant>GL_SRC_ALPHA_SATURATE</constant>.
- The initial value is <constant>GL_ONE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dfactor</parameter></term>
- <listitem>
- <para>
- Specifies how the red, green, blue,
- and alpha destination blending factors are computed.
- The following symbolic constants are accepted:
- <constant>GL_ZERO</constant>,
- <constant>GL_ONE</constant>,
- <constant>GL_SRC_COLOR</constant>,
- <constant>GL_ONE_MINUS_SRC_COLOR</constant>,
- <constant>GL_DST_COLOR</constant>,
- <constant>GL_ONE_MINUS_DST_COLOR</constant>,
- <constant>GL_SRC_ALPHA</constant>,
- <constant>GL_ONE_MINUS_SRC_ALPHA</constant>,
- <constant>GL_DST_ALPHA</constant>,
- <constant>GL_ONE_MINUS_DST_ALPHA</constant>.
- <constant>GL_CONSTANT_COLOR</constant>,
- <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>,
- <constant>GL_CONSTANT_ALPHA</constant>, and
- <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant>.
- The initial value is <constant>GL_ZERO</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- In RGBA mode, pixels can be drawn using a function that blends
- the incoming (source) RGBA values with the RGBA values
- that are already in the frame buffer (the destination values).
- Blending is initially disabled.
- Use <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_BLEND</constant>
- to enable and disable blending.
- </para>
- <para>
- <function>glBlendFunc</function> defines the operation of blending when it is enabled.
- <parameter>sfactor</parameter> specifies which method is used to scale the
- source color components.
- <parameter>dfactor</parameter> specifies which method is used to scale the
- destination color components.
- The possible methods are described in the following table.
- Each method defines four scale factors,
- one each for red, green, blue, and alpha.
- In the table and in subsequent equations, source and destination
- color components are referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub s , G sub s , B sub s , A sub s ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( R sub d , G sub d , B sub d , A sub d ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The color specified by <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry> is referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub c , G sub c , B sub c , A sub c ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- They are understood to have integer values between 0 and
- <inlineequation><mml:math>
- <!-- eqn: ( k sub R , k sub G , k sub B , k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: k sub c = 2 sup {m sub c} - 1:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( m sub R , m sub G , m sub B , m sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- is the number of red,
- green,
- blue,
- and alpha bitplanes.
- </para>
- <para>
- Source and destination scale factors are referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( s sub R , s sub G , s sub B , s sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( d sub R , d sub G , d sub B , d sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The scale factors described in the table,
- denoted
- <inlineequation><mml:math>
- <!-- eqn: ( f sub R , f sub G , f sub B , f sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- represent either source or destination factors.
- All scale factors have range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- <para>
- </para>
- <informaltable frame="topbot">
- <tgroup cols="2" align="left">
- <colspec/>
- <colspec/>
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Parameter
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- <inlineequation><mml:math>
- <!-- eqn: ( f sub R , f sub G , f sub B , f sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">f</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_ZERO</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 0, 0, 0, 0 ):-->
- <mml:mfenced open="(" close=")">
- <mml:mn>0</mml:mn>
- <mml:mn>0</mml:mn>
- <mml:mn>0</mml:mn>
- <mml:mn>0</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ):-->
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SRC_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( R sub s / k sub R , G sub s / k sub G , B sub s / k sub B , A sub s / k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_SRC_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - (R sub s / k sub R , G sub s / k sub G , B sub s / k sub B , A sub s / k sub A ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_DST_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( R sub d / k sub R , G sub d / k sub G , B sub d / k sub B , A sub d / k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_DST_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - (R sub d / k sub R , G sub d / k sub G , B sub d / k sub B , A sub d / k sub A ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SRC_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( A sub s / k sub A , A sub s / k sub A , A sub s / k sub A , A sub s / k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_SRC_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - (A sub s / k sub A , A sub s / k sub A , A sub s / k sub A , A sub s / k sub A ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_DST_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( A sub d / k sub A , A sub d / k sub A , A sub d / k sub A , A sub d / k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_DST_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - ( A sub d / k sub A , A sub d / k sub A , A sub d / k sub A , A sub d / k sub A ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CONSTANT_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( R sub c, G sub c, B sub c, A sub c ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - ( R sub c, G sub c, B sub c, A sub c ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CONSTANT_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( A sub c, A sub c, A sub c, A sub c ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - ( A sub c, A sub c, A sub c, A sub c ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SRC_ALPHA_SATURATE</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( i, i, i, 1 ):-->
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- In the table,
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: i = min (A sub s , k sub A - A sub d ) / k sub A:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfrac>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- To determine the blended RGBA values of a pixel when drawing in RGBA mode,
- the system uses the following equations:
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: R sub d = min ( k sub R, R sub s s sub R + R sub d d sub R ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: G sub d = min ( k sub G, G sub s s sub G + G sub d d sub G ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: B sub d = min ( k sub B, B sub s s sub B + B sub d d sub B ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: A sub d = min ( k sub A, A sub s s sub A + A sub d d sub A ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- Despite the apparent precision of the above equations,
- blending arithmetic is not exactly specified,
- because blending operates with imprecise integer color values.
- However,
- a blend factor that should be equal to 1
- is guaranteed not to modify its multiplicand,
- and a blend factor equal to 0 reduces its multiplicand to 0.
- For example,
- when <parameter>sfactor</parameter> is <constant>GL_SRC_ALPHA</constant>,
- <parameter>dfactor</parameter> is <constant>GL_ONE_MINUS_SRC_ALPHA</constant>,
- and
- <inlineequation><mml:math>
- <!-- eqn: A sub s:-->
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is equal to
- <inlineequation><mml:math>
- <!-- eqn: k sub A:-->
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>,
- the equations reduce to simple replacement:
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: R sub d = R sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: G sub d = G sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: B sub d = B sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: A sub d = A sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="examples"><title>Examples</title>
- <para>
- </para>
- <para>
- Transparency is best implemented using blend function
- (<constant>GL_SRC_ALPHA</constant>, <constant>GL_ONE_MINUS_SRC_ALPHA</constant>)
- with primitives sorted from farthest to nearest.
- Note that this transparency calculation does not require
- the presence of alpha bitplanes in the frame buffer.
- </para>
- <para>
- Blend function
- (<constant>GL_SRC_ALPHA</constant>, <constant>GL_ONE_MINUS_SRC_ALPHA</constant>)
- is also useful for rendering antialiased points and lines
- in arbitrary order.
- </para>
- <para>
- Polygon antialiasing is optimized using blend function
- (<constant>GL_SRC_ALPHA_SATURATE</constant>, <constant>GL_ONE</constant>)
- with polygons sorted from nearest to farthest.
- (See the <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> reference page and the
- <constant>GL_POLYGON_SMOOTH</constant> argument for information on polygon antialiasing.)
- Destination alpha bitplanes,
- which must be present for this blend function to operate correctly,
- store the accumulated coverage.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Incoming (source) alpha is correctly thought of as a material opacity,
- ranging from 1.0
- (<inlineequation><mml:math>
- <!-- eqn: K sub A:-->
- <mml:msub><mml:mi mathvariant="italic">K</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>),
- representing complete opacity,
- to 0.0 (0), representing complete
- transparency.
- </para>
- <para>
- When more than one color buffer is enabled for drawing,
- the GL performs blending separately for each enabled buffer,
- using the contents of that buffer for destination color.
- (See <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>.)
- </para>
- <para>
- Blending affects only RGBA rendering.
- It is ignored by color index renderers.
- </para>
- <para>
- <constant>GL_CONSTANT_COLOR</constant>, <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>,
- <constant>GL_CONSTANT_ALPHA</constant>, <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant> are available only
- if the GL version is 1.4 or greater or if the <code>ARB_imaging</code> is
- supported by your implementation.
- </para>
- <para>
- <constant>GL_SRC_COLOR</constant> and <constant>GL_ONE_MINUS_SRC_COLOR</constant> are valid only for
- <parameter>sfactor</parameter> if the GL version is 1.4 or greater.
- </para>
- <para>
- <constant>GL_DST_COLOR</constant> and <constant>GL_ONE_MINUS_DST_COLOR</constant> are valid only for
- <parameter>dfactor</parameter> if the GL version is 1.4 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if either <parameter>sfactor</parameter> or <parameter>dfactor</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBlendFunc</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_BLEND_SRC</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_BLEND_DST</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_BLEND</constant>
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendEquation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</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>
+++ /dev/null
-<?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="glBlendFuncSeparate">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBlendFuncSeparate</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBlendFuncSeparate</refname>
- <refpurpose>specify pixel arithmetic for RGB and alpha components separately</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBlendFuncSeparate</function></funcdef>
- <paramdef>GLenum <parameter>srcRGB</parameter></paramdef>
- <paramdef>GLenum <parameter>dstRGB</parameter></paramdef>
- <paramdef>GLenum <parameter>srcAlpha</parameter></paramdef>
- <paramdef>GLenum <parameter>dstAlpha</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>srcRGB</parameter></term>
- <listitem>
- <para>
- Specifies how the red, green, and blue blending factors are computed.
- The following symbolic constants are accepted:
- <constant>GL_ZERO</constant>,
- <constant>GL_ONE</constant>,
- <constant>GL_SRC_COLOR</constant>,
- <constant>GL_ONE_MINUS_SRC_COLOR</constant>,
- <constant>GL_DST_COLOR</constant>,
- <constant>GL_ONE_MINUS_DST_COLOR</constant>,
- <constant>GL_SRC_ALPHA</constant>,
- <constant>GL_ONE_MINUS_SRC_ALPHA</constant>,
- <constant>GL_DST_ALPHA</constant>,
- <constant>GL_ONE_MINUS_DST_ALPHA</constant>,
- <constant>GL_CONSTANT_COLOR</constant>,
- <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>,
- <constant>GL_CONSTANT_ALPHA</constant>,
- <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant>, and
- <constant>GL_SRC_ALPHA_SATURATE</constant>.
- The initial value is <constant>GL_ONE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dstRGB</parameter></term>
- <listitem>
- <para>
- Specifies how the red, green, and blue destination blending factors are
- computed. The following symbolic constants are accepted:
- <constant>GL_ZERO</constant>,
- <constant>GL_ONE</constant>,
- <constant>GL_SRC_COLOR</constant>,
- <constant>GL_ONE_MINUS_SRC_COLOR</constant>,
- <constant>GL_DST_COLOR</constant>,
- <constant>GL_ONE_MINUS_DST_COLOR</constant>,
- <constant>GL_SRC_ALPHA</constant>,
- <constant>GL_ONE_MINUS_SRC_ALPHA</constant>,
- <constant>GL_DST_ALPHA</constant>,
- <constant>GL_ONE_MINUS_DST_ALPHA</constant>.
- <constant>GL_CONSTANT_COLOR</constant>,
- <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>,
- <constant>GL_CONSTANT_ALPHA</constant>, and
- <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant>.
- The initial value is <constant>GL_ZERO</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>srcAlpha</parameter></term>
- <listitem>
- <para>
- Specified how the alpha source blending factor is computed. The same
- symbolic constants are accepted as for <parameter>srcRGB</parameter>.
- The initial value is <constant>GL_ONE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dstAlpha</parameter></term>
- <listitem>
- <para>
- Specified how the alpha destination blending factor is computed. The same
- symbolic constants are accepted as for <parameter>dstRGB</parameter>.
- The initial value is <constant>GL_ZERO</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- In RGBA mode, pixels can be drawn using a function that blends
- the incoming (source) RGBA values with the RGBA values
- that are already in the frame buffer (the destination values).
- Blending is initially disabled.
- Use <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_BLEND</constant>
- to enable and disable blending.
- </para>
- <para>
- <function>glBlendFuncSeparate</function> defines the operation of blending when it is enabled.
- <parameter>srcRGB</parameter> specifies which method is used to scale the
- source RGB-color components.
- <parameter>dstRGB</parameter> specifies which method is used to scale the
- destination RGB-color components.
- Likewise, <parameter>srcAlpha</parameter> specifies which method is used to scale the source alpha
- color component, and <parameter>dstAlpha</parameter> specifies which method is used to scale the
- destination alpha component.
- The possible methods are described in the following table.
- Each method defines four scale factors,
- one each for red, green, blue, and alpha.
- </para>
- <para>
- In the table and in subsequent equations, source and destination
- color components are referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub s , G sub s , B sub s , A sub s ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( R sub d , G sub d , B sub d , A sub d ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The color specified by <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry> is referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( R sub c , G sub c , B sub c , A sub c ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- They are understood to have integer values between 0 and
- <inlineequation><mml:math>
- <!-- eqn: ( k sub R , k sub G , k sub B , k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: k sub c = 2 sup {m sub c} - 1:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( m sub R , m sub G , m sub B , m sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">m</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- is the number of red,
- green,
- blue,
- and alpha bitplanes.
- </para>
- <para>
- Source and destination scale factors are referred to as
- <inlineequation><mml:math>
- <!-- eqn: ( s sub R , s sub G , s sub B , s sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: ( d sub R , d sub G , d sub B , d sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- All scale factors have range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- <para>
- </para>
- <informaltable frame="topbot">
- <tgroup cols="3" align="left">
- <colspec colwidth="3*" />
- <colspec colwidth="2*" />
- <colspec colwidth="1*" />
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Parameter
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- RGB Factor
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Alpha Factor
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_ZERO</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 0, 0, 0 ):-->
- <mml:mfenced open="(" close=")">
- <mml:mn>0</mml:mn>
- <mml:mn>0</mml:mn>
- <mml:mn>0</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 0:-->
- <mml:mn>0</mml:mn>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1 ):-->
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1:-->
- <mml:mn>1</mml:mn>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SRC_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( R sub s / k sub R , G sub s / k sub G , B sub s / k sub B ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: A sub s / k sub A:-->
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_SRC_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1, 1 ) - ( R sub s / k sub R , G sub s / k sub G , B sub s / k sub B ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1 - A sub s / k sub A:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_DST_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( R sub d / k sub R , G sub d / k sub G , B sub d / k sub B ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: A sub d / k sub A:-->
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_DST_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1 ) - ( R sub d / k sub R , G sub d / k sub G , B sub d / k sub B ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1 - A sub d / k sub A:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SRC_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( A sub s / k sub A , A sub s / k sub A , A sub s / k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: A sub s / k sub A:-->
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_SRC_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1 ) - ( A sub s / k sub A , A sub s / k sub A , A sub s / k sub A ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1 - A sub s / k sub A:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_DST_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( A sub d / k sub A , A sub d / k sub A , A sub d / k sub A ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: A sub d / k sub A:-->
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_DST_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1 ) - ( A sub d / k sub A , A sub d / k sub A , A sub d / k sub A ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1 - A sub d / k sub A:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mfrac>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mfrac>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CONSTANT_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( R sub c, G sub c, B sub c ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: A sub c:-->
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1 ) - ( R sub c, G sub c, B sub c ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1 - A sub c:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CONSTANT_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( A sub c, A sub c, A sub c ):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: A sub c:-->
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( 1, 1, 1 ) - ( A sub c, A sub c, A sub c ):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1 - A sub c:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SRC_ALPHA_SATURATE</constant>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: ( i, i, i ):-->
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mi mathvariant="italic">i</mml:mi>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- <entry align="left">
- <inlineequation><mml:math>
- <!-- eqn: 1:-->
- <mml:mn>1</mml:mn>
- </mml:math></inlineequation>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- In the table,
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: i = min (A sub s , 1 - {A sub d}):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- To determine the blended RGBA values of a pixel when drawing in RGBA mode,
- the system uses the following equations:
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: R sub d = min ( k sub R, R sub s s sub R + R sub d d sub R ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">R</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: G sub d = min ( k sub G, G sub s s sub G + G sub d d sub G ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">G</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: B sub d = min ( k sub B, B sub s s sub B + B sub d d sub B ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">B</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: A sub d = min ( k sub A, A sub s s sub A + A sub d d sub A ):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">min</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">s</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- Despite the apparent precision of the above equations, blending arithmetic
- is not exactly specified, because blending operates with imprecise integer
- color values. However, a blend factor that should be equal to 1 is
- guaranteed not to modify its multiplicand, and a blend factor equal to 0
- reduces its multiplicand to 0. For example, when <parameter>srcRGB</parameter> is
- <constant>GL_SRC_ALPHA</constant>, <parameter>dstRGB</parameter> is <constant>GL_ONE_MINUS_SRC_ALPHA</constant>, and
- <inlineequation><mml:math>
- <!-- eqn: A sub s:-->
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is
- equal to
- <inlineequation><mml:math>
- <!-- eqn: k sub A:-->
- <mml:msub><mml:mi mathvariant="italic">k</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>,
- the equations reduce to simple replacement:
- </para>
- <para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: R sub d = R sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">R</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: G sub d = G sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">G</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: B sub d = B sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">B</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- <inlineequation><mml:math>
- <!-- eqn: A sub d = A sub s:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:msub><mml:mi mathvariant="italic">A</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBlendFuncSeparate</function> is available only if the GL version is 1.4 or greater.
- </para>
- <para>
- Incoming (source) alpha is correctly thought of as a material opacity,
- ranging from 1.0
- (<inlineequation><mml:math>
- <!-- eqn: K sub A:-->
- <mml:msub><mml:mi mathvariant="italic">K</mml:mi>
- <mml:mi mathvariant="italic">A</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>),
- representing complete opacity,
- to 0.0 (0), representing complete
- transparency.
- </para>
- <para>
- When more than one color buffer is enabled for drawing,
- the GL performs blending separately for each enabled buffer,
- using the contents of that buffer for destination color.
- (See <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>.)
- </para>
- <para>
- Blending affects only RGBA rendering.
- It is ignored by color index renderers.
- </para>
- <para>
- <constant>GL_CONSTANT_COLOR</constant>, <constant>GL_ONE_MINUS_CONSTANT_COLOR</constant>,
- <constant>GL_CONSTANT_ALPHA</constant>, <constant>GL_ONE_MINUS_CONSTANT_ALPHA</constant> are available only
- if the GL version is 1.4 or greater or if the <code>ARB_imaging</code> is
- supported by your implementation.
- </para>
- <para>
- <constant>GL_SRC_COLOR</constant> and <constant>GL_ONE_MINUS_SRC_COLOR</constant> are valid only for
- <parameter>srcRGB</parameter> if the GL version is 1.4 or greater.
- </para>
- <para>
- <constant>GL_DST_COLOR</constant> and <constant>GL_ONE_MINUS_DST_COLOR</constant> are valid only for
- <parameter>dstRGB</parameter> if the GL version is 1.4 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if either <parameter>srcRGB</parameter> or <parameter>dstRGB</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBlendFuncSeparate</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_BLEND_SRC_RGB</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_BLEND_SRC_ALPHA</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_BLEND_DST_RGB</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_BLEND_DST_ALPHA</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_BLEND</constant>
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendEquation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</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>
+++ /dev/null
-<?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="glBufferData">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBufferData</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBufferData</refname>
- <refpurpose>creates and initializes a buffer object's data store</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBufferData</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- <paramdef>GLenum <parameter>usage</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target buffer object.
- The symbolic constant must be <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>
- Specifies the size in bytes of the buffer object's new data store.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to data that will be copied into the data store for initialization,
- or <constant>NULL</constant> if no data is to be copied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>usage</parameter></term>
- <listitem>
- <para>
- Specifies the expected usage pattern of the data store. The symbolic constant must be
- <constant>GL_STREAM_DRAW</constant>, <constant>GL_STREAM_READ</constant>, <constant>GL_STREAM_COPY</constant>,
- <constant>GL_STATIC_DRAW</constant>, <constant>GL_STATIC_READ</constant>, <constant>GL_STATIC_COPY</constant>,
- <constant>GL_DYNAMIC_DRAW</constant>, <constant>GL_DYNAMIC_READ</constant>, or <constant>GL_DYNAMIC_COPY</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glBufferData</function> creates a new data store for the buffer object currently bound to
- <parameter>target</parameter>. Any pre-existing data store is deleted. The new data store is created with the
- specified <parameter>size</parameter> in bytes and <parameter>usage</parameter>. If <parameter>data</parameter>
- is not <constant>NULL</constant>, the data store is initialized with data from this pointer. In its initial
- state, the new data store is not mapped, it has a <constant>NULL</constant> mapped pointer, and its mapped access
- is <constant>GL_READ_WRITE</constant>.
- </para>
- <para>
- <parameter>usage</parameter> is a hint to the GL implementation as to how a buffer object's data store will be
- accessed. This enables the GL implementation to make more intelligent decisions that may significantly
- impact buffer object performance. It does not, however, constrain the actual usage of the data store.
- <parameter>usage</parameter> can be broken down into two parts: first, the frequency of access (modification
- and usage), and second, the nature of that access. The frequency of access may be one of these:
- </para>
- <variablelist>
- <varlistentry>
- <term>STREAM</term>
- <listitem>
- <para>
- The data store contents will be modified once and used at most a few times.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>STATIC</term>
- <listitem>
- <para>
- The data store contents will be modified once and used many times.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>DYNAMIC</term>
- <listitem>
- <para>
- The data store contents will be modified repeatedly and used many times.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The nature of access may be one of these:
- </para>
- <variablelist>
- <varlistentry>
- <term>DRAW</term>
- <listitem>
- <para>
- The data store contents are modified by the application, and used as the source for GL drawing and
- image specification commands.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>READ</term>
- <listitem>
- <para>
- The data store contents are modified by reading data from the GL, and used to return that data
- when queried by the application.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>COPY</term>
- <listitem>
- <para>
- The data store contents are modified by reading data from the GL, and used as the source for GL
- drawing and image specification commands.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBufferData</function> is available only if the GL version is 1.5 or greater.
- </para>
- <para>
- Targets <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are available
- only if the GL version is 2.1 or greater.
- </para>
- <para>
- If <parameter>data</parameter> is <constant>NULL</constant>, a data store of the specified size is still created,
- but its contents remain uninitialized and thus undefined.
- </para>
- <para>
- Clients must align data elements consistent with the requirements of the client
- platform, with an additional base-level requirement that an offset within a buffer to
- a datum comprising <inlineequation><mml:math><mml:mi mathvariant="italic">N</mml:mi> bytes be a
- multiple of <mml:mi mathvariant="italic">N</mml:mi></mml:math></inlineequation>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
- <constant>GL_ARRAY_BUFFER</constant>, <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>usage</parameter> is not
- <constant>GL_STREAM_DRAW</constant>, <constant>GL_STREAM_READ</constant>, <constant>GL_STREAM_COPY</constant>,
- <constant>GL_STATIC_DRAW</constant>, <constant>GL_STATIC_READ</constant>, <constant>GL_STATIC_COPY</constant>,
- <constant>GL_DYNAMIC_DRAW</constant>, <constant>GL_DYNAMIC_READ</constant>, or <constant>GL_DYNAMIC_COPY</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>size</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>.
- </para>
- <para>
- <constant>GL_OUT_OF_MEMORY</constant> is generated if the GL is unable to create a data store with the specified <parameter>size</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBufferData</function>
- is executed between the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetBufferSubData</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetBufferParameteriv</refentrytitle></citerefentry> with argument <constant>GL_BUFFER_SIZE</constant> or <constant>GL_BUFFER_USAGE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBufferSubData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glBufferSubData">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glBufferSubData</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glBufferSubData</refname>
- <refpurpose>updates a subset of a buffer object's data store</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glBufferSubData</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLintptr <parameter>offset</parameter></paramdef>
- <paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target buffer object.
- The symbolic constant must be <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>offset</parameter></term>
- <listitem>
- <para>
- Specifies the offset into the buffer object's data store where data replacement will begin,
- measured in bytes.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>
- Specifies the size in bytes of the data store region being replaced.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the new data that will be copied into the data store.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glBufferSubData</function> redefines some or all of the data store for the buffer object currently
- bound to <parameter>target</parameter>. Data starting at byte offset <parameter>offset</parameter> and
- extending for <parameter>size</parameter> bytes is copied to the data store from the memory pointed to by
- <parameter>data</parameter>. An error is thrown if <parameter>offset</parameter> and <parameter>size</parameter>
- together define a range beyond the bounds of the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glBufferSubData</function> is available only if the GL version is 1.5 or greater.
- </para>
- <para>
- Targets <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are available
- only if the GL version is 2.1 or greater.
- </para>
- <para>
- When replacing the entire data store, consider using <function>glBufferSubData</function> rather
- than completely recreating the data store with <function>glBufferData</function>. This avoids the cost of
- reallocating the data store.
- </para>
- <para>
- Consider using multiple buffer objects to avoid stalling the rendering pipeline during data store updates.
- If any rendering in the pipeline makes reference to data in the buffer object being updated by
- <function>glBufferSubData</function>, especially from the specific region being updated, that rendering must
- drain from the pipeline before the data store can be updated.
- </para>
- <para>
- Clients must align data elements consistent with the requirements of the client
- platform, with an additional base-level requirement that an offset within a buffer to
- a datum comprising <inlineequation><mml:math><mml:mi mathvariant="italic">N</mml:mi> bytes be a
- multiple of <mml:mi mathvariant="italic">N</mml:mi></mml:math></inlineequation>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
- <constant>GL_ARRAY_BUFFER</constant>, <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or
- <parameter>size</parameter> is negative, or if together they define a region of memory
- that extends beyond the buffer object's allocated data store.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the buffer object being updated is mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glBufferSubData</function>
- is executed between the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetBufferSubData</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glClear">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glClear</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glClear</refname>
- <refpurpose>clear buffers to preset values</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glClear</function></funcdef>
- <paramdef>GLbitfield <parameter>mask</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mask</parameter></term>
- <listitem>
- <para>
- Bitwise OR of masks that indicate the buffers to be cleared.
- The four masks are
- <constant>GL_COLOR_BUFFER_BIT</constant>,
- <constant>GL_DEPTH_BUFFER_BIT</constant>,
- <constant>GL_ACCUM_BUFFER_BIT</constant>, and
- <constant>GL_STENCIL_BUFFER_BIT</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glClear</function> sets the bitplane area of the window to values previously selected
- by <function>glClearColor</function>, <function>glClearIndex</function>, <function>glClearDepth</function>,
- <function>glClearStencil</function>, and <function>glClearAccum</function>.
- Multiple color buffers can be cleared simultaneously by selecting
- more than one buffer at a time using <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>.
- </para>
- <para>
- The pixel ownership test,
- the scissor test,
- dithering, and the buffer writemasks affect the operation of <function>glClear</function>.
- The scissor box bounds the cleared region.
- Alpha function,
- blend function,
- logical operation,
- stenciling,
- texture mapping,
- and depth-buffering are ignored by <function>glClear</function>.
- </para>
- <para>
- <function>glClear</function> takes a single argument that is the bitwise OR of several
- values indicating which buffer is to be cleared.
- </para>
- <para>
- The values are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_COLOR_BUFFER_BIT</constant></term>
- <listitem>
- <para>
- Indicates the buffers currently enabled for color
- writing.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_BUFFER_BIT</constant></term>
- <listitem>
- <para>
- Indicates the depth buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ACCUM_BUFFER_BIT</constant></term>
- <listitem>
- <para>
- Indicates the accumulation buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BUFFER_BIT</constant></term>
- <listitem>
- <para>
- Indicates the stencil buffer.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The value to which each buffer is cleared depends on the setting of the
- clear value for that buffer.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If a buffer is not present,
- then a <function>glClear</function> directed at that buffer has no effect.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if any bit other than the four defined
- bits is set in <parameter>mask</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClear</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ACCUM_CLEAR_VALUE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_CLEAR_VALUE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_INDEX_CLEAR_VALUE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_COLOR_CLEAR_VALUE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_CLEAR_VALUE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <function>glClearAccum</function>,
- <function>glClearColor</function>,
- <function>glClearDepth</function>,
- <function>glClearIndex</function>,
- <function>glClearStencil</function>,
- <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</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>
+++ /dev/null
-<?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="glClearColor">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glClearColor</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glClearColor</refname>
- <refpurpose>specify clear values for the color buffers</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glClearColor</function></funcdef>
- <paramdef>GLclampf <parameter>red</parameter></paramdef>
- <paramdef>GLclampf <parameter>green</parameter></paramdef>
- <paramdef>GLclampf <parameter>blue</parameter></paramdef>
- <paramdef>GLclampf <parameter>alpha</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>red</parameter></term>
- <term><parameter>green</parameter></term>
- <term><parameter>blue</parameter></term>
- <term><parameter>alpha</parameter></term>
- <listitem>
- <para>
- Specify the red, green, blue, and alpha values used when the
- color buffers are cleared.
- The initial values are all 0.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glClearColor</function> specifies the red,
- green,
- blue,
- and alpha values used by <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry> to clear the color buffers.
- Values specified by <function>glClearColor</function> are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClearColor</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_COLOR_CLEAR_VALUE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glClear</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>
+++ /dev/null
-<?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="glClearDepth">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glClearDepth</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glClearDepth</refname>
- <refpurpose>specify the clear value for the depth buffer</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glClearDepth</function></funcdef>
- <paramdef>GLclampd <parameter>depth</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>depth</parameter></term>
- <listitem>
- <para>
- Specifies the depth value used when the depth buffer is cleared. The
- initial value is 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glClearDepth</function> specifies the depth value used by <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry> to clear the depth buffer.
- Values specified by <function>glClearDepth</function> are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClearDepth</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_CLEAR_VALUE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glClear</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>
+++ /dev/null
-<?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="glClearStencil">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glClearStencil</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glClearStencil</refname>
- <refpurpose>specify the clear value for the stencil buffer</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glClearStencil</function></funcdef>
- <paramdef>GLint <parameter>s</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>s</parameter></term>
- <listitem>
- <para>
- Specifies the index used when the stencil buffer is cleared.
- The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glClearStencil</function> specifies the index used by <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry> to clear the stencil buffer.
- <parameter>s</parameter> is masked with
- <inlineequation><mml:math>
- <!-- eqn: 2 sup m - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>
- is the number of bits in the stencil buffer.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glClearStencil</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_CLEAR_VALUE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_BITS</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOpSeparate</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>
+++ /dev/null
-<?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="glColorMask">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glColorMask</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glColorMask</refname>
- <refpurpose>enable and disable writing of frame buffer color components</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glColorMask</function></funcdef>
- <paramdef>GLboolean <parameter>red</parameter></paramdef>
- <paramdef>GLboolean <parameter>green</parameter></paramdef>
- <paramdef>GLboolean <parameter>blue</parameter></paramdef>
- <paramdef>GLboolean <parameter>alpha</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>red</parameter></term>
- <term><parameter>green</parameter></term>
- <term><parameter>blue</parameter></term>
- <term><parameter>alpha</parameter></term>
- <listitem>
- <para>
- Specify whether red, green, blue, and alpha can or cannot be written
- into the frame buffer.
- The initial values are all <constant>GL_TRUE</constant>,
- indicating that the color components can be written.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glColorMask</function> specifies whether the individual color components in the frame buffer
- can or cannot be written.
- If <parameter>red</parameter> is <constant>GL_FALSE</constant>,
- for example,
- no change is made to the red component of any pixel in any of the
- color buffers,
- regardless of the drawing operation attempted.
- </para>
- <para>
- Changes to individual bits of components cannot be controlled.
- Rather,
- changes are either enabled or disabled for entire color components.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glColorMask</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_COLOR_WRITEMASK</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_RGBA_MODE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glClear</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</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>
+++ /dev/null
-<?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="glCompileShader">
- <refmeta>
- <refentrytitle>glCompileShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompileShader</refname>
- <refpurpose>Compiles a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompileShader</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object to be
- compiled.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glCompileShader</function> compiles the source
- code strings that have been stored in the shader object
- specified by <parameter>shader</parameter>.</para>
-
- <para>The compilation status will be stored as part of the
- shader object's state. This value will be set to
- <constant>GL_TRUE</constant> if the shader was compiled without
- errors and is ready for use, and <constant>GL_FALSE</constant>
- otherwise. It can be queried by calling
- <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and
- <constant>GL_COMPILE_STATUS</constant>.</para>
-
- <para>Compilation of a shader can fail for a number of reasons
- as specified by the OpenGL Shading Language Specification.
- Whether or not the compilation was successful, information about
- the compilation can be obtained from the shader object's
- information log by calling
- <citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glCompileShader</function>
- is available only if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>shader</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not a shader object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glCompileShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>
- with argument <parameter>shader</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and
- <constant>GL_COMPILE_STATUS</constant></para>
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glCompressedTexImage1D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCompressedTexImage1D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompressedTexImage1D</refname>
- <refpurpose>specify a one-dimensional texture image in a compressed format</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompressedTexImage1D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_1D</constant> or <constant>GL_PROXY_TEXTURE_1D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalformat</parameter></term>
- <listitem>
- <para>
- Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All implementations support texture images that are at least 64 texels wide. The height of the 1D texture image is 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border. Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>imageSize</parameter></term>
- <listitem>
- <para>
- Specifies the number of unsigned bytes of image data starting at the address specified by <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the compressed image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>.
- </para>
- <para>
- <function>glCompressedTexImage1D</function> loads a previously defined, and retrieved, compressed one-dimensional texture image if <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant> (see <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>).
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_1D</constant>, no data is read from <parameter>data</parameter>, but
- all of the texture image state is recalculated, checked for consistency, and checked against the implementation's capabilities. If the implementation cannot handle a texture of the requested texture size, it sets all of the image state to 0, but does not generate an error (see <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an entire mipmap array, use an image array level greater than or equal to 1.
- </para>
- <para>
- <parameter>internalformat</parameter> must be extension-specified compressed-texture format. When a texture is loaded with <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> using a generic compressed texture format (e.g., <constant>GL_COMPRESSED_RGB</constant>) the GL selects from one of
- its extensions supporting compressed textures. In order to load the
- compressed texture image using <function>glCompressedTexImage1D</function>, query the compressed texture image's size and format using <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCompressedTexImage1D</function> is available only if the GL version is 1.3 or greater.
- </para>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is one of the generic compressed internal formats: <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>, <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>, <constant>GL_COMPRESSED_RGB</constant>, or
- <constant>GL_COMPRESSED_RGBA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
- the format, dimensions, and contents of the specified compressed image
- data.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
- supported by the specific compressed internal format as specified in the
- specific texture compression extension.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexImage1D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- Undefined results, including abnormal program termination, are generated if
- <parameter>data</parameter> is not encoded in a manner consistent with the extension
- specification defining the internal compression format.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCompressedTexImage2D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCompressedTexImage2D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompressedTexImage2D</refname>
- <refpurpose>specify a two-dimensional texture image in a compressed format</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompressedTexImage2D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_2D</constant>, <constant>GL_PROXY_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalformat</parameter></term>
- <listitem>
- <para>
- Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support 2D texture images that are at least 64 texels
- wide and cube-mapped texture images that are at least 16 texels wide.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- Must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support 2D texture images that are at least 64 texels
- high and cube-mapped texture images that are at least 16 texels high.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>imageSize</parameter></term>
- <listitem>
- <para>
- Specifies the number of unsigned bytes of image data starting at the
- address specified by <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the compressed image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical
- primitive for which texturing is enabled. To enable and disable
- two-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_2D</constant>. To enable and disable texturing using
- cube-mapped textures, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_CUBE_MAP</constant>.
- </para>
- <para>
- <function>glCompressedTexImage2D</function> loads a previously defined, and retrieved, compressed two-dimensional
- texture image if <parameter>target</parameter> is <constant>GL_TEXTURE_2D</constant> (see <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>).
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_2D</constant>, no data is read from <parameter>data</parameter>, but
- all of the texture image state is recalculated, checked for consistency,
- and checked against the implementation's capabilities. If the
- implementation cannot handle a texture of the requested texture size, it
- sets all of the image state to 0, but does not generate an error (see
- <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an entire mipmap array, use an image array level
- greater than or equal to 1.
- </para>
- <para>
- <parameter>internalformat</parameter> must be an extension-specified compressed-texture format.
- When a texture is loaded with <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> using a generic compressed
- texture format (e.g., <constant>GL_COMPRESSED_RGB</constant>), the GL selects from one of
- its extensions supporting compressed textures. In order to load the
- compressed texture image using <function>glCompressedTexImage2D</function>, query the compressed texture image's
- size and format using <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCompressedTexImage2D</function> is available only if the GL version is 1.3 or greater.
- </para>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is one of the generic compressed internal formats: <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>, <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>, <constant>GL_COMPRESSED_RGB</constant>, or
- <constant>GL_COMPRESSED_RGBA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
- the format, dimensions, and contents of the specified compressed image
- data.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
- supported by the specific compressed internal format as specified in the
- specific texture compression extension.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexImage2D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- Undefined results, including abnormal program termination, are generated if
- <parameter>data</parameter> is not encoded in a manner consistent with the extension
- specification defining the internal compression format.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_2D</constant> or <constant>GL_TEXTURE_CUBE_MAP</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCompressedTexImage3D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCompressedTexImage3D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompressedTexImage3D</refname>
- <refpurpose>specify a three-dimensional texture image in a compressed format</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompressedTexImage3D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLsizei <parameter>depth</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_3D</constant> or <constant>GL_PROXY_TEXTURE_3D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalformat</parameter></term>
- <listitem>
- <para>
- Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support 3D texture images that are at least 16 texels
- wide.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support 3D texture images that are at least 16 texels
- high.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>depth</parameter></term>
- <listitem>
- <para>
- Specifies the depth of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support 3D texture images that are at least 16 texels
- deep.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>imageSize</parameter></term>
- <listitem>
- <para>
- Specifies the number of unsigned bytes of image data starting at the
- address specified by <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the compressed image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical
- primitive for which texturing is enabled. To enable and disable
- three-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_3D</constant>.
- </para>
- <para>
- <function>glCompressedTexImage3D</function> loads a previously defined, and retrieved, compressed three-dimensional
- texture image if <parameter>target</parameter> is <constant>GL_TEXTURE_3D</constant> (see <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>).
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_3D</constant>, no data is read from <parameter>data</parameter>, but
- all of the texture image state is recalculated, checked for consistency,
- and checked against the implementation's capabilities. If the
- implementation cannot handle a texture of the requested texture size, it
- sets all of the image state to 0, but does not generate an error (see
- <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an entire mipmap array, use an image array level
- greater than or equal to 1.
- </para>
- <para>
- <parameter>internalformat</parameter> must be an extension-specified compressed-texture format.
- When a texture is loaded with <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> using a generic compressed
- texture format (e.g., <constant>GL_COMPRESSED_RGB</constant>), the GL selects from one of
- its extensions supporting compressed textures. In order to load the
- compressed texture image using <function>glCompressedTexImage3D</function>, query the compressed texture image's
- size and format using <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCompressedTexImage3D</function> is available only if the GL version is 1.3 or greater.
- </para>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is one of the generic compressed internal formats: <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>, <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>, <constant>GL_COMPRESSED_RGB</constant>, or
- <constant>GL_COMPRESSED_RGBA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
- the format, dimensions, and contents of the specified compressed image data.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
- supported by the specific compressed internal format as specified in the
- specific texture compression extension.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexImage3D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- Undefined results, including abnormal program termination, are generated if <parameter>data</parameter> is not encoded in a manner consistent with the extension specification defining the internal compression format.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCompressedTexSubImage1D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCompressedTexSubImage1D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompressedTexSubImage1D</refname>
- <refpurpose>specify a one-dimensional texture subimage in a compressed format</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompressedTexSubImage1D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_1D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>imageSize</parameter></term>
- <listitem>
- <para>
- Specifies the number of unsigned bytes of image data starting at the
- address specified by <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the compressed image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical
- primitive for which texturing is enabled. To enable and disable
- one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_1D</constant>.
- </para>
- <para>
- <function>glCompressedTexSubImage1D</function> redefines a contiguous subregion of an existing one-dimensional
- texture image. The texels referenced by <parameter>data</parameter> replace the portion of the
- existing texture array with x indices <parameter>xoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive. This region may not include any texels
- outside the range of the texture array 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.
- </para>
- <para>
- <parameter>format</parameter> must be an extension-specified
- compressed-texture format. The <parameter>format</parameter> of the compressed texture
- image is selected by the GL implementation that compressed it (see
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>), and should be queried at the time the texture was
- compressed with <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCompressedTexSubImage1D</function> is available only if the GL version is 1.3 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is one of these generic compressed internal formats:
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_COMPRESSED_SLUMINANCE</constant>,
- <constant>GL_COMPRESSED_SLUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_SRGB</constant>,
- <constant>GL_COMPRESSED_SRGBA</constant>, or
- <constant>GL_COMPRESSED_SRGB_ALPHA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
- the format, dimensions, and contents of the specified compressed image
- data.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
- supported by the specific compressed internal format as specified in the
- specific texture compression extension.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexSubImage1D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- Undefined results, including abnormal program termination, are generated if
- <parameter>data</parameter> is not encoded in a manner consistent with the extension
- specification defining the internal compression format.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCompressedTexSubImage2D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCompressedTexSubImage2D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompressedTexSubImage2D</refname>
- <refpurpose>specify a two-dimensional texture subimage in a compressed format</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompressedTexSubImage2D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>yoffset</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>yoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the y direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>imageSize</parameter></term>
- <listitem>
- <para>
- Specifies the number of unsigned bytes of image data starting at the
- address specified by <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the compressed image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical
- primitive for which texturing is enabled. To enable and disable
- two-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_2D</constant>. To enable and disable texturing using
- cube-mapped texture, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_CUBE_MAP</constant>.
- </para>
- <para>
- <function>glCompressedTexSubImage2D</function> redefines a contiguous subregion of an existing two-dimensional
- texture image. The texels referenced by <parameter>data</parameter> replace the portion of the
- existing texture array with x indices <parameter>xoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- and the y indices <parameter>yoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: yoffset + height - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive.
- This region may not include any texels
- outside the range of the texture array 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.
- </para>
- <para>
- <parameter>format</parameter> must be an extension-specified
- compressed-texture format. The <parameter>format</parameter> of the compressed texture
- image is selected by the GL implementation that compressed it (see
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>) and should be queried at the time the texture was
- compressed with <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCompressedTexSubImage2D</function> is available only if the GL version is 1.3 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant> are available only if the GL version is 1.3
- or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is one of these generic compressed internal formats:
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_COMPRESSED_SLUMINANCE</constant>,
- <constant>GL_COMPRESSED_SLUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_SRGB</constant>,
- <constant>GL_COMPRESSED_SRGBA</constant>, or
- <constant>GL_COMPRESSED_SRGB_ALPHA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
- the format, dimensions, and contents of the specified compressed image
- data.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
- supported by the specific compressed internal format as specified in the
- specific texture compression extension.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexSubImage2D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- Undefined results, including abnormal program termination, are generated if
- <parameter>data</parameter> is not encoded in a manner consistent with the extension
- specification defining the internal compression format.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant> or <constant>GL_TEXTURE_CUBE_MAP</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCompressedTexSubImage3D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCompressedTexSubImage3D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCompressedTexSubImage3D</refname>
- <refpurpose>specify a three-dimensional texture subimage in a compressed format</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCompressedTexSubImage3D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>yoffset</parameter></paramdef>
- <paramdef>GLint <parameter>zoffset</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLsizei <parameter>depth</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLsizei <parameter>imageSize</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_3D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>yoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the y direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>depth</parameter></term>
- <listitem>
- <para>
- Specifies the depth of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the compressed image data stored at address <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>imageSize</parameter></term>
- <listitem>
- <para>
- Specifies the number of unsigned bytes of image data starting at the
- address specified by <parameter>data</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the compressed image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical
- primitive for which texturing is enabled. To enable and disable
- three-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_TEXTURE_3D</constant>.
- </para>
- <para>
- <function>glCompressedTexSubImage3D</function> redefines a contiguous subregion of an existing three-dimensional
- texture image. The texels referenced by <parameter>data</parameter> replace the portion of the
- existing texture array with x indices <parameter>xoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- and the y indices <parameter>yoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: yoffset + height - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- and the z indices <parameter>zoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: zoffset + depth - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">zoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">depth</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive. This region may not include
- any texels outside the range of the texture array 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.
- </para>
- <para>
- <parameter>format</parameter> must be an extension-specified
- compressed-texture format. The <parameter>format</parameter> of the compressed texture
- image is selected by the GL implementation that compressed it (see
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>) and should be queried at the time the texture was
- compressed with <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCompressedTexSubImage3D</function> is available only if the GL version is 1.3 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is one of these generic compressed internal formats:
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_COMPRESSED_SLUMINANCE</constant>,
- <constant>GL_COMPRESSED_SLUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_SRGB</constant>,
- <constant>GL_COMPRESSED_SRGBA</constant>, or
- <constant>GL_COMPRESSED_SRGB_ALPHA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>imageSize</parameter> is not consistent with
- the format, dimensions, and contents of the specified compressed image
- data.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if parameter combinations are not
- supported by the specific compressed internal format as specified in the
- specific texture compression extension.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCompressedTexSubImage3D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- Undefined results, including abnormal program termination, are generated if
- <parameter>data</parameter> is not encoded in a manner consistent with the extension
- specification defining the internal compression format.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- and <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCopyTexImage1D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCopyTexImage1D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCopyTexImage1D</refname>
- <refpurpose>copy pixels into a 1D texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCopyTexImage1D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_1D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalformat</parameter></term>
- <listitem>
- <para>
- Specifies the internal format of the texture.
- Must be one of the following symbolic constants:
- <constant>GL_ALPHA</constant>,
- <constant>GL_ALPHA4</constant>,
- <constant>GL_ALPHA8</constant>,
- <constant>GL_ALPHA12</constant>,
- <constant>GL_ALPHA16</constant>,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_DEPTH_COMPONENT</constant>,
- <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>,
- <constant>GL_DEPTH_COMPONENT32</constant>,
- <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE4</constant>,
- <constant>GL_LUMINANCE8</constant>,
- <constant>GL_LUMINANCE12</constant>,
- <constant>GL_LUMINANCE16</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>,
- <constant>GL_LUMINANCE4_ALPHA4</constant>,
- <constant>GL_LUMINANCE6_ALPHA2</constant>,
- <constant>GL_LUMINANCE8_ALPHA8</constant>,
- <constant>GL_LUMINANCE12_ALPHA4</constant>,
- <constant>GL_LUMINANCE12_ALPHA12</constant>,
- <constant>GL_LUMINANCE16_ALPHA16</constant>,
- <constant>GL_INTENSITY</constant>,
- <constant>GL_INTENSITY4</constant>,
- <constant>GL_INTENSITY8</constant>,
- <constant>GL_INTENSITY12</constant>,
- <constant>GL_INTENSITY16</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_R3_G3_B2</constant>,
- <constant>GL_RGB4</constant>,
- <constant>GL_RGB5</constant>,
- <constant>GL_RGB8</constant>,
- <constant>GL_RGB10</constant>,
- <constant>GL_RGB12</constant>,
- <constant>GL_RGB16</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_RGBA2</constant>,
- <constant>GL_RGBA4</constant>,
- <constant>GL_RGB5_A1</constant>,
- <constant>GL_RGBA8</constant>,
- <constant>GL_RGB10_A2</constant>,
- <constant>GL_RGBA12</constant>,
- <constant>GL_RGBA16</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>,
- <constant>GL_SLUMINANCE8_ALPHA8</constant>,
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>, or
- <constant>GL_SRGB8_ALPHA8</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the window coordinates of the left corner
- of the row of pixels to be copied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image.
- Must be 0 or
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- The height of the texture image is 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glCopyTexImage1D</function> defines a one-dimensional texture image with pixels from the current
- <constant>GL_READ_BUFFER</constant>.
- </para>
- <para>
- The screen-aligned pixel row with left corner at
- <inlineequation><mml:math>
- <!-- eqn: (x, y):-->
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:mfenced>
- </mml:math></inlineequation>
- and with a length of
- <inlineequation><mml:math>
- <!-- eqn: width + 2 ( border ):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- defines the texture array
- at the mipmap level specified by <parameter>level</parameter>.
- <parameter>internalformat</parameter> specifies the internal format of the texture array.
- </para>
- <para>
- The pixels in the row are processed exactly as if
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> had been called, but the process stops just before
- final conversion.
- At this point all pixel component values are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- and then converted to the texture's internal format for storage in the texel
- array.
- </para>
- <para>
- Pixel ordering is such that lower
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- screen coordinates correspond to
- lower texture coordinates.
- </para>
- <para>
- If any of the pixels within the specified row of the current
- <constant>GL_READ_BUFFER</constant> are outside the window associated with the current
- rendering context, then the values obtained for those pixels are undefined.
- </para>
- <para>
- <function>glCopyTexImage1D</function> defines a one-dimensional texture image with pixels from the current
- <constant>GL_READ_BUFFER</constant>.
- </para>
- <para>
- When <parameter>internalformat</parameter> is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the <function>glPixelMap</function> function can be used to accomplish the conversion.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCopyTexImage1D</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- 1, 2, 3, and 4 are not accepted values for <parameter>internalformat</parameter>.
- </para>
- <para>
- An image with 0 width indicates a NULL texture.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components copied from the framebuffer may be processed by the imaging pipeline. See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
- </para>
- <para>
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, and <constant>GL_DEPTH_COMPONENT32</constant> are available only
- if the GL version is 1.4 or greater.
- </para>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- <para>
- The
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, and
- <constant>GL_SLUMINANCE8_ALPHA8</constant>
- internal formats are only available if the GL version is 2.1 or greater. See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details about sRGB conversion.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the allowable values.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2 max:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">max</mml:mi></mml:math></inlineequation>
- is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalformat</parameter> is not an allowable value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than 0 or greater than
- 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter> cannot be represented as
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer value of <emphasis>n</emphasis>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCopyTexImage1D</function> is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant> and there is no depth
- buffer.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCopyTexImage2D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCopyTexImage2D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCopyTexImage2D</refname>
- <refpurpose>copy pixels into a 2D texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCopyTexImage2D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalformat</parameter></term>
- <listitem>
- <para>
- Specifies the internal format of the texture.
- Must be one of the following symbolic constants:
- <constant>GL_ALPHA</constant>,
- <constant>GL_ALPHA4</constant>,
- <constant>GL_ALPHA8</constant>,
- <constant>GL_ALPHA12</constant>,
- <constant>GL_ALPHA16</constant>,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_DEPTH_COMPONENT</constant>,
- <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>,
- <constant>GL_DEPTH_COMPONENT32</constant>,
- <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE4</constant>,
- <constant>GL_LUMINANCE8</constant>,
- <constant>GL_LUMINANCE12</constant>,
- <constant>GL_LUMINANCE16</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>,
- <constant>GL_LUMINANCE4_ALPHA4</constant>,
- <constant>GL_LUMINANCE6_ALPHA2</constant>,
- <constant>GL_LUMINANCE8_ALPHA8</constant>,
- <constant>GL_LUMINANCE12_ALPHA4</constant>,
- <constant>GL_LUMINANCE12_ALPHA12</constant>,
- <constant>GL_LUMINANCE16_ALPHA16</constant>,
- <constant>GL_INTENSITY</constant>,
- <constant>GL_INTENSITY4</constant>,
- <constant>GL_INTENSITY8</constant>,
- <constant>GL_INTENSITY12</constant>,
- <constant>GL_INTENSITY16</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_R3_G3_B2</constant>,
- <constant>GL_RGB4</constant>,
- <constant>GL_RGB5</constant>,
- <constant>GL_RGB8</constant>,
- <constant>GL_RGB10</constant>,
- <constant>GL_RGB12</constant>,
- <constant>GL_RGB16</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_RGBA2</constant>,
- <constant>GL_RGBA4</constant>,
- <constant>GL_RGB5_A1</constant>,
- <constant>GL_RGBA8</constant>,
- <constant>GL_RGB10_A2</constant>,
- <constant>GL_RGBA12</constant>,
- <constant>GL_RGBA16</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>,
- <constant>GL_SLUMINANCE8_ALPHA8</constant>,
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>, or
- <constant>GL_SRGB8_ALPHA8</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the window coordinates of the lower left corner
- of the rectangular region of pixels to be copied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image.
- Must be 0 or
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture image.
- Must be 0 or
- <inlineequation><mml:math>
- <!-- eqn: 2 sup m + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glCopyTexImage2D</function> defines a two-dimensional texture image, or cube-map texture image
- with pixels from the current
- <constant>GL_READ_BUFFER</constant>.
- </para>
- <para>
- The screen-aligned pixel rectangle with lower left corner at (<parameter>x</parameter>,
- <parameter>y</parameter>) and with a width of
- <inlineequation><mml:math>
- <!-- eqn: width + 2 ( border ):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- and a height of
- <inlineequation><mml:math>
- <!-- eqn: height + 2 ( border ):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- defines the texture array
- at the mipmap level specified by <parameter>level</parameter>.
- <parameter>internalformat</parameter> specifies the internal format of the texture array.
- </para>
- <para>
- The pixels in the rectangle are processed exactly as if
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> had been called, but the process stops just before
- final conversion.
- At this point all pixel component values are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- and then converted to the texture's internal format for storage in the texel
- array.
- </para>
- <para>
- Pixel ordering is such that lower
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- screen coordinates correspond to
- lower
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>
- texture coordinates.
- </para>
- <para>
- If any of the pixels within the specified rectangle of the current
- <constant>GL_READ_BUFFER</constant> are outside the window associated with the current
- rendering context, then the values obtained for those pixels are undefined.
- </para>
- <para>
- When <parameter>internalformat</parameter> is one of the sRGB types, the GL does not automatically convert the source pixels to the sRGB color space. In this case, the <function>glPixelMap</function> function can be used to accomplish the conversion.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCopyTexImage2D</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- 1, 2, 3, and 4 are not accepted values for <parameter>internalformat</parameter>.
- </para>
- <para>
- An image with height or width of 0 indicates a NULL texture.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components read from the framebuffer may be processed by the imaging pipeline. See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
- </para>
- <para>
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant> are available only if the GL version is 1.3
- or greater.
- </para>
- <para>
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>, <constant>GL_DEPTH_COMPONENT24</constant>,
- and <constant>GL_DEPTH_COMPONENT32</constant> are available only if the GL version is 1.4
- or greater.
- </para>
- <para>
- The
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, and
- <constant>GL_SLUMINANCE8_ALPHA8</constant>
- internal formats are only available if the GL version is 2.1 or greater. See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> for specific details about sRGB conversion.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2 max:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">max</mml:mi></mml:math></inlineequation>
- is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than 0
- or greater than
- 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter> or <parameter>depth</parameter> cannot be represented as
- <inlineequation><mml:math>
- <!-- eqn: 2 sup k + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">k</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">k</mml:mi></mml:math></inlineequation>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalformat</parameter> is not an
- accepted format.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCopyTexImage2D</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant> and there is no depth
- buffer.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant> or <constant>GL_TEXTURE_CUBE_MAP</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glCopyTexSubImage1D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCopyTexSubImage1D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCopyTexSubImage1D</refname>
- <refpurpose>copy a one-dimensional texture subimage</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCopyTexSubImage1D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_1D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies the texel offset within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the window coordinates of the left corner
- of the row of pixels to be copied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glCopyTexSubImage1D</function> replaces a portion of a one-dimensional
- texture image with pixels from the current <constant>GL_READ_BUFFER</constant> (rather
- than from main memory, as is the case for <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>).
- </para>
- <para>
- The screen-aligned pixel row with left corner at (<parameter>x</parameter>,\ <parameter>y</parameter>), and with
- length <parameter>width</parameter> replaces the portion of the
- texture array with x indices <parameter>xoffset</parameter> through
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive. The destination in the texture array may not
- include any texels outside the texture array as it was
- originally specified.
- </para>
- <para>
- The pixels in the row are processed exactly as if
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> had been called, but the process stops just before
- final conversion.
- At this point, all pixel component values are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- and then converted to the texture's internal format for storage in the texel
- array.
- </para>
- <para>
- It is not an error to specify a subtexture with zero width, but
- such a specification has no effect.
- If any of the pixels within the specified row of the current
- <constant>GL_READ_BUFFER</constant> are outside the read window associated with the current
- rendering context, then the values obtained for those pixels are undefined.
- </para>
- <para>
- No change is made to the <emphasis>internalformat</emphasis>, <emphasis>width</emphasis>,
- or <emphasis>border</emphasis> parameters of the specified texture
- array or to texel values outside the specified subregion.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCopyTexSubImage1D</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components
- copied from the framebuffer may be processed by the imaging pipeline. See
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if /<parameter>target</parameter> is not <constant>GL_TEXTURE_1D</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not
- been defined by a previous <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry> operation.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if
- <inlineequation><mml:math>
- <!-- eqn: level > log sub 2(max):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">level</mml:mi>
- <mml:mo>></mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: xoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: (xoffset + width) > (w-b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">w</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_WIDTH</constant> and
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_BORDER</constant>
- of the texture image being modified.
- Note that
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- includes twice the border width.
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glCopyTexSubImage2D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCopyTexSubImage2D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCopyTexSubImage2D</refname>
- <refpurpose>copy a two-dimensional texture subimage</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCopyTexSubImage2D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>yoffset</parameter></paramdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>yoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the y direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the window coordinates of the lower left corner
- of the rectangular region of pixels to be copied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glCopyTexSubImage2D</function> replaces a rectangular portion of a two-dimensional texture image or
- cube-map texture image with pixels from the current <constant>GL_READ_BUFFER</constant>
- (rather than from main memory, as is the case for <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>).
- </para>
- <para>
- The screen-aligned pixel rectangle with lower left corner at
- <inlineequation><mml:math>
- <!-- eqn: (x, y):-->
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:mfenced>
- </mml:math></inlineequation>
- and with
- width <parameter>width</parameter> and height <parameter>height</parameter> replaces the portion of the
- texture array with x indices <parameter>xoffset</parameter> through
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive, and y indices <parameter>yoffset</parameter> through
- <inlineequation><mml:math>
- <!-- eqn: yoffset + height - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive, at the mipmap level specified by <parameter>level</parameter>.
- </para>
- <para>
- The pixels in the rectangle are processed exactly as if
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> had been called, but the process stops just before
- final conversion.
- At this point, all pixel component values are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- and then converted to the texture's internal format for storage in the texel
- array.
- </para>
- <para>
- The destination rectangle in the texture array may not include any texels
- outside the texture array as it was originally specified.
- It is not an error to specify a subtexture with zero width or height, but
- such a specification has no effect.
- </para>
- <para>
- If any of the pixels within the specified rectangle of the current
- <constant>GL_READ_BUFFER</constant> are outside the read window associated with the current
- rendering context, then the values obtained for those pixels are undefined.
- </para>
- <para>
- No change is made to the <emphasis>internalformat</emphasis>, <emphasis>width</emphasis>,
- <emphasis>height</emphasis>, or <emphasis>border</emphasis> parameters of the specified texture
- array or to texel values outside the specified subregion.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCopyTexSubImage2D</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant> are available only if the GL version is 1.3
- or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components
- read from the framebuffer may be processed by the imaging pipeline. See
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not been
- defined by a previous <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry> operation.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if
- <inlineequation><mml:math>
- <!-- eqn: level > log sub 2(max):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">level</mml:mi>
- <mml:mo>></mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">max</mml:mi></mml:math></inlineequation>
- is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: xoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: (xoffset + width) > (w - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">w</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: yoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: (yoffset + height) > (h - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">h</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_WIDTH</constant>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_HEIGHT</constant>,
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_BORDER</constant>
- of the texture image being modified.
- Note that
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- include twice the border width.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCopyTexSubImage2D</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glCopyTexSubImage3D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCopyTexSubImage3D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCopyTexSubImage3D</refname>
- <refpurpose>copy a three-dimensional texture subimage</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCopyTexSubImage3D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>yoffset</parameter></paramdef>
- <paramdef>GLint <parameter>zoffset</parameter></paramdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_3D</constant>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>yoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the y direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>zoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the z direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the window coordinates of the lower left corner
- of the rectangular region of pixels to be copied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glCopyTexSubImage3D</function> replaces a rectangular portion of a three-dimensional
- texture image with pixels from the current <constant>GL_READ_BUFFER</constant> (rather
- than from main memory, as is the case for <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>).
- </para>
- <para>
- The screen-aligned pixel rectangle with lower left corner at
- (<parameter>x</parameter>,\ <parameter>y</parameter>) and with
- width <parameter>width</parameter> and height <parameter>height</parameter> replaces the portion of the
- texture array with x indices <parameter>xoffset</parameter> through
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive, and y indices <parameter>yoffset</parameter> through
- <inlineequation><mml:math>
- <!-- eqn: yoffset + height - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive, at z index <parameter>zoffset</parameter> and at the mipmap level specified by <parameter>level</parameter>.
- </para>
- <para>
- The pixels in the rectangle are processed exactly as if
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> had been called, but the process stops just before
- final conversion.
- At this point, all pixel component values are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>
- and then converted to the texture's internal format for storage in the texel
- array.
- </para>
- <para>
- The destination rectangle in the texture array may not include any texels
- outside the texture array as it was originally specified.
- It is not an error to specify a subtexture with zero width or height, but
- such a specification has no effect.
- </para>
- <para>
- If any of the pixels within the specified rectangle of the current
- <constant>GL_READ_BUFFER</constant> are outside the read window associated with the current
- rendering context, then the values obtained for those pixels are undefined.
- </para>
- <para>
- No change is made to the <emphasis>internalformat</emphasis>, <emphasis>width</emphasis>,
- <emphasis>height</emphasis>, <emphasis>depth</emphasis>, or <emphasis>border</emphasis> parameters of the specified texture
- array or to texel values outside the specified subregion.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glCopyTexSubImage3D</function> is available only if the GL version is 1.2 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components
- copied from the framebuffer may be processed by the imaging pipeline, as
- if they were a two-dimensional texture. See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> for
- specific details.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if /<parameter>target</parameter> is not <constant>GL_TEXTURE_3D</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not
- been defined by a previous <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> operation.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if
- <inlineequation><mml:math>
- <!-- eqn: level > log sub 2(max):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">level</mml:mi>
- <mml:mo>></mml:mo>
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">max</mml:mi></mml:math></inlineequation>
- is the returned value of <constant>GL_MAX_3D_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: xoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: (xoffset + width) > (w - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">w</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: yoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: (yoffset + height) > (h - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">h</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: zoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">zoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: (zoffset + 1) > (d - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">zoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">d</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_WIDTH</constant>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_HEIGHT</constant>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_DEPTH</constant>,
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_BORDER</constant>
- of the texture image being modified.
- Note that
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>,
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
- include twice the border width.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCopyTexSubImage3D</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glCreateProgram">
- <refmeta>
- <refentrytitle>glCreateProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCreateProgram</refname>
- <refpurpose>Creates a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLuint <function>glCreateProgram</function></funcdef>
- <paramdef><parameter>void</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="description"><title>Description</title>
- <para><function>glCreateProgram</function> creates an empty
- program object and returns a non-zero value by which it can be
- referenced. A program object is an object to which shader
- objects can be attached. This provides a mechanism to specify
- the shader objects that will be linked to create a program. It
- also provides a means for checking the compatibility of the
- shaders that will be used to create a program (for instance,
- checking the compatibility between a vertex shader and a
- fragment shader). When no longer needed as part of a program
- object, shader objects can be detached.</para>
-
- <para>One or more executables are created in a program object by
- successfully attaching shader objects to it with
- <citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- successfully compiling the shader objects with
- <citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- and successfully linking the program object with
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>.
- These executables are made part of current state when
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>
- is called. Program objects can be deleted by calling
- <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>.
- The memory associated with the program object will be deleted
- when it is no longer part of current rendering state for any
- context.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glCreateProgram</function> is available only if
- the GL version is 2.0 or greater.</para>
-
- <para>Like display lists and texture objects, the name space for
- program objects may be shared across a set of contexts, as long
- as the server sides of the contexts share the same address
- space. If the name space is shared across contexts, any attached
- objects and the data associated with those attached objects are
- shared as well.</para>
-
- <para>Applications are responsible for providing the
- synchronization across API calls when objects are accessed from
- different execution threads.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>This function returns 0 if an error occurs creating the program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glCreateProgram</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
-
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with a valid program object and the index of an active attribute
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with a valid program object and the index of an active uniform
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with a valid program object</para>
-
- <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
- with a valid program object and the name of an attribute
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with a valid program object and the parameter to be queried</para>
-
- <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
- with a valid program object</para>
-
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- with a valid program object and the location of a uniform
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- with a valid program object and the name of a uniform
- variable</para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glCreateShader">
- <refmeta>
- <refentrytitle>glCreateShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCreateShader</refname>
- <refpurpose>Creates a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLuint <function>glCreateShader</function></funcdef>
- <paramdef>GLenum <parameter>shaderType</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shaderType</parameter></term>
- <listitem>
- <para>Specifies the type of shader to be created.
- Must be either <constant>GL_VERTEX_SHADER</constant>
- or <constant>GL_FRAGMENT_SHADER</constant>.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glCreateShader</function> creates an empty
- shader object and returns a non-zero value by which it can be
- referenced. A shader object is used to maintain the source code
- strings that define a shader. <parameter>shaderType</parameter>
- indicates the type of shader to be created. Two types of shaders
- are supported. A shader of type
- <constant>GL_VERTEX_SHADER</constant> is a shader that is
- intended to run on the programmable vertex processor and replace
- the fixed functionality vertex processing in OpenGL. A shader of
- type <constant>GL_FRAGMENT_SHADER</constant> is a shader that is
- intended to run on the programmable fragment processor and
- replace the fixed functionality fragment processing in
- OpenGL.</para>
-
- <para>When created, a shader object's
- <constant>GL_SHADER_TYPE</constant> parameter is set to either
- <constant>GL_VERTEX_SHADER</constant> or
- <constant>GL_FRAGMENT_SHADER</constant>, depending on the value
- of <parameter>shaderType</parameter>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glCreateShader</function> is available only if
- the GL version is 2.0 or greater.</para>
-
- <para>Like display lists and texture objects, the name space for
- shader objects may be shared across a set of contexts, as long
- as the server sides of the contexts share the same address
- space. If the name space is shared across contexts, any attached
- objects and the data associated with those attached objects are
- shared as well.</para>
-
- <para>Applications are responsible for providing the
- synchronization across API calls when objects are accessed from
- different execution threads.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>This function returns 0 if an error occurs creating the
- shader object.</para>
-
- <para><constant>GL_INVALID_ENUM</constant> is generated if
- <parameter>shaderType</parameter> is not an accepted value.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glCreateShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with a valid shader object and the parameter to be queried</para>
-
- <para><citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>
- with a valid shader object</para>
-
- <para><citerefentry><refentrytitle>glGetShaderSource</refentrytitle></citerefentry>
- with a valid shader object</para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glCullFace">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glCullFace</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glCullFace</refname>
- <refpurpose>specify whether front- or back-facing facets can be culled</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glCullFace</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies whether front- or back-facing facets are candidates for culling.
- Symbolic constants
- <constant>GL_FRONT</constant>, <constant>GL_BACK</constant>, and <constant>GL_FRONT_AND_BACK</constant> are accepted.
- The initial value is <constant>GL_BACK</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glCullFace</function> specifies whether front- or back-facing facets are culled
- (as specified by <emphasis>mode</emphasis>) when facet culling is enabled. Facet
- culling is initially disabled.
- To enable and disable facet culling, call the
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> commands
- with the argument <constant>GL_CULL_FACE</constant>.
- Facets include triangles,
- quadrilaterals,
- polygons, and
- rectangles.
- </para>
- <para>
- <citerefentry><refentrytitle>glFrontFace</refentrytitle></citerefentry> specifies which of the clockwise and counterclockwise facets
- are front-facing and back-facing.
- See <citerefentry><refentrytitle>glFrontFace</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If <parameter>mode</parameter> is <constant>GL_FRONT_AND_BACK</constant>, no facets are drawn, but other
- primitives such as points and lines are drawn.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glCullFace</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_CULL_FACE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_CULL_FACE_MODE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFrontFace</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>
+++ /dev/null
-<?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="glDeleteBuffers">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDeleteBuffers</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDeleteBuffers</refname>
- <refpurpose>delete named buffer objects</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDeleteBuffers</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>const GLuint * <parameter>buffers</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>
- Specifies the number of buffer objects to be deleted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>buffers</parameter></term>
- <listitem>
- <para>
- Specifies an array of buffer objects to be deleted.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDeleteBuffers</function> deletes <parameter>n</parameter> buffer objects named by the elements of the array <parameter>buffers</parameter>.
- After a buffer object is deleted, it has no contents,
- and its name is free for reuse (for example by <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>).
- If a buffer object that is currently bound is deleted, the binding reverts
- to 0 (the absence of any buffer object, which reverts to client memory usage).
- </para>
- <para>
- <function>glDeleteBuffers</function> silently ignores 0's and names that do not correspond to
- existing buffer objects.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glDeleteBuffers</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDeleteBuffers</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glDeleteProgram">
- <refmeta>
- <refentrytitle>glDeleteProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDeleteProgram</refname>
- <refpurpose>Deletes a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDeleteProgram</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- deleted.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glDeleteProgram</function> frees the memory and
- invalidates the name associated with the program object
- specified by <parameter>program.</parameter> This command
- effectively undoes the effects of a call to
- <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>.</para>
-
- <para>If a program object is in use as part of current rendering
- state, it will be flagged for deletion, but it will not be
- deleted until it is no longer part of current state for any
- rendering context. If a program object to be deleted has shader
- objects attached to it, those shader objects will be
- automatically detached but not deleted unless they have already
- been flagged for deletion by a previous call to
- <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>.
- A value of 0 for <parameter>program</parameter> will be silently
- ignored.</para>
-
- <para>To determine whether a program object has been flagged for
- deletion, call
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_DELETE_STATUS</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glDeleteProgram</function> is available only if
- the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glDeleteProgram</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_CURRENT_PROGRAM</constant></para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_DELETE_STATUS</constant></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glDeleteQueries">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDeleteQueries</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDeleteQueries</refname>
- <refpurpose>delete named query objects</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDeleteQueries</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>const GLuint * <parameter>ids</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>
- Specifies the number of query objects to be deleted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>ids</parameter></term>
- <listitem>
- <para>
- Specifies an array of query objects to be deleted.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDeleteQueries</function> deletes <parameter>n</parameter> query objects named by the elements of the array <parameter>ids</parameter>.
- After a query object is deleted, it has no contents,
- and its name is free for reuse (for example by <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>).
- </para>
- <para>
- <function>glDeleteQueries</function> silently ignores 0's and names that do not correspond to
- existing query objects.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glDeleteQueries</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDeleteQueries</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glDeleteShader">
- <refmeta>
- <refentrytitle>glDeleteShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDeleteShader</refname>
- <refpurpose>Deletes a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDeleteShader</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object to be deleted.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glDeleteShader</function> frees the memory and
- invalidates the name associated with the shader object specified
- by <parameter>shader</parameter>. This command effectively
- undoes the effects of a call to
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>.</para>
-
- <para>If a shader object to be deleted is attached to a program
- object, it will be flagged for deletion, but it will not be
- deleted until it is no longer attached to any program object,
- for any rendering context (i.e., it must be detached from
- wherever it was attached before it will be deleted). A value of
- 0 for <parameter>shader</parameter> will be silently
- ignored.</para>
-
- <para>To determine whether an object has been flagged for
- deletion, call
- <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and
- <constant>GL_DELETE_STATUS</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glDeleteShader</function> is available only if
- the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>shader</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glDeleteShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with the program object to be queried</para>
-
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and
- <constant>GL_DELETE_STATUS</constant></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glDeleteTextures">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDeleteTextures</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDeleteTextures</refname>
- <refpurpose>delete named textures</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDeleteTextures</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>const GLuint * <parameter>textures</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>
- Specifies the number of textures to be deleted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>textures</parameter></term>
- <listitem>
- <para>
- Specifies an array of textures to be deleted.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDeleteTextures</function> deletes <parameter>n</parameter> textures named by the elements of the array <parameter>textures</parameter>.
- After a texture is deleted, it has no contents or dimensionality,
- and its name is free for reuse (for example by <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>).
- If a texture that is currently bound is deleted, the binding reverts
- to 0 (the default texture).
- </para>
- <para>
- <function>glDeleteTextures</function> silently ignores 0's and names that do not correspond to
- existing textures.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glDeleteTextures</function> is available only if the GL version is 1.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDeleteTextures</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsTexture</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glDepthFunc">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDepthFunc</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDepthFunc</refname>
- <refpurpose>specify the value used for depth buffer comparisons</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDepthFunc</function></funcdef>
- <paramdef>GLenum <parameter>func</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>func</parameter></term>
- <listitem>
- <para>
- Specifies the depth comparison function.
- Symbolic constants
- <constant>GL_NEVER</constant>,
- <constant>GL_LESS</constant>,
- <constant>GL_EQUAL</constant>,
- <constant>GL_LEQUAL</constant>,
- <constant>GL_GREATER</constant>,
- <constant>GL_NOTEQUAL</constant>,
- <constant>GL_GEQUAL</constant>, and
- <constant>GL_ALWAYS</constant> are accepted.
- The initial value is <constant>GL_LESS</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDepthFunc</function> specifies the function used to compare each incoming pixel depth value
- with the depth value present in the depth buffer.
- The comparison is performed only if depth testing is enabled.
- (See <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> of <constant>GL_DEPTH_TEST</constant>.)
- </para>
- <para>
- <parameter>func</parameter> specifies the conditions under which the pixel will be drawn.
- The comparison functions are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_NEVER</constant></term>
- <listitem>
- <para>
- Never passes.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LESS</constant></term>
- <listitem>
- <para>
- Passes if the incoming depth value is less than the stored depth value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EQUAL</constant></term>
- <listitem>
- <para>
- Passes if the incoming depth value is equal to the stored depth value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LEQUAL</constant></term>
- <listitem>
- <para>
- Passes if the incoming depth value is less than or equal to
- the stored depth value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREATER</constant></term>
- <listitem>
- <para>
- Passes if the incoming depth value is greater than the stored depth value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NOTEQUAL</constant></term>
- <listitem>
- <para>
- Passes if the incoming depth value is not equal to the stored depth value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GEQUAL</constant></term>
- <listitem>
- <para>
- Passes if the incoming depth value is greater than or equal to
- the stored depth value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALWAYS</constant></term>
- <listitem>
- <para>
- Always passes.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The initial value of <parameter>func</parameter> is <constant>GL_LESS</constant>.
- Initially, depth testing is disabled. If depth testing is disabled or if no
- depth buffer exists, it is as if the depth test always passes.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Even if the depth buffer exists and the depth mask is non-zero, the
- depth buffer is not updated if the depth test is disabled.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>func</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDepthFunc</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_FUNC</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_TEST</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonOffset</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>
+++ /dev/null
-<?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="glDepthMask">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDepthMask</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDepthMask</refname>
- <refpurpose>enable or disable writing into the depth buffer</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDepthMask</function></funcdef>
- <paramdef>GLboolean <parameter>flag</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>flag</parameter></term>
- <listitem>
- <para>
- Specifies whether the depth buffer is enabled for writing.
- If <parameter>flag</parameter> is <constant>GL_FALSE</constant>,
- depth buffer writing is disabled.
- Otherwise, it is enabled.
- Initially, depth buffer writing is enabled.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDepthMask</function> specifies whether the depth buffer is enabled for writing.
- If <parameter>flag</parameter> is <constant>GL_FALSE</constant>,
- depth buffer writing is disabled.
- Otherwise, it is enabled.
- Initially, depth buffer writing is enabled.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDepthMask</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_WRITEMASK</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</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>
+++ /dev/null
-<?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="glDepthRange">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDepthRange</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDepthRange</refname>
- <refpurpose>specify mapping of depth values from normalized device coordinates to window coordinates</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDepthRange</function></funcdef>
- <paramdef>GLclampd <parameter>nearVal</parameter></paramdef>
- <paramdef>GLclampd <parameter>farVal</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>nearVal</parameter></term>
- <listitem>
- <para>
- Specifies the mapping of the near clipping plane to window coordinates.
- The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>farVal</parameter></term>
- <listitem>
- <para>
- Specifies the mapping of the far clipping plane to window coordinates.
- The initial value is 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- After clipping and division by <emphasis>w</emphasis>,
- depth coordinates range from
- <inlineequation><mml:math>
- <!-- eqn: -1:-->
- <mml:mn>-1</mml:mn>
- </mml:math></inlineequation>
- to 1,
- corresponding to the near and far clipping planes.
- <function>glDepthRange</function> specifies a linear mapping of the normalized depth coordinates
- in this range to window depth coordinates.
- Regardless of the actual depth buffer implementation,
- window coordinate depth values are treated as though they range
- from 0 through 1 (like color components).
- Thus,
- the values accepted by <function>glDepthRange</function> are both clamped to this range
- before they are accepted.
- </para>
- <para>
- The setting of (0,1) maps the near plane to 0 and
- the far plane to 1.
- With this mapping,
- the depth buffer range is fully utilized.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- It is not necessary that <parameter>nearVal</parameter> be less than <parameter>farVal</parameter>.
- Reverse mappings such as
- <inlineequation><mml:math>
- <!-- eqn: nearVal = 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">nearVal</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- and
- <inlineequation><mml:math>
- <!-- eqn: farVal = 0:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">farVal</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mn>0</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- are acceptable.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDepthRange</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEPTH_RANGE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glViewport</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>
+++ /dev/null
-<?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="glDetachShader">
- <refmeta>
- <refentrytitle>glDetachShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDetachShader</refname>
- <refpurpose>Detaches a shader object from a program object to which it is attached</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDetachShader</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object from which to
- detach the shader object.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object to be
- detached.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glDetachShader</function> detaches the shader
- object specified by <parameter>shader</parameter> from the
- program object specified by <parameter>program</parameter>. This
- command can be used to undo the effect of the command
- <citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>.</para>
-
- <para>If <parameter>shader</parameter> has already been flagged
- for deletion by a call to
- <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>
- and it is not attached to any other program object, it will be
- deleted after it has been detached.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glDetachShader</function> is available only if
- the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if either
- <parameter>program</parameter> or <parameter>shader</parameter>
- is a value that was not generated by OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not a shader object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not attached to
- <parameter>program</parameter>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glDetachShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with the handle of a valid program object</para>
-
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and
- <constant>GL_DELETE_STATUS</constant></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glDrawArrays">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDrawArrays</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDrawArrays</refname>
- <refpurpose>render primitives from array data</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDrawArrays</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- <paramdef>GLint <parameter>first</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies what kind of primitives to render.
- Symbolic constants
- <constant>GL_POINTS</constant>,
- <constant>GL_LINE_STRIP</constant>,
- <constant>GL_LINE_LOOP</constant>,
- <constant>GL_LINES</constant>,
- <constant>GL_TRIANGLE_STRIP</constant>,
- <constant>GL_TRIANGLE_FAN</constant>,
- <constant>GL_TRIANGLES</constant>,
- <constant>GL_QUAD_STRIP</constant>,
- <constant>GL_QUADS</constant>,
- and <constant>GL_POLYGON</constant> are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>first</parameter></term>
- <listitem>
- <para>
- Specifies the starting index in the enabled arrays.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>
- Specifies the number of indices to be rendered.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDrawArrays</function> specifies multiple geometric primitives
- with very few subroutine calls. Instead of calling a GL procedure
- to pass each individual vertex, normal, texture coordinate, edge
- flag, or color, you can prespecify
- separate arrays of vertices, normals, and colors and use them to
- construct a sequence of primitives with a single
- call to <function>glDrawArrays</function>.
- </para>
- <para>
- When <function>glDrawArrays</function> is called, it uses <parameter>count</parameter> sequential elements from each
- enabled array to construct a sequence of geometric primitives,
- beginning with element <parameter>first</parameter>. <parameter>mode</parameter> specifies what kind of
- primitives are constructed and how the array elements
- construct those primitives. If <constant>GL_VERTEX_ARRAY</constant> is not enabled, no
- geometric primitives are generated.
- </para>
- <para>
- Vertex attributes that are modified by <function>glDrawArrays</function> have an
- unspecified value after <function>glDrawArrays</function> returns. For example, if
- <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
- undefined after <function>glDrawArrays</function> executes. Attributes that aren't
- modified remain well defined.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glDrawArrays</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <function>glDrawArrays</function> is included in display lists. If <function>glDrawArrays</function> is entered into a
- display list,
- the necessary array data (determined by the array pointers and
- enables) is also
- entered into the display list. Because the array pointers and
- enables are client-side state, their values affect display lists
- when the lists are created, not when the lists are executed.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
- enabled array and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDrawArrays</function> is executed between
- the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexCoordPointer</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>
+++ /dev/null
-<?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="glDrawBuffer">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDrawBuffer</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDrawBuffer</refname>
- <refpurpose>specify which color buffers are to be drawn into</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDrawBuffer</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies up to four color buffers to be drawn into.
- Symbolic constants
- <constant>GL_NONE</constant>,
- <constant>GL_FRONT_LEFT</constant>,
- <constant>GL_FRONT_RIGHT</constant>,
- <constant>GL_BACK_LEFT</constant>,
- <constant>GL_BACK_RIGHT</constant>,
- <constant>GL_FRONT</constant>,
- <constant>GL_BACK</constant>,
- <constant>GL_LEFT</constant>,
- <constant>GL_RIGHT</constant>,
- <constant>GL_FRONT_AND_BACK</constant>, and
- <constant>GL_AUX</constant><emphasis>i</emphasis>,
- where <emphasis>i</emphasis> is between 0 and the value of <constant>GL_AUX_BUFFERS</constant> minus 1,
- are accepted. (<constant>GL_AUX_BUFFERS</constant> is not the upper limit; use <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- to query the number of available aux buffers.)
- The initial value is <constant>GL_FRONT</constant> for single-buffered contexts,
- and <constant>GL_BACK</constant> for double-buffered contexts.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- When colors are written to the frame buffer,
- they are written into the color buffers specified by <function>glDrawBuffer</function>.
- The specifications are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_NONE</constant></term>
- <listitem>
- <para>
- No color buffers are written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT_LEFT</constant></term>
- <listitem>
- <para>
- Only the front left color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT_RIGHT</constant></term>
- <listitem>
- <para>
- Only the front right color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BACK_LEFT</constant></term>
- <listitem>
- <para>
- Only the back left color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BACK_RIGHT</constant></term>
- <listitem>
- <para>
- Only the back right color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT</constant></term>
- <listitem>
- <para>
- Only the front left and front right color buffers are written.
- If there is no front right color buffer,
- only the front left color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BACK</constant></term>
- <listitem>
- <para>
- Only the back left and back right color buffers are written.
- If there is no back right color buffer,
- only the back left color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LEFT</constant></term>
- <listitem>
- <para>
- Only the front left and back left color buffers are written.
- If there is no back left color buffer,
- only the front left color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RIGHT</constant></term>
- <listitem>
- <para>
- Only the front right and back right color buffers are written.
- If there is no back right color buffer,
- only the front right color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT_AND_BACK</constant></term>
- <listitem>
- <para>
- All the front and back color buffers
- (front left, front right, back left, back right)
- are written.
- If there are no back color buffers,
- only the front left and front right color buffers are written.
- If there are no right color buffers,
- only the front left and back left color buffers are written.
- If there are no right or back color buffers,
- only the front left color buffer is written.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_AUX</constant><emphasis>i</emphasis></term>
- <listitem>
- <para>
- Only auxiliary color buffer <emphasis>i</emphasis> is written.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- If more than one color buffer is selected for drawing,
- then blending or logical operations are computed and applied independently
- for each color buffer and can produce different results in each buffer.
- </para>
- <para>
- Monoscopic contexts include only
- <emphasis>left</emphasis>
- buffers, and stereoscopic contexts include both
- <emphasis>left</emphasis>
- and
- <emphasis>right</emphasis>
- buffers.
- Likewise, single-buffered contexts include only
- <emphasis>front</emphasis>
- buffers, and double-buffered contexts include both
- <emphasis>front</emphasis>
- and
- <emphasis>back</emphasis>
- buffers.
- The context is selected at GL initialization.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- It is always the case that <constant>GL_AUX</constant>
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
- = <constant>GL_AUX0</constant> +
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if none of the buffers indicated
- by <parameter>mode</parameter> exists.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDrawBuffer</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DRAW_BUFFER</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_AUX_BUFFERS</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadBuffer</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>
+++ /dev/null
-<?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="glDrawBuffers">
- <refmeta>
- <refentrytitle>glDrawBuffers</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDrawBuffers</refname>
- <refpurpose>Specifies a list of color buffers to be drawn into</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDrawBuffers</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>const GLenum *<parameter>bufs</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>Specifies the number of buffers in
- <parameter>bufs</parameter>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>bufs</parameter></term>
- <listitem>
- <para>Points to an array of symbolic constants
- specifying the buffers into which fragment colors or
- data values will be written.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glDrawBuffers</function> defines an array of
- buffers into which fragment color values or fragment data will
- be written. If no fragment shader is active, rendering
- operations will generate only one fragment color per fragment
- and it will be written into each of the buffers specified by
- <parameter>bufs</parameter>. If a fragment shader is active and
- it writes a value to the output variable
- <code>gl_FragColor</code>, then that value will be
- written into each of the buffers specified by
- <parameter>bufs</parameter>. If a fragment shader is active and
- it writes a value to one or more elements of the output array
- variable <code>gl_FragData[]</code>, then the value of
- <code>gl_FragData[0] </code> will be written into the
- first buffer specified by <parameter>bufs</parameter>, the value
- of <code>gl_FragData[1] </code> will be written into the
- second buffer specified by <parameter>bufs</parameter>, and so
- on up to <code>gl_FragData[n-1]</code>. The draw buffer
- used for <code>gl_FragData[n]</code> and beyond is
- implicitly set to be <constant>GL_NONE</constant>.</para>
-
- <para>The symbolic constants contained in
- <parameter>bufs</parameter> may be any of the following:</para>
-
- <variablelist>
- <varlistentry>
- <term><constant>GL_NONE</constant></term>
- <listitem>
- <para>The fragment color/data value is not written into
- any color buffer.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT_LEFT</constant></term>
- <listitem>
- <para>The fragment color/data value is written into the
- front left color buffer.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT_RIGHT</constant></term>
- <listitem>
- <para>The fragment color/data value is written into the
- front right color buffer.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BACK_LEFT</constant></term>
- <listitem>
- <para>The fragment color/data value is written into the
- back left color buffer.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BACK_RIGHT</constant></term>
- <listitem>
- <para>The fragment color/data value is written into the
- back right color buffer.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_AUXi</constant></term>
- <listitem>
- <para>The fragment color/data value is written into
- auxiliary buffer <code>i</code>.</para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <para>Except for <constant>GL_NONE</constant>, the preceding
- symbolic constants may not appear more than once in
- <parameter>bufs</parameter>. The maximum number of draw buffers
- supported is implementation dependent and can be queried by
- calling
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_MAX_DRAW_BUFFERS</constant>. The
- number of auxiliary buffers can be queried by calling
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_AUX_BUFFERS</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glDrawBuffers</function> is available only if
- the GL version is 2.0 or greater.</para>
-
- <para>It is always the case that <constant>GL_AUXi</constant> =
- <constant>GL_AUX0</constant> + <code>i</code>.</para>
-
- <para>The symbolic constants <constant>GL_FRONT</constant>,
- <constant>GL_BACK</constant>, <constant>GL_LEFT</constant>,
- <constant>GL_RIGHT</constant>, and
- <constant>GL_FRONT_AND_BACK</constant> are not allowed in the
- <parameter>bufs</parameter> array since they may refer to
- multiple buffers.</para>
-
- <para>If a fragment shader writes to neither
- <code>gl_FragColor</code> nor
- <code>gl_FragData</code>, the values of the fragment
- colors following shader execution are undefined. For each
- fragment generated in this situation, a different value may be
- written into each of the buffers specified by
- <parameter>bufs</parameter>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_ENUM</constant> is generated if one of the
- values in <parameter>bufs</parameter> is not an accepted
- value.</para>
-
- <para><constant>GL_INVALID_ENUM</constant> is generated if
- <parameter>n</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if a
- symbolic constant other than <constant>GL_NONE</constant>
- appears more than once in <parameter>bufs</parameter>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if any of
- the entries in <parameter>bufs</parameter> (other than
- <constant>GL_NONE</constant> ) indicates a color buffer that
- does not exist in the current GL context.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>n</parameter> is greater than
- <constant>GL_MAX_DRAW_BUFFERS</constant>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glDrawBuffers</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_DRAW_BUFFERS</constant></para>
-
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_DRAW_BUFFERSi</constant> where
- <code>i</code> indicates the number of the draw buffer
- whose value is to be queried</para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para> <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glDrawElements">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDrawElements</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDrawElements</refname>
- <refpurpose>render primitives from array data</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDrawElements</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>indices</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies what kind of primitives to render.
- Symbolic constants
- <constant>GL_POINTS</constant>,
- <constant>GL_LINE_STRIP</constant>,
- <constant>GL_LINE_LOOP</constant>,
- <constant>GL_LINES</constant>,
- <constant>GL_TRIANGLE_STRIP</constant>,
- <constant>GL_TRIANGLE_FAN</constant>,
- <constant>GL_TRIANGLES</constant>,
- <constant>GL_QUAD_STRIP</constant>,
- <constant>GL_QUADS</constant>,
- and <constant>GL_POLYGON</constant> are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>
- Specifies the number of elements to be rendered.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the type of the values in <parameter>indices</parameter>. Must be one of
- <constant>GL_UNSIGNED_BYTE</constant>, <constant>GL_UNSIGNED_SHORT</constant>, or
- <constant>GL_UNSIGNED_INT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>indices</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the location where the indices are stored.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDrawElements</function> specifies multiple geometric primitives
- with very few subroutine calls. Instead of calling a GL function
- to pass each individual vertex, normal, texture coordinate, edge
- flag, or color, you can prespecify
- separate arrays of vertices, normals, and so on, and use them to
- construct a sequence of primitives with a single
- call to <function>glDrawElements</function>.
- </para>
- <para>
- When <function>glDrawElements</function> is called, it uses <parameter>count</parameter> sequential elements from an
- enabled array, starting at <parameter>indices</parameter> to construct a sequence of
- geometric primitives. <parameter>mode</parameter> specifies what kind of primitives are
- constructed and how the array elements construct these primitives. If
- more than one array is enabled, each is used. If
- <constant>GL_VERTEX_ARRAY</constant> is not enabled, no geometric primitives are
- constructed.
- </para>
- <para>
- Vertex attributes that are modified by <function>glDrawElements</function> have an
- unspecified value after <function>glDrawElements</function> returns. For example, if
- <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
- undefined after <function>glDrawElements</function> executes. Attributes that aren't
- modified maintain their previous values.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glDrawElements</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <function>glDrawElements</function> is included in display lists. If <function>glDrawElements</function> is entered into a
- display list,
- the necessary array data (determined by the array pointers and
- enables) is also
- entered into the display list. Because the array pointers and
- enables are client-side state, their values affect display lists
- when the lists are created, not when the lists are executed.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
- enabled array or the element array and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDrawElements</function> is executed between
- the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexCoordPointer</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>
+++ /dev/null
-<?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="glDrawRangeElements">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glDrawRangeElements</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glDrawRangeElements</refname>
- <refpurpose>render primitives from array data</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDrawRangeElements</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- <paramdef>GLuint <parameter>start</parameter></paramdef>
- <paramdef>GLuint <parameter>end</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>indices</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies what kind of primitives to render.
- Symbolic constants
- <constant>GL_POINTS</constant>,
- <constant>GL_LINE_STRIP</constant>,
- <constant>GL_LINE_LOOP</constant>,
- <constant>GL_LINES</constant>,
- <constant>GL_TRIANGLE_STRIP</constant>,
- <constant>GL_TRIANGLE_FAN</constant>,
- <constant>GL_TRIANGLES</constant>,
- <constant>GL_QUAD_STRIP</constant>,
- <constant>GL_QUADS</constant>,
- and <constant>GL_POLYGON</constant> are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>start</parameter></term>
- <listitem>
- <para>
- Specifies the minimum array index contained in <parameter>indices</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>end</parameter></term>
- <listitem>
- <para>
- Specifies the maximum array index contained in <parameter>indices</parameter>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>
- Specifies the number of elements to be rendered.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the type of the values in <parameter>indices</parameter>. Must be one of
- <constant>GL_UNSIGNED_BYTE</constant>, <constant>GL_UNSIGNED_SHORT</constant>, or
- <constant>GL_UNSIGNED_INT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>indices</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the location where the indices are stored.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glDrawRangeElements</function> is a restricted form of <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>. <parameter>mode</parameter>, <parameter>start</parameter>, <parameter>end</parameter>,
- and <parameter>count</parameter> match the corresponding arguments to <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>, with
- the additional constraint that all values in the arrays <parameter>count</parameter> must lie
- between <parameter>start</parameter> and <parameter>end</parameter>, inclusive.
- </para>
- <para>
- Implementations denote recommended maximum amounts of vertex and
- index data,
- which may be queried by calling <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_MAX_ELEMENTS_VERTICES</constant> and <constant>GL_MAX_ELEMENTS_INDICES</constant>.
- If
- <inlineequation><mml:math>
- <!-- eqn: end - start + 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">end</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">start</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- is greater than the value of
- <constant>GL_MAX_ELEMENTS_VERTICES</constant>, or if <parameter>count</parameter> is greater than the value of
- <constant>GL_MAX_ELEMENTS_INDICES</constant>, then the call may operate at reduced
- performance. There is no requirement that all vertices in the range
- <inlineequation><mml:math>
- <!-- eqn: [start, end]:-->
- <mml:mfenced open="[" close="]">
- <mml:mi mathvariant="italic">start</mml:mi>
- <mml:mi mathvariant="italic">end</mml:mi>
- </mml:mfenced>
- </mml:math></inlineequation>
- be referenced. However, the implementation may
- partially process unused vertices, reducing performance from what could
- be achieved with an optimal index set.
- </para>
- <para>
- When <function>glDrawRangeElements</function> is called, it uses <parameter>count</parameter> sequential elements from an
- enabled array, starting at <parameter>start</parameter> to construct a sequence of
- geometric primitives. <parameter>mode</parameter> specifies what kind of primitives are
- constructed, and how the array elements construct these primitives. If
- more than one array is enabled, each is used. If
- <constant>GL_VERTEX_ARRAY</constant> is not enabled, no geometric primitives are
- constructed.
- </para>
- <para>
- Vertex attributes that are modified by <function>glDrawRangeElements</function> have an
- unspecified value after <function>glDrawRangeElements</function> returns. For example, if
- <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
- undefined after <function>glDrawRangeElements</function> executes. Attributes that aren't
- modified maintain their previous values.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glDrawRangeElements</function> is available only if the GL version is 1.2 or greater.
- </para>
- <para>
- <function>glDrawRangeElements</function> is included in display lists. If <function>glDrawRangeElements</function> is entered into a
- display list,
- the necessary array data (determined by the array pointers and
- enables) is also
- entered into the display list. Because the array pointers and
- enables are client-side state, their values affect display lists
- when the lists are created, not when the lists are executed.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- It is an error for indices to lie outside the range
- <inlineequation><mml:math>
- <!-- eqn: [start, end]:-->
- <mml:mfenced open="[" close="]">
- <mml:mi mathvariant="italic">start</mml:mi>
- <mml:mi mathvariant="italic">end</mml:mi>
- </mml:mfenced>
- </mml:math></inlineequation>,
- but implementations may not check for this situation. Such indices
- cause implementation-dependent behavior.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: end < start:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">end</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">start</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
- enabled array or the element array and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glDrawRangeElements</function> is executed between
- the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_ELEMENTS_VERTICES</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_ELEMENTS_INDICES</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexCoordPointer</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>
+++ /dev/null
-<?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="glEnable">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glEnable</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glEnable</refname>
- <refpurpose>enable or disable server-side GL capabilities</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glEnable</function></funcdef>
- <paramdef>GLenum <parameter>cap</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>cap</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant indicating a GL capability.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glDisable</function></funcdef>
- <paramdef>GLenum <parameter>cap</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>cap</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant indicating a GL capability.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glEnable</function> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> enable and disable various capabilities.
- Use <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> to determine the current setting
- of any capability. The initial value for each capability with the
- exception of <constant>GL_DITHER</constant> and <constant>GL_MULTISAMPLE</constant> is <constant>GL_FALSE</constant>. The initial value for
- <constant>GL_DITHER</constant> and <constant>GL_MULTISAMPLE</constant> is <constant>GL_TRUE</constant>.
- </para>
- <para>
- Both <function>glEnable</function> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> take a single argument, <parameter>cap</parameter>,
- which can assume one of the following values:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_ALPHA_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- do alpha testing. See
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_AUTO_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- generate normal vectors when either
- <constant>GL_MAP2_VERTEX_3</constant> or
- <constant>GL_MAP2_VERTEX_4</constant> is used to generate vertices.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- blend the computed fragment color values with the values in the color
- buffers. See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CLIP_PLANE</constant><emphasis>i</emphasis></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- clip geometry against user-defined clipping plane <emphasis>i</emphasis>.
- See <citerefentry><refentrytitle>glClipPlane</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_LOGIC_OP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- apply the currently selected logical operation to the computed fragment
- color and color buffer values. See <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_MATERIAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- have one or more material parameters track the current color.
- See <citerefentry><refentrytitle>glColorMaterial</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_SUM</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no fragment shader is active,
- add the secondary color value to the computed fragment color.
- See <citerefentry><refentrytitle>glSecondaryColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- perform a color table lookup on the incoming RGBA color values.
- See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CONVOLUTION_1D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- perform a 1D convolution operation on incoming RGBA color values.
- See <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CONVOLUTION_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- perform a 2D convolution operation on incoming RGBA color values.
- See <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CULL_FACE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- cull polygons based on their winding in window coordinates.
- See <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- do depth comparisons and update the depth buffer. Note that even if
- the depth buffer exists and the depth mask is non-zero, the
- depth buffer is not updated if the depth test is disabled. See
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry> and
- <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DITHER</constant> </term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- dither color components or indices before they are written to the
- color buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no fragment shader is active,
- blend a fog color into the post-texturing color.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_HISTOGRAM</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- histogram incoming RGBA color values.
- See <citerefentry><refentrytitle>glHistogram</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_LOGIC_OP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- apply the currently selected logical operation to the incoming index and color
- buffer indices.
- See <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHT</constant><emphasis>i</emphasis></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- include light <emphasis>i</emphasis> in the evaluation of the lighting
- equation. See <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHTING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- use the current lighting parameters to compute the vertex color or index.
- Otherwise, simply associate the current color or index with each
- vertex. See
- <citerefentry><refentrytitle>glMaterial</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>, and <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_SMOOTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- draw lines with correct filtering.
- Otherwise,
- draw aliased lines.
- See <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_STIPPLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- use the current line stipple pattern when drawing lines. See
- <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_COLOR_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate RGBA values.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate color indices.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate normals.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_1</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis>
- texture coordinates.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_2</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis> and
- <emphasis>t</emphasis> texture coordinates.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis>,
- <emphasis>t</emphasis>, and
- <emphasis>r</emphasis> texture coordinates.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis>,
- <emphasis>t</emphasis>,
- <emphasis>r</emphasis>, and
- <emphasis>q</emphasis> texture coordinates.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_VERTEX_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate
- <emphasis>x</emphasis>, <emphasis>y</emphasis>, and <emphasis>z</emphasis> vertex coordinates.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_VERTEX_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh1</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint1</refentrytitle></citerefentry> generate
- homogeneous
- <emphasis>x</emphasis>,
- <emphasis>y</emphasis>,
- <emphasis>z</emphasis>, and
- <emphasis>w</emphasis> vertex coordinates.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_COLOR_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate RGBA values.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate color indices.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate normals.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_1</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis>
- texture coordinates.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_2</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis> and
- <emphasis>t</emphasis> texture coordinates.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis>,
- <emphasis>t</emphasis>, and
- <emphasis>r</emphasis> texture coordinates.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate
- <emphasis>s</emphasis>,
- <emphasis>t</emphasis>,
- <emphasis>r</emphasis>, and
- <emphasis>q</emphasis> texture coordinates.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_VERTEX_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate
- <emphasis>x</emphasis>, <emphasis>y</emphasis>, and <emphasis>z</emphasis> vertex coordinates.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_VERTEX_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calls to
- <citerefentry><refentrytitle>glEvalCoord2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEvalMesh2</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glEvalPoint2</refentrytitle></citerefentry> generate
- homogeneous
- <emphasis>x</emphasis>,
- <emphasis>y</emphasis>,
- <emphasis>z</emphasis>, and
- <emphasis>w</emphasis> vertex coordinates.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MINMAX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- compute the minimum and maximum values of incoming RGBA color values.
- See <citerefentry><refentrytitle>glMinmax</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MULTISAMPLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- use multiple fragment samples in computing the final color of a pixel.
- See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NORMALIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- normal vectors are normalized to unit length
- after transformation and before lighting. This method is generally
- less efficient than <constant>GL_RESCALE_NORMAL</constant>. See
- <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry> and
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SMOOTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- draw points with proper filtering.
- Otherwise,
- draw aliased points.
- See <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SPRITE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- calculate texture coordinates for points based on texture
- environment and point parameter settings. Otherwise texture coordinates
- are constant across points.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_FILL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled, and if the polygon is rendered in
- <constant>GL_FILL</constant> mode, an offset is added to depth values of a polygon's
- fragments before the depth comparison is performed.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_LINE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled, and if the polygon is rendered in
- <constant>GL_LINE</constant> mode, an offset is added to depth values of a polygon's
- fragments before the depth comparison is performed.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_POINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled, an offset is added to depth values of a polygon's fragments
- before the depth comparison is performed, if the polygon is rendered in
- <constant>GL_POINT</constant> mode. See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_SMOOTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled, draw polygons with proper filtering.
- Otherwise, draw aliased polygons. For correct antialiased polygons,
- an alpha buffer is needed and the polygons must be sorted front to
- back.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_STIPPLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- use the current polygon stipple pattern when rendering
- polygons. See <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- perform a color table lookup on RGBA color values after color matrix
- transformation.
- See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- perform a color table lookup on RGBA color values after convolution.
- See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RESCALE_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- normal vectors are scaled after transformation and before
- lighting by a factor computed from the modelview matrix. If the
- modelview matrix scales space uniformly, this has the effect of
- restoring the transformed normal to unit length. This method is generally
- more efficient than <constant>GL_NORMALIZE</constant>. See
- <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry> and
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- compute a temporary coverage value where each bit is determined by the
- alpha value at the corresponding sample location. The temporary coverage
- value is then ANDed with the fragment coverage value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLE_ALPHA_TO_ONE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- each sample alpha value is replaced by the maximum representable alpha value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLE_COVERAGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- the fragment's coverage is ANDed with the temporary coverage value. If
- <constant>GL_SAMPLE_COVERAGE_INVERT</constant> is set to <constant>GL_TRUE</constant>, invert the coverage
- value.
- See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SEPARABLE_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled, perform a two-dimensional convolution operation using a separable
- convolution filter on incoming RGBA color values.
- See <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SCISSOR_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- discard fragments that are outside the scissor rectangle.
- See <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled,
- do stencil testing and update the stencil buffer.
- See <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_1D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no fragment shader is active,
- one-dimensional texturing is performed
- (unless two- or three-dimensional or cube-mapped texturing is also enabled).
- See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no fragment shader is active,
- two-dimensional texturing is performed
- (unless three-dimensional or cube-mapped texturing is also enabled).
- See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_3D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no fragment shader is active,
- three-dimensional texturing is performed
- (unless cube-mapped texturing is also enabled).
- See <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_CUBE_MAP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no fragment shader is active,
- cube-mapped texturing is performed.
- See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_Q</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- the <emphasis>q</emphasis> texture coordinate is computed using
- the texture generation function defined with <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- Otherwise, the current <emphasis>q</emphasis> texture coordinate is used.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_R</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- the <emphasis>r</emphasis> texture coordinate is computed using
- the texture generation function defined with <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- Otherwise, the current <emphasis>r</emphasis> texture coordinate is used.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_S</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- the <emphasis>s</emphasis> texture coordinate is computed using
- the texture generation function defined with <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- Otherwise, the current <emphasis>s</emphasis> texture coordinate is used.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_T</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled and no vertex shader is active,
- the <emphasis>t</emphasis> texture coordinate is computed using
- the texture generation function defined with <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- Otherwise, the current <emphasis>t</emphasis> texture coordinate is used.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_PROGRAM_POINT_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled
- and a vertex shader is active, then the derived point size is taken from the (potentially clipped) shader builtin
- <constant>gl_PointSize</constant> and clamped to the implementation-dependent point size range.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_PROGRAM_TWO_SIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- If enabled
- and a vertex shader is active, it specifies that the GL will choose between front and back colors based on the
- polygon's face direction of which the vertex being shaded is a part. It has no effect on points or lines.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <constant>GL_POLYGON_OFFSET_FILL</constant>, <constant>GL_POLYGON_OFFSET_LINE</constant>,
- <constant>GL_POLYGON_OFFSET_POINT</constant>,
- <constant>GL_COLOR_LOGIC_OP</constant>, and <constant>GL_INDEX_LOGIC_OP</constant> are available
- only if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_RESCALE_NORMAL</constant>, and <constant>GL_TEXTURE_3D</constant> are available only if the
- GL version is 1.2 or greater.
- </para>
- <para>
- <constant>GL_MULTISAMPLE</constant>,
- <constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant>,
- <constant>GL_SAMPLE_ALPHA_TO_ONE</constant>,
- <constant>GL_SAMPLE_COVERAGE</constant>,
- <constant>GL_TEXTURE_CUBE_MAP</constant>
- are available only if the GL version is 1.3 or greater.
- </para>
- <para>
- <constant>GL_POINT_SPRITE</constant>,
- <constant>GL_VERTEX_PROGRAM_POINT_SIZE</constant>, and
- <constant>GL_VERTEX_PROGRAM_TWO_SIDE</constant>
- is available only if the GL version is 2.0 or greater.
- </para>
- <para>
- <constant>GL_COLOR_TABLE</constant>, <constant>GL_CONVOLUTION_1D</constant>, <constant>GL_CONVOLUTION_2D</constant>,
- <constant>GL_HISTOGRAM</constant>, <constant>GL_MINMAX</constant>,
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>,
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, and
- <constant>GL_SEPARABLE_2D</constant> are available only if <code>ARB_imaging</code> is returned
- from <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with an argument of <constant>GL_EXTENSIONS</constant>.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when <code>ARB_multitexture</code> is supported, <constant>GL_TEXTURE_1D</constant>,
- <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>, <constant>GL_TEXTURE_GEN_S</constant>,
- <constant>GL_TEXTURE_GEN_T</constant>, <constant>GL_TEXTURE_GEN_R</constant>, and <constant>GL_TEXTURE_GEN_Q</constant>
- enable or disable the respective state for the active texture unit
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>cap</parameter> is not one of the values
- listed previously.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glEnable</function> or <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glClipPlane</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorMaterial</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMaterial</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</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>
+++ /dev/null
-<?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="glEnableVertexAttribArray">
- <refmeta>
- <refentrytitle>glEnableVertexAttribArray</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refdescriptor>glEnableVertexAttribArray</refdescriptor>
- <refname>glEnableVertexAttribArray</refname>
- <refname>glDisableVertexAttribArray</refname>
- <refpurpose>Enable or disable a generic vertex attribute array</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glEnableVertexAttribArray</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glDisableVertexAttribArray</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the generic vertex
- attribute to be enabled or disabled.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glEnableVertexAttribArray</function> enables the
- generic vertex attribute array specified by
- <parameter>index</parameter>.
- <function>glDisableVertexAttribArray</function> disables the
- generic vertex attribute array specified by
- <parameter>index</parameter>. By default, all client-side
- capabilities are disabled, including all generic vertex
- attribute arrays. If enabled, the values in the generic vertex
- attribute array will be accessed and used for rendering when
- calls are made to vertex array commands such as
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>,
- or
- <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glEnableVertexAttribArray</function> and
- <function>glDisableVertexAttribArray </function> are available
- only if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if either
- <function>glEnableVertexAttribArray </function> or
- <function>glDisableVertexAttribArray </function> is executed
- between the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_ATTRIBS</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and
- <constant>GL_VERTEX_ATTRIB_ARRAY_ENABLED</constant>
- <parameter></parameter></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttribPointerv</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and
- <constant>GL_VERTEX_ATTRIB_ARRAY_POINTER</constant></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glFinish">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glFinish</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glFinish</refname>
- <refpurpose>block until all GL execution is complete</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glFinish</function></funcdef>
- <paramdef> <parameter>void</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glFinish</function> does not return until the effects of all previously
- called GL commands are complete.
- Such effects include all changes to GL state,
- all changes to connection state,
- and all changes to the frame buffer contents.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glFinish</function> requires a round trip to the server.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glFinish</function> is executed between
- the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glFlush</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>
+++ /dev/null
-<?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="glFlush">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glFlush</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glFlush</refname>
- <refpurpose>force execution of GL commands in finite time</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glFlush</function></funcdef>
- <paramdef> <parameter>void</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="description"><title>Description</title>
- <para>
- Different GL implementations buffer commands in several different locations,
- including network buffers and the graphics accelerator itself.
- <function>glFlush</function> empties all of these buffers,
- causing all issued commands to be executed as quickly as
- they are accepted by the actual rendering engine.
- Though this execution may not be completed in any particular
- time period,
- it does complete in finite time.
- </para>
- <para>
- Because any GL program might be executed over a network,
- or on an accelerator that buffers commands,
- all programs should call <function>glFlush</function> whenever they count on having
- all of their previously issued commands completed.
- For example,
- call <function>glFlush</function> before waiting for user input that depends on
- the generated image.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glFlush</function> can return at any time.
- It does not wait until the execution of all previously
- issued GL commands is complete.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glFlush</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glFinish</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>
+++ /dev/null
-<?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="glFrontFace">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glFrontFace</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glFrontFace</refname>
- <refpurpose>define front- and back-facing polygons</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glFrontFace</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies the orientation of front-facing polygons.
- <constant>GL_CW</constant> and <constant>GL_CCW</constant> are accepted.
- The initial value is <constant>GL_CCW</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- In a scene composed entirely of opaque closed surfaces,
- back-facing polygons are never visible.
- Eliminating these invisible polygons has the obvious benefit
- of speeding up the rendering of the image.
- To enable and disable elimination of back-facing polygons, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_CULL_FACE</constant>.
- </para>
- <para>
- The projection of a polygon to window coordinates is said to have
- clockwise winding if an imaginary object following the path
- from its first vertex,
- its second vertex,
- and so on,
- to its last vertex,
- and finally back to its first vertex,
- moves in a clockwise direction about the interior of the polygon.
- The polygon's winding is said to be counterclockwise if the imaginary
- object following the same path moves in a counterclockwise direction
- about the interior of the polygon.
- <function>glFrontFace</function> specifies whether polygons with clockwise winding in window coordinates,
- or counterclockwise winding in window coordinates,
- are taken to be front-facing.
- Passing <constant>GL_CCW</constant> to <parameter>mode</parameter> selects counterclockwise polygons as
- front-facing;
- <constant>GL_CW</constant> selects clockwise polygons as front-facing.
- By default, counterclockwise polygons are taken to be front-facing.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glFrontFace</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_FRONT_FACE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLightModel</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>
+++ /dev/null
-<?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="glGenBuffers">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGenBuffers</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGenBuffers</refname>
- <refpurpose>generate buffer object names</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGenBuffers</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>GLuint * <parameter>buffers</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>
- Specifies the number of buffer object names to be generated.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>buffers</parameter></term>
- <listitem>
- <para>
- Specifies an array in which the generated buffer object names are stored.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGenBuffers</function> returns <parameter>n</parameter> buffer object names in <parameter>buffers</parameter>.
- There is no guarantee that the names form a contiguous set of integers;
- however, it is guaranteed that none of the returned names was in use
- immediately before the call to <function>glGenBuffers</function>.
- </para>
- <para>
- Buffer object names returned by a call to <function>glGenBuffers</function> are not returned by
- subsequent calls, unless they are first deleted with
- <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>.
- </para>
- <para>
- No buffer objects are associated with the returned buffer object names until they are first bound by calling
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glGenBuffers</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGenBuffers</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGenQueries">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGenQueries</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGenQueries</refname>
- <refpurpose>generate query object names</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGenQueries</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>GLuint * <parameter>ids</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>
- Specifies the number of query object names to be generated.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>ids</parameter></term>
- <listitem>
- <para>
- Specifies an array in which the generated query object names are stored.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGenQueries</function> returns <parameter>n</parameter> query object names in <parameter>ids</parameter>.
- There is no guarantee that the names form a contiguous set of integers;
- however, it is guaranteed that none of the returned names was in use
- immediately before the call to <function>glGenQueries</function>.
- </para>
- <para>
- Query object names returned by a call to <function>glGenQueries</function> are not returned by
- subsequent calls, unless they are first deleted with
- <citerefentry><refentrytitle>glDeleteQueries</refentrytitle></citerefentry>.
- </para>
- <para>
- No query objects are associated with the returned query object names until they are first used by calling
- <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glGenQueries</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGenQueries</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteQueries</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGenTextures">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGenTextures</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGenTextures</refname>
- <refpurpose>generate texture names</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGenTextures</function></funcdef>
- <paramdef>GLsizei <parameter>n</parameter></paramdef>
- <paramdef>GLuint * <parameter>textures</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>n</parameter></term>
- <listitem>
- <para>
- Specifies the number of texture names to be generated.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>textures</parameter></term>
- <listitem>
- <para>
- Specifies an array in which the generated texture names are stored.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGenTextures</function> returns <parameter>n</parameter> texture names in <parameter>textures</parameter>.
- There is no guarantee that the names form a contiguous set of integers;
- however, it is guaranteed that none of the returned names was in use
- immediately before the call to <function>glGenTextures</function>.
- </para>
- <para>
- The generated textures have no dimensionality; they assume the dimensionality
- of the texture target to which they are first bound
- (see <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>).
- </para>
- <para>
- Texture names returned by a call to <function>glGenTextures</function> are not returned by
- subsequent calls, unless they are first deleted with
- <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glGenTextures</function> is available only if the GL version is 1.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>n</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGenTextures</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsTexture</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glGet">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGet</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGet</refname>
- <refpurpose>return the value or values of a selected parameter</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetBooleanv</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLboolean * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetDoublev</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLdouble * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetFloatv</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetIntegerv</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the parameter value to be returned.
- The symbolic constants in the list below are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Returns the value or values of the specified parameter.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- These four commands return values for simple state variables in GL.
- <parameter>pname</parameter> is a symbolic constant indicating the state variable to be returned,
- and <parameter>params</parameter> is a pointer to an array of the indicated type in
- which to place the returned data.
- </para>
- <para>
- Type conversion is performed if <parameter>params</parameter> has a different type than
- the state variable value being requested.
- If <function>glGetBooleanv</function> is called,
- a floating-point (or integer) value is converted to <constant>GL_FALSE</constant> if
- and only if it is 0.0 (or 0).
- Otherwise,
- it is converted to <constant>GL_TRUE</constant>.
- If <function>glGetIntegerv</function> is called, boolean values are returned as
- <constant>GL_TRUE</constant> or <constant>GL_FALSE</constant>, and most floating-point values are
- rounded to the nearest integer value. Floating-point colors and
- normals, however, are returned with a linear mapping that maps 1.0 to
- the most positive representable integer value
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- to the most negative representable integer value.
- If <function>glGetFloatv</function> or <function>glGetDoublev</function> is called,
- boolean values are returned as <constant>GL_TRUE</constant> or <constant>GL_FALSE</constant>,
- and integer values are converted to floating-point values.
- </para>
- <para>
- The following symbolic constants are accepted by <parameter>pname</parameter>:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_ACCUM_ALPHA_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of alpha bitplanes in the accumulation buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ACCUM_BLUE_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of blue bitplanes in the accumulation buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ACCUM_CLEAR_VALUE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha values used to clear the accumulation buffer.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (0, 0, 0, 0).
- See <citerefentry><refentrytitle>glClearAccum</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ACCUM_GREEN_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of green bitplanes in the accumulation buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ACCUM_RED_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of red bitplanes in the accumulation buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ACTIVE_TEXTURE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value indicating the active multitexture unit.
- The initial value is <constant>GL_TEXTURE0</constant>.
- See <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALIASED_POINT_SIZE_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values,
- the smallest and largest supported sizes for aliased points.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALIASED_LINE_WIDTH_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values,
- the smallest and largest supported widths for aliased lines.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the alpha bias factor used during pixel transfers. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of alpha bitplanes in each color buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the alpha scale factor used
- during pixel transfers. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether alpha testing
- of fragments is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA_TEST_FUNC</constant> <parameter>params</parameter> returns one value,</term>
- <listitem>
- <para>
- </para>
- <para>
- the symbolic name of the alpha test function. The initial value is
- <constant>GL_ALWAYS</constant>.
- See <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA_TEST_REF</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the reference value for the alpha test. The initial value is 0.
- See <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>.
- An integer value,
- if requested,
- is linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- currently bound to the target <constant>GL_ARRAY_BUFFER</constant>. If no buffer object
- is bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ATTRIB_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the depth of the attribute stack.
- If the stack is empty,
- 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_AUTO_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 2D map evaluation
- automatically generates surface normals. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_AUX_BUFFERS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of auxiliary color buffers available.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether blending is
- enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values,
- the red, green, blue, and alpha values which are the components of
- the blend color.
- See <citerefentry><refentrytitle>glBlendColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_DST_ALPHA</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the symbolic constant identifying the alpha destination blend
- function. The initial value is <constant>GL_ZERO</constant>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_DST_RGB</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the symbolic constant identifying the RGB destination blend
- function. The initial value is <constant>GL_ZERO</constant>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_EQUATION_RGB</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, a symbolic constant indicating whether
- the RGB blend equation is <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>,
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>, <constant>GL_MIN</constant> or <constant>GL_MAX</constant>.
- See <citerefentry><refentrytitle>glBlendEquationSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_EQUATION_ALPHA</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, a symbolic constant indicating whether
- the Alpha blend equation is <constant>GL_FUNC_ADD</constant>, <constant>GL_FUNC_SUBTRACT</constant>,
- <constant>GL_FUNC_REVERSE_SUBTRACT</constant>, <constant>GL_MIN</constant> or <constant>GL_MAX</constant>.
- See <citerefentry><refentrytitle>glBlendEquationSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_SRC_ALPHA</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the symbolic constant identifying the alpha source blend function. The initial
- value is <constant>GL_ONE</constant>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLEND_SRC_RGB</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the symbolic constant identifying the RGB source blend function. The initial
- value is <constant>GL_ONE</constant>.
- See <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glBlendFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the blue bias factor used during pixel transfers. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of blue bitplanes in each color buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the blue scale factor used during pixel transfers. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CLIENT_ACTIVE_TEXTURE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single integer value indicating the current client active
- multitexture unit. The initial value is <constant>GL_TEXTURE0</constant>.
- See <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CLIENT_ATTRIB_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value indicating the depth of the
- attribute stack. The initial value is 0.
- See <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CLIP_PLANE</constant><emphasis>i</emphasis></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the specified
- clipping plane is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glClipPlane</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the color array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the color array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_ARRAY_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of components per color in the color array. The initial value
- is 4.
- See <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive colors in the color array. The initial
- value is 0.
- See <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the data type of each component in the color array. The initial value
- is <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_CLEAR_VALUE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha values used to clear the color buffers.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (0, 0, 0, 0).
- See <citerefentry><refentrytitle>glClearColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_LOGIC_OP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether a fragment's
- RGBA color values are merged into the framebuffer using a logical
- operation. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_MATERIAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether one or more
- material parameters are tracking the current color. The initial value
- is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glColorMaterial</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_MATERIAL_FACE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which materials have a parameter that is
- tracking the current color. The initial value is <constant>GL_FRONT_AND_BACK</constant>.
- See <citerefentry><refentrytitle>glColorMaterial</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_MATERIAL_PARAMETER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which material parameters are
- tracking the current color. The initial value is
- <constant>GL_AMBIENT_AND_DIFFUSE</constant>.
- See <citerefentry><refentrytitle>glColorMaterial</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns sixteen values:
- the color matrix on the top of the color matrix stack. Initially
- this matrix is the identity matrix.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_MATRIX_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum supported depth of the projection matrix stack. The value must
- be at least 2.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_SUM</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether primary and
- secondary color sum is enabled.
- See <citerefentry><refentrytitle>glSecondaryColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the color table
- lookup is enabled.
- See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COLOR_WRITEMASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four boolean values:
- the red, green, blue, and alpha write enables for the color
- buffers. The initial value is (<constant>GL_TRUE</constant>, <constant>GL_TRUE</constant>,
- <constant>GL_TRUE</constant>, <constant>GL_TRUE</constant>).
- See <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_COMPRESSED_TEXTURE_FORMATS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a list of symbolic
- constants of length <constant>GL_NUM_COMPRESSED_TEXTURE_FORMATS</constant>
- indicating which compressed texture formats are available.
- See <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CONVOLUTION_1D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 1D convolution
- is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CONVOLUTION_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 2D convolution
- is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CULL_FACE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether polygon culling
- is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CULL_FACE_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which polygon faces are to be
- culled. The initial value is <constant>GL_BACK</constant>.
- See <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha values of the current color.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer value.
- The initial value is (1, 1, 1, 1).
- See <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_FOG_COORD</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the current fog coordinate. The initial value
- is 0.
- See <citerefentry><refentrytitle>glFogCoord</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the current color index. The initial value is 1.
- See <citerefentry><refentrytitle>glIndex</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns three values:
- the <emphasis>x</emphasis>, <emphasis>y</emphasis>, and <emphasis>z</emphasis> values of the current normal.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer value.
- The initial value is (0, 0, 1).
- See <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_PROGRAM</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the name of the program object that is currently active, or 0 if no program object is active.
- See <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha color values of the current raster position.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (1, 1, 1, 1).
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_DISTANCE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the distance from the eye to the current
- raster position. The initial value is 0.
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the color index of the current raster position. The initial value is 1.
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_POSITION</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the <emphasis>x</emphasis>, <emphasis>y</emphasis>, <emphasis>z</emphasis>, and <emphasis>w</emphasis> components of the current
- raster position.
- <emphasis>x</emphasis>, <emphasis>y</emphasis>, and <emphasis>z</emphasis> are in window coordinates,
- and <emphasis>w</emphasis> is in clip coordinates. The initial value is (0, 0, 0, 1).
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_POSITION_VALID</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the current
- raster position is valid. The initial value is <constant>GL_TRUE</constant>.
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_SECONDARY_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha secondary color values of the current raster position.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (1, 1, 1, 1).
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_RASTER_TEXTURE_COORDS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values: the <emphasis>s</emphasis>, <emphasis>t</emphasis>, <emphasis>r</emphasis>, and <emphasis>q</emphasis>
- texture coordinates of the current raster position. The initial value is (0, 0, 0, 1).
- See <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_SECONDARY_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values: the red, green, blue, and alpha values of the
- current secondary color. Integer values, if requested, are linearly mapped
- from the internal floating-point representation such that 1.0 returns the
- most positive representable integer value, and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most
- negative representable integer value. The initial value is (0, 0, 0, 0).
- See <citerefentry><refentrytitle>glSecondaryColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_CURRENT_TEXTURE_COORDS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the <emphasis>s</emphasis>, <emphasis>t</emphasis>, <emphasis>r</emphasis>, and <emphasis>q</emphasis> current texture
- coordinates. The initial value is (0, 0, 0, 1).
- See <citerefentry><refentrytitle>glMultiTexCoord</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the depth bias factor used during pixel transfers. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of bitplanes in the depth buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_CLEAR_VALUE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the value that is used to clear the depth buffer.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is 1.
- See <citerefentry><refentrytitle>glClearDepth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_FUNC</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the symbolic constant that indicates the depth comparison
- function. The initial value is <constant>GL_LESS</constant>.
- See <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- the near and far mapping limits for the depth buffer.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (0, 1).
- See <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the depth scale factor used during pixel transfers. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether depth testing
- of fragments is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_WRITEMASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating if the depth buffer
- is enabled for writing. The initial value is <constant>GL_TRUE</constant>.
- See <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DITHER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether dithering of
- fragment colors and indices is enabled. The initial value is <constant>GL_TRUE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DOUBLEBUFFER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether double buffering
- is supported.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DRAW_BUFFER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which buffers are being drawn to.
- See <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>. The initial value is <constant>GL_BACK</constant> if there
- are back buffers, otherwise it is <constant>GL_FRONT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DRAW_BUFFER</constant><emphasis>i</emphasis></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which buffers are being drawn to by the corresponding output color.
- See <citerefentry><refentrytitle>glDrawBuffers</refentrytitle></citerefentry>.
- The initial value of <constant>GL_DRAW_BUFFER0</constant> is <constant>GL_BACK</constant> if there
- are back buffers, otherwise it is <constant>GL_FRONT</constant>. The
- initial values of draw buffers for all other output colors is <constant>GL_NONE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EDGE_FLAG</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the current
- edge flag is <constant>GL_TRUE</constant> or <constant>GL_FALSE</constant>. The initial value is <constant>GL_TRUE</constant>.
- See <citerefentry><refentrytitle>glEdgeFlag</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EDGE_FLAG_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the edge
- flag array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EDGE_FLAG_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the edge flag array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EDGE_FLAG_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive edge flags in the edge flag
- array. The initial value is 0.
- See <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ELEMENT_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- currently bound to the target <constant>GL_ELEMENT_ARRAY_BUFFER</constant>. If no buffer object
- is bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FEEDBACK_BUFFER_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the size of the feedback buffer.
- See <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FEEDBACK_BUFFER_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the type of the feedback buffer.
- See <citerefentry><refentrytitle>glFeedbackBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether fogging is
- enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_COORD_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the fog coordinate array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_COORD_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the fog coordinate array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_COORD_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive fog coordinates in the fog coordinate
- array. The initial value is 0.
- See <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_COORD_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the type of the fog coordinate array.
- The initial value is <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_COORD_SRC</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, a symbolic constant indicating the source of the fog coordinate.
- The initial value is <constant>GL_FRAGMENT_DEPTH</constant>.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha components of the fog color.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (0, 0, 0, 0).
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_DENSITY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the fog density parameter. The initial value is 1.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_END</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the end factor for the linear fog equation. The initial value is 1.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the fog hint. The initial value
- is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the fog color index. The initial value is 0.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which fog equation is selected. The initial
- value is <constant>GL_EXP</constant>.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FOG_START</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the start factor for the linear fog equation. The initial value is 0.
- See <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRAGMENT_SHADER_DERIVATIVE_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the derivative accuracy hint
- for fragment shaders. The initial value
- is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRONT_FACE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating whether clockwise or counterclockwise
- polygon winding is treated as front-facing. The initial value is
- <constant>GL_CCW</constant>.
- See <citerefentry><refentrytitle>glFrontFace</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GENERATE_MIPMAP_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the mipmap generation filtering
- hint. The initial value is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the green bias factor used during pixel transfers. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of green bitplanes in each color buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the green scale factor used during pixel transfers. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_HISTOGRAM</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether histogram is
- enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glHistogram</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the color
- index array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the color index array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive color indexes in the color index
- array. The initial value is 0.
- See <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the data type of indexes in the color index array. The initial value is
- <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of bitplanes in each color index buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_CLEAR_VALUE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the color index used to clear the color index buffers. The initial value
- is 0.
- See <citerefentry><refentrytitle>glClearIndex</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_LOGIC_OP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether a fragment's index
- values are merged into the framebuffer using a logical
- operation. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the GL is in
- color index mode (<constant>GL_TRUE</constant>) or RGBA mode (<constant>GL_FALSE</constant>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_OFFSET</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the offset added to color and stencil indices during pixel
- transfers. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_SHIFT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the amount that color and stencil indices are shifted during pixel
- transfers. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INDEX_WRITEMASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a mask indicating which bitplanes of each color index buffer can be
- written. The initial value is all 1's.
- See <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHT</constant><emphasis>i</emphasis></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the specified
- light is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHTING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether lighting is
- enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHT_MODEL_AMBIENT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the red, green, blue, and alpha components of the ambient intensity of
- the entire scene.
- Integer values,
- if requested,
- are linearly mapped from the internal floating-point representation such
- that 1.0 returns the most positive representable integer value,
- and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- returns the most negative representable integer
- value. The initial value is (0.2, 0.2, 0.2, 1.0).
- See <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHT_MODEL_COLOR_CONTROL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns single enumerated value indicating whether specular
- reflection calculations are separated from normal lighting computations.
- The initial value is <constant>GL_SINGLE_COLOR</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHT_MODEL_LOCAL_VIEWER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether specular reflection
- calculations treat the viewer as being local to the scene. The initial
- value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIGHT_MODEL_TWO_SIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether separate materials
- are used to compute lighting for front- and back-facing
- polygons. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_SMOOTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether antialiasing of
- lines is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_SMOOTH_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the line antialiasing
- hint. The initial value is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_STIPPLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether stippling of lines
- is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_STIPPLE_PATTERN</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the 16-bit line stipple pattern. The initial value is all 1's.
- See <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_STIPPLE_REPEAT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the line stipple repeat factor. The initial value is 1.
- See <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_WIDTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the line width as specified with <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>. The initial value is
- 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_WIDTH_GRANULARITY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the width difference between adjacent supported widths for antialiased lines.
- See <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_WIDTH_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- the smallest and largest supported widths for antialiased
- lines.
- See <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIST_BASE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the base offset added to all names in arrays presented to
- <citerefentry><refentrytitle>glCallLists</refentrytitle></citerefentry>. The initial value is 0.
- See <citerefentry><refentrytitle>glListBase</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIST_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the name of the display list currently under construction.
- 0 is returned if no display list is currently under
- construction. The initial value is 0.
- See <citerefentry><refentrytitle>glNewList</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LIST_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the construction mode of the display list
- currently under construction. The initial value is 0.
- See <citerefentry><refentrytitle>glNewList</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LOGIC_OP_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the selected logic operation
- mode. The initial value is <constant>GL_COPY</constant>.
- See <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_COLOR_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates colors. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_GRID_DOMAIN</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- the endpoints of the 1D map's grid domain. The initial value is (0, 1).
- See <citerefentry><refentrytitle>glMapGrid</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_GRID_SEGMENTS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of partitions in the 1D map's grid domain. The initial value
- is 1.
- See <citerefentry><refentrytitle>glMapGrid</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates color indices. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates normals. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_1</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates 1D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_2</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates 2D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates 3D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_TEXTURE_COORD_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates 4D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_VERTEX_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates 3D vertex coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP1_VERTEX_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 1D evaluation generates 4D vertex coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_COLOR_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates colors. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_GRID_DOMAIN</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the endpoints of the 2D map's
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>
- grid domains. The initial value
- is (0,1; 0,1).
- See <citerefentry><refentrytitle>glMapGrid</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_GRID_SEGMENTS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- the number of partitions in the 2D map's
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>
- grid
- domains. The initial value is (1,1).
- See <citerefentry><refentrytitle>glMapGrid</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_INDEX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates color indices. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates normals. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_1</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates 1D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_2</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates 2D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates 3D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_TEXTURE_COORD_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates 4D texture coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_VERTEX_3</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates 3D vertex coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP2_VERTEX_4</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether
- 2D evaluation generates 4D vertex coordinates. The initial value is
- <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP_COLOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating if colors and
- color indices are to be replaced by table lookup during pixel
- transfers. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAP_STENCIL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating if stencil indices
- are to be replaced by table lookup during pixel transfers. The initial
- value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MATRIX_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which matrix stack is currently the
- target of all matrix operations. The initial value is <constant>GL_MODELVIEW</constant>.
- See <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_3D_TEXTURE_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a rough estimate of the largest 3D texture that the GL can handle.
- The value must be at least 16.
- If the GL version is 1.2 or greater, use
- <constant>GL_PROXY_TEXTURE_3D</constant> to determine if a texture is too large.
- See <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_CLIENT_ATTRIB_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value indicating the maximum supported depth
- of the client attribute stack.
- See <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_ATTRIB_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum supported depth of the attribute stack. The value must be
- at least 16.
- See <citerefentry><refentrytitle>glPushAttrib</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_CLIP_PLANES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of application-defined clipping planes. The value must be at least 6.
- See <citerefentry><refentrytitle>glClipPlane</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_COLOR_MATRIX_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the maximum supported depth of the color matrix
- stack. The value must be at least 2.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the maximum supported texture image units that
- can be used to access texture maps from the vertex shader and the fragment processor combined.
- If both the vertex shader and the fragment processing stage access the same texture image
- unit, then that counts as using two texture image units against this limit.
- The value must be at least 2.
- See <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_CUBE_MAP_TEXTURE_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value.
- The value gives a rough estimate of the largest cube-map texture that
- the GL can handle. The value must be at least 16.
- If the GL version is 1.3 or greater, use <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>
- to determine if a texture is too large.
- See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_DRAW_BUFFERS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the maximum number
- of simultaneous output colors allowed from a fragment shader using the
- <code>gl_FragData</code> built-in array. The value must be at least 1.
- See <citerefentry><refentrytitle>glDrawBuffers</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_ELEMENTS_INDICES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the recommended maximum number of vertex array indices.
- See <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_ELEMENTS_VERTICES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the recommended maximum number of vertex array vertices.
- See <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_EVAL_ORDER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum equation order supported by 1D and 2D
- evaluators. The value must be at least 8.
- See <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_FRAGMENT_UNIFORM_COMPONENTS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of individual floating-point, integer, or boolean values that can be held
- in uniform variable storage for a fragment shader. The value must be at least 64.
- See <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_LIGHTS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of lights. The value must be at least 8.
- See <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_LIST_NESTING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum recursion depth allowed during display-list
- traversal. The value must be at least 64.
- See <citerefentry><refentrytitle>glCallList</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_MODELVIEW_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum supported depth of the modelview matrix stack. The value must
- be at least 32.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_NAME_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum supported depth of the selection name stack. The value must be at least 64.
- See <citerefentry><refentrytitle>glPushName</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_PIXEL_MAP_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum supported size of a <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry> lookup table.
- The value must be at least 32.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_PROJECTION_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the maximum supported depth of the projection
- matrix stack. The value must be at least 2.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_TEXTURE_COORDS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of texture coordinate sets available to vertex and fragment shaders.
- The value must be at least 2.
- See <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry> and
- <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_TEXTURE_IMAGE_UNITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the maximum supported texture image units that
- can be used to access texture maps from the fragment shader.
- The value must be at least 2.
- See <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_TEXTURE_LOD_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum, absolute value of the texture level-of-detail bias. The
- value must be at least 4.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_TEXTURE_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value.
- The value gives a rough estimate of the largest texture that
- the GL can handle. The value must be at least 64.
- If the GL version is 1.1 or greater, use
- <constant>GL_PROXY_TEXTURE_1D</constant> or <constant>GL_PROXY_TEXTURE_2D</constant>
- to determine if a texture is too large.
- See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_TEXTURE_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum supported depth of the texture matrix stack. The value must be at least 2.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_TEXTURE_UNITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value indicating the number of conventional
- texture units supported. Each conventional texture unit includes both a texture coordinate set
- and a texture image unit. Conventional texture units may be used for fixed-function (non-shader)
- rendering. The value must be at least 2. Additional texture coordinate sets and texture
- image units may be accessed from vertex and fragment shaders.
- See <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry> and
- <citerefentry><refentrytitle>glClientActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_VARYING_FLOATS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of interpolators available for processing varying variables used by
- vertex and fragment shaders. This value represents the number of individual floating-point
- values that can be interpolated; varying variables declared as vectors, matrices, and arrays
- will all consume multiple interpolators. The value must be at least 32.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_VERTEX_ATTRIBS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of 4-component generic vertex attributes accessible to a vertex shader.
- The value must be at least 16.
- See <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the maximum supported texture image units that
- can be used to access texture maps from the vertex shader. The value may be 0.
- See <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_VERTEX_UNIFORM_COMPONENTS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the maximum number of individual floating-point, integer, or boolean values that can be held
- in uniform variable storage for a vertex shader. The value must be at least 512.
- See <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MAX_VIEWPORT_DIMS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- the maximum supported width and height of the viewport.
- These must be at least as large as the visible dimensions of the display
- being rendered to.
- See <citerefentry><refentrytitle>glViewport</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MINMAX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether pixel minmax
- values are computed. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glMinmax</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MODELVIEW_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns sixteen values:
- the modelview matrix on the top of the modelview matrix stack. Initially
- this matrix is the identity matrix.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_MODELVIEW_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of matrices on the modelview matrix stack.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NAME_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of names on the selection name stack. The initial value is 0.
- See <citerefentry><refentrytitle>glPushName</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NORMAL_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value, indicating whether the normal
- array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NORMAL_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the normal array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NORMAL_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive normals in the normal
- array. The initial value is 0.
- See <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NORMAL_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the data type of each coordinate in the normal array. The initial value is
- <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NORMALIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether normals are
- automatically scaled to unit length after they have been transformed to
- eye coordinates. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NUM_COMPRESSED_TEXTURE_FORMATS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single integer value indicating the number of available
- compressed texture formats. The minimum value is 0.
- See <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_ALIGNMENT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte alignment used for writing pixel data to memory. The initial
- value is 4.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_IMAGE_HEIGHT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the image height used for writing pixel data to memory. The initial
- value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_LSB_FIRST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether single-bit
- pixels being written to memory are written first to the least significant
- bit of each unsigned byte. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_ROW_LENGTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the row length used for writing pixel data to memory. The initial value is
- 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_SKIP_IMAGES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of pixel images skipped before the first pixel is written
- into memory. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_SKIP_PIXELS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of pixel locations skipped before the first pixel is written
- into memory. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_SKIP_ROWS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of rows of pixel locations skipped before the first pixel is written
- into memory. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_SWAP_BYTES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the bytes of
- two-byte and four-byte pixel indices and components are swapped before being
- written to memory. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PERSPECTIVE_CORRECTION_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the perspective correction
- hint. The initial value is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_A_TO_A_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the alpha-to-alpha pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_B_TO_B_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the blue-to-blue pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_G_TO_G_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the green-to-green pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_I_TO_A_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the index-to-alpha pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_I_TO_B_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the index-to-blue pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_I_TO_G_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the index-to-green pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_I_TO_I_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the index-to-index pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_I_TO_R_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the index-to-red pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_R_TO_R_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the red-to-red pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_MAP_S_TO_S_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size of the stencil-to-stencil pixel translation table.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_PACK_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- currently bound to the target <constant>GL_PIXEL_PACK_BUFFER</constant>. If no buffer object
- is bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- currently bound to the target <constant>GL_PIXEL_UNPACK_BUFFER</constant>. If no buffer object
- is bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_DISTANCE_ATTENUATION</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns three values,
- the coefficients for computing the attenuation value for points.
- See <citerefentry><refentrytitle>glPointParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_FADE_THRESHOLD_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the point size threshold for determining the point size.
- See <citerefentry><refentrytitle>glPointParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the point size as specified by <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>. The initial value is 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SIZE_GRANULARITY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the size difference between adjacent supported sizes for antialiased points.
- See <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SIZE_MAX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the upper bound for the attenuated point sizes. The initial value is 0.0.
- See <citerefentry><refentrytitle>glPointParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SIZE_MIN</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the lower bound for the attenuated point sizes. The initial value is 1.0.
- See <citerefentry><refentrytitle>glPointParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SIZE_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- the smallest and largest supported sizes for antialiased
- points. The smallest size must be at most 1, and the largest size must
- be at least 1.
- See <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SMOOTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether antialiasing of
- points is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SMOOTH_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the point antialiasing
- hint. The initial value is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SPRITE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether point sprite is
- enabled. The initial value is <constant>GL_FALSE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values:
- symbolic constants indicating whether front-facing and back-facing polygons
- are rasterized as points, lines, or filled polygons. The initial value is
- <constant>GL_FILL</constant>.
- See <citerefentry><refentrytitle>glPolygonMode</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_FACTOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the scaling factor used to determine the variable offset that is added
- to the depth value of each fragment generated when a polygon is
- rasterized. The initial value is 0.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_UNITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value.
- This value is multiplied by an implementation-specific value and then
- added to the depth value of each fragment
- generated when a polygon is rasterized. The initial value is 0.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_FILL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether polygon offset
- is enabled for polygons in fill mode. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_LINE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether polygon offset
- is enabled for polygons in line mode. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_OFFSET_POINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether polygon offset
- is enabled for polygons in point mode. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_SMOOTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether antialiasing of
- polygons is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPolygonMode</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_SMOOTH_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating the mode of the polygon antialiasing
- hint. The initial value is <constant>GL_DONT_CARE</constant>.
- See <citerefentry><refentrytitle>glHint</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_STIPPLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether polygon
- stippling is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether post color
- matrix transformation lookup is enabled.
- The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_RED_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the red bias factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_GREEN_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the green bias factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_BLUE_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the blue bias factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_ALPHA_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the alpha bias factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_RED_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the red scale factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_GREEN_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the green scale factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_BLUE_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the blue scale factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_COLOR_MATRIX_ALPHA_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the alpha scale factor applied to RGBA fragments
- after color matrix transformations.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether post convolution
- lookup is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_RED_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the red bias factor applied to RGBA fragments
- after convolution. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_GREEN_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the green bias factor applied to RGBA fragments
- after convolution. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_BLUE_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the blue bias factor applied to RGBA fragments
- after convolution. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_ALPHA_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the alpha bias factor applied to RGBA fragments
- after convolution. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_RED_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the red scale factor applied to RGBA fragments
- after convolution. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_GREEN_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the green scale factor applied to RGBA fragments
- after convolution. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_BLUE_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the blue scale factor applied to RGBA fragments
- after convolution. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POST_CONVOLUTION_ALPHA_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the alpha scale factor applied to RGBA fragments
- after convolution. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PROJECTION_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns sixteen values:
- the projection matrix on the top of the projection matrix
- stack. Initially this matrix is the identity matrix.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PROJECTION_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of matrices on the projection matrix stack.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_READ_BUFFER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating which color buffer is selected for
- reading. The initial value is <constant>GL_BACK</constant> if there is a back buffer,
- otherwise it is <constant>GL_FRONT</constant>.
- See
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glAccum</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED_BIAS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the red bias factor used during pixel transfers. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of red bitplanes in each color buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED_SCALE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the red scale factor used during pixel transfers. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RENDER_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating whether the GL is in render,
- select,
- or feedback mode. The initial value is <constant>GL_RENDER</constant>.
- See <citerefentry><refentrytitle>glRenderMode</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RESCALE_NORMAL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns single boolean value
- indicating whether normal rescaling is enabled.
- See <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGBA_MODE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the GL is in RGBA
- mode (true) or color index mode (false).
- See <citerefentry><refentrytitle>glColor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLE_BUFFERS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single integer value indicating the number of sample buffers
- associated with the framebuffer.
- See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLE_COVERAGE_VALUE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single positive floating-point value indicating the
- current sample coverage value.
- See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLE_COVERAGE_INVERT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating if the temporary
- coverage value should be inverted.
- See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SAMPLES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single integer value indicating the coverage mask size.
- See <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SCISSOR_BOX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- window coordinates of the scissor box,
- followed by its width and height.
- Initially the
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- window coordinates are both 0 and the
- width and height are set to the size of the window.
- See <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SCISSOR_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether scissoring is
- enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SECONDARY_COLOR_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the secondary color array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the secondary color array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SECONDARY_COLOR_ARRAY_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the number of components per color in the
- secondary color array. The initial value is 3.
- See <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SECONDARY_COLOR_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the byte offset between consecutive colors in
- the secondary color array. The initial value is 0.
- See <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SECONDARY_COLOR_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value, the data type of each component in the secondary
- color array. The initial value is <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SELECTION_BUFFER_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> return one value,
- the size of the selection buffer.
- See <citerefentry><refentrytitle>glSelectBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SEPARABLE_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 2D separable
- convolution is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SHADE_MODEL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating whether the shading mode is flat or
- smooth. The initial value is <constant>GL_SMOOTH</constant>.
- See <citerefentry><refentrytitle>glShadeModel</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SMOOTH_LINE_WIDTH_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values,
- the smallest and largest supported widths for antialiased lines.
- See <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SMOOTH_LINE_WIDTH_GRANULARITY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the granularity of widths for antialiased lines.
- See <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SMOOTH_POINT_SIZE_RANGE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns two values,
- the smallest and largest supported widths for antialiased points.
- See <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SMOOTH_POINT_SIZE_GRANULARITY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the granularity of sizes for antialiased points.
- See <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_FAIL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what action is taken for back-facing polygons when the stencil
- test fails. The initial value is <constant>GL_KEEP</constant>.
- See <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_FUNC</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what function is used for back-facing polygons to compare the
- stencil reference value with the stencil buffer value. The initial value
- is <constant>GL_ALWAYS</constant>.
- See <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_PASS_DEPTH_FAIL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what action is taken for back-facing polygons when the stencil
- test passes,
- but the depth test fails. The initial value is <constant>GL_KEEP</constant>.
- See <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_PASS_DEPTH_PASS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what action is taken for back-facing polygons when the stencil
- test passes and the depth test passes. The initial value is <constant>GL_KEEP</constant>.
- See <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_REF</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the reference value that is compared with the contents of the stencil
- buffer for back-facing polygons. The initial value is 0.
- See <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_VALUE_MASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the mask that is used for back-facing polygons to mask both the stencil reference value and the
- stencil buffer value before they are compared. The initial value is all 1's.
- See <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BACK_WRITEMASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the mask that controls writing of the stencil bitplanes for back-facing polygons. The initial value
- is all 1's.
- See <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of bitplanes in the stencil buffer.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_CLEAR_VALUE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the index to which the stencil bitplanes are cleared. The initial value is
- 0.
- See <citerefentry><refentrytitle>glClearStencil</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_FAIL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what action is taken when the stencil
- test fails. The initial value is <constant>GL_KEEP</constant>.
- See <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_FUNC</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what function is used to compare the
- stencil reference value with the stencil buffer value. The initial value
- is <constant>GL_ALWAYS</constant>.
- See <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_PASS_DEPTH_FAIL</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what action is taken when the stencil
- test passes,
- but the depth test fails. The initial value is <constant>GL_KEEP</constant>.
- See <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_PASS_DEPTH_PASS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- a symbolic constant indicating what action is taken when the stencil
- test passes and the depth test passes. The initial value is <constant>GL_KEEP</constant>.
- See <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_REF</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the reference value that is compared with the contents of the stencil
- buffer. The initial value is 0.
- See <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_TEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether stencil testing
- of fragments is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_VALUE_MASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the mask that is used to mask both the stencil reference value and the
- stencil buffer value before they are compared. The initial value is all 1's.
- See <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_WRITEMASK</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the mask that controls writing of the stencil bitplanes. The initial value
- is all 1's.
- See <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>.
- If the GL version is 2.0 or greater, this stencil state only affects non-polygons
- and front-facing polygons. Back-facing polygons use separate stencil state.
- See <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STEREO</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether stereo buffers
- (left and right) are supported.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SUBPIXEL_BITS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- an estimate of the number of bits of subpixel resolution that are used to
- position rasterized geometry in window coordinates. The value must be at least 4.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_1D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 1D texture
- mapping is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BINDING_1D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the texture
- currently bound to the target <constant>GL_TEXTURE_1D</constant>. The initial value is 0.
- See <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 2D texture
- mapping is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BINDING_2D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the texture
- currently bound to the target <constant>GL_TEXTURE_2D</constant>. The initial value is 0.
- See <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_3D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether 3D texture
- mapping is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BINDING_3D</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the texture
- currently bound to the target <constant>GL_TEXTURE_3D</constant>. The initial value is 0.
- See <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BINDING_CUBE_MAP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the texture
- currently bound to the target <constant>GL_TEXTURE_CUBE_MAP</constant>. The initial value is 0.
- See <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPRESSION_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value indicating the mode of the texture
- compression hint. The initial value is <constant>GL_DONT_CARE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COORD_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the texture
- coordinate array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the texture coordinate array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COORD_ARRAY_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of coordinates per element in the texture coordinate
- array. The initial value is 4.
- See <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COORD_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive elements in the texture coordinate
- array. The initial value is 0.
- See <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COORD_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the data type of the coordinates in the texture coordinate
- array. The initial value is <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_CUBE_MAP</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether cube-mapped texture
- mapping is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_Q</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether automatic generation
- of the <emphasis>q</emphasis> texture coordinate is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_R</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether automatic generation
- of the <emphasis>r</emphasis> texture coordinate is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_S</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether automatic generation
- of the <emphasis>S</emphasis> texture coordinate is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GEN_T</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether automatic generation
- of the T texture coordinate is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns sixteen values:
- the texture matrix on the top of the texture matrix stack. Initially this
- matrix is the identity matrix.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_STACK_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of matrices on the texture matrix stack.
- The initial value is 1.
- See <citerefentry><refentrytitle>glPushMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TRANSPOSE_COLOR_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns 16 values, the elements of the color matrix in row-major
- order.
- See <citerefentry><refentrytitle>glLoadTransposeMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TRANSPOSE_MODELVIEW_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns 16 values, the elements of the modelview matrix in row-major
- order.
- See <citerefentry><refentrytitle>glLoadTransposeMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TRANSPOSE_PROJECTION_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns 16 values, the elements of the projection matrix in row-major
- order.
- See <citerefentry><refentrytitle>glLoadTransposeMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TRANSPOSE_TEXTURE_MATRIX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns 16 values, the elements of the texture matrix in row-major
- order.
- See <citerefentry><refentrytitle>glLoadTransposeMatrix</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_ALIGNMENT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte alignment used for reading pixel data from memory. The initial
- value is 4.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_IMAGE_HEIGHT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the image height used for reading pixel data from memory. The initial
- is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_LSB_FIRST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether single-bit
- pixels being read from memory are read first from the least significant
- bit of each unsigned byte. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_ROW_LENGTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the row length used for reading pixel data from memory. The initial value
- is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_SKIP_IMAGES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of pixel images skipped before the first pixel is read
- from memory. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_SKIP_PIXELS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of pixel locations skipped before the first pixel is read
- from memory. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_SKIP_ROWS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of rows of pixel locations skipped before the first pixel is read
- from memory. The initial value is 0.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_SWAP_BYTES</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the bytes of
- two-byte and four-byte pixel indices and components are swapped after being
- read from memory. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_ARRAY</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether the vertex
- array is enabled. The initial value is <constant>GL_FALSE</constant>.
- See <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value, the name of the buffer object
- associated with the vertex array. This buffer object would have been bound to the
- target <constant>GL_ARRAY_BUFFER</constant> at the time of the most recent call to
- <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>.
- If no buffer object was bound to this target, 0 is returned. The initial value is 0.
- See <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_ARRAY_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the number of coordinates per vertex in the vertex array. The initial
- value is 4.
- See <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the byte offset between consecutive vertices in the vertex
- array. The initial value is 0.
- See <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the data type of each coordinate in the vertex array. The initial value is
- <constant>GL_FLOAT</constant>.
- See <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_PROGRAM_POINT_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether vertex
- program point size mode is enabled. If enabled, and a vertex shader is active, then the
- point size is taken from the shader built-in <code>gl_PointSize</code>. If disabled,
- and a vertex shader is active, then the point size is taken from the point state as specified
- by <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>.
- The initial value is <constant>GL_FALSE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERTEX_PROGRAM_TWO_SIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating whether vertex
- program two-sided color mode is enabled. If enabled, and a vertex shader is active, then the
- GL chooses the back color output for back-facing polygons, and the front color output for
- non-polygons and front-facing polygons. If disabled, and a vertex shader is active, then the
- front color output is always selected. The initial value is <constant>GL_FALSE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VIEWPORT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns four values:
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- window coordinates of the viewport,
- followed by its width and height.
- Initially the
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- window coordinates are both set to 0,
- and the width and height are set to the width and height of the window into
- which the GL will do its rendering.
- See <citerefentry><refentrytitle>glViewport</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ZOOM_X</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- pixel zoom factor. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelZoom</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ZOOM_Y</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns one value,
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- pixel zoom factor. The initial value is 1.
- See <citerefentry><refentrytitle>glPixelZoom</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Many of the boolean parameters can also be queried more easily using
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <constant>GL_COLOR_LOGIC_OP</constant>,
- <constant>GL_COLOR_ARRAY</constant>,
- <constant>GL_COLOR_ARRAY_SIZE</constant>,
- <constant>GL_COLOR_ARRAY_STRIDE</constant>,
- <constant>GL_COLOR_ARRAY_TYPE</constant>,
- <constant>GL_EDGE_FLAG_ARRAY</constant>,
- <constant>GL_EDGE_FLAG_ARRAY_STRIDE</constant>,
- <constant>GL_INDEX_ARRAY</constant>,
- <constant>GL_INDEX_ARRAY_STRIDE</constant>,
- <constant>GL_INDEX_ARRAY_TYPE</constant>,
- <constant>GL_INDEX_LOGIC_OP</constant>,
- <constant>GL_NORMAL_ARRAY</constant>,
- <constant>GL_NORMAL_ARRAY_STRIDE</constant>,
- <constant>GL_NORMAL_ARRAY_TYPE</constant>,
- <constant>GL_POLYGON_OFFSET_UNITS</constant>,
- <constant>GL_POLYGON_OFFSET_FACTOR</constant>,
- <constant>GL_POLYGON_OFFSET_FILL</constant>,
- <constant>GL_POLYGON_OFFSET_LINE</constant>,
- <constant>GL_POLYGON_OFFSET_POINT</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_SIZE</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_STRIDE</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_TYPE</constant>,
- <constant>GL_VERTEX_ARRAY</constant>,
- <constant>GL_VERTEX_ARRAY_SIZE</constant>,
- <constant>GL_VERTEX_ARRAY_STRIDE</constant>, and
- <constant>GL_VERTEX_ARRAY_TYPE</constant>
- are available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_ALIASED_POINT_SIZE_RANGE</constant>,
- <constant>GL_FEEDBACK_BUFFER_SIZE</constant>,
- <constant>GL_FEEDBACK_BUFFER_TYPE</constant>,
- <constant>GL_LIGHT_MODEL_AMBIENT</constant>,
- <constant>GL_LIGHT_MODEL_COLOR_CONTROL</constant>,
- <constant>GL_MAX_3D_TEXTURE_SIZE</constant>,
- <constant>GL_MAX_ELEMENTS_INDICES</constant>,
- <constant>GL_MAX_ELEMENTS_VERTICES</constant>,
- <constant>GL_PACK_IMAGE_HEIGHT</constant>,
- <constant>GL_PACK_SKIP_IMAGES</constant>,
- <constant>GL_RESCALE_NORMAL</constant>,
- <constant>GL_SELECTION_BUFFER_SIZE</constant>,
- <constant>GL_SMOOTH_LINE_WIDTH_GRANULARITY</constant>,
- <constant>GL_SMOOTH_LINE_WIDTH_RANGE</constant>,
- <constant>GL_SMOOTH_POINT_SIZE_GRANULARITY</constant>,
- <constant>GL_SMOOTH_POINT_SIZE_RANGE</constant>,
- <constant>GL_TEXTURE_3D</constant>,
- <constant>GL_TEXTURE_BINDING_3D</constant>,
- <constant>GL_UNPACK_IMAGE_HEIGHT</constant>, and
- <constant>GL_UNPACK_SKIP_IMAGES</constant>
- are available only if the GL version is 1.2 or greater.
- </para>
- <para>
- <constant>GL_COMPRESSED_TEXTURE_FORMATS</constant>,
- <constant>GL_NUM_COMPRESSED_TEXTURE_FORMATS</constant>,
- <constant>GL_TEXTURE_BINDING_CUBE_MAP</constant>, and
- <constant>GL_TEXTURE_COMPRESSION_HINT</constant>
- are available only if the GL version is 1.3 or greater.
- </para>
- <para>
- <constant>GL_BLEND_DST_ALPHA</constant>,
- <constant>GL_BLEND_DST_RGB</constant>,
- <constant>GL_BLEND_SRC_ALPHA</constant>,
- <constant>GL_BLEND_SRC_RGB</constant>,
- <constant>GL_CURRENT_FOG_COORD</constant>,
- <constant>GL_CURRENT_SECONDARY_COLOR</constant>,
- <constant>GL_FOG_COORD_ARRAY_STRIDE</constant>,
- <constant>GL_FOG_COORD_ARRAY_TYPE</constant>,
- <constant>GL_FOG_COORD_SRC</constant>,
- <constant>GL_MAX_TEXTURE_LOD_BIAS</constant>,
- <constant>GL_POINT_SIZE_MIN</constant>,
- <constant>GL_POINT_SIZE_MAX</constant>,
- <constant>GL_POINT_FADE_THRESHOLD_SIZE</constant>,
- <constant>GL_POINT_DISTANCE_ATTENUATION</constant>,
- <constant>GL_SECONDARY_COLOR_ARRAY_SIZE</constant>,
- <constant>GL_SECONDARY_COLOR_ARRAY_STRIDE</constant>, and
- <constant>GL_SECONDARY_COLOR_ARRAY_TYPE</constant>
- are available only if the GL version is 1.4 or greater.
- </para>
- <para>
- <constant>GL_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_COLOR_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_EDGE_FLAG_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_FOG_COORD_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_INDEX_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_NORMAL_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING</constant>, and
- <constant>GL_VERTEX_ARRAY_BUFFER_BINDING</constant>
- are available only if the GL version is 1.5 or greater.
- </para>
- <para>
- <constant>GL_BLEND_EQUATION_ALPHA</constant>,
- <constant>GL_BLEND_EQUATION_RGB</constant>,
- <constant>GL_DRAW_BUFFER</constant><emphasis>i</emphasis>,
- <constant>GL_FRAGMENT_SHADER_DERIVATIVE_HINT</constant>,
- <constant>GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS</constant>,
- <constant>GL_MAX_DRAW_BUFFERS</constant>,
- <constant>GL_MAX_FRAGMENT_UNIFORM_COMPONENTS</constant>,
- <constant>GL_MAX_TEXTURE_COORDS</constant>,
- <constant>GL_MAX_TEXTURE_IMAGE_UNITS</constant>,
- <constant>GL_MAX_VARYING_FLOATS</constant>,
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>,
- <constant>GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS</constant>,
- <constant>GL_MAX_VERTEX_UNIFORM_COMPONENTS</constant>,
- <constant>GL_POINT_SPRITE</constant>,
- <constant>GL_STENCIL_BACK_FAIL</constant>,
- <constant>GL_STENCIL_BACK_FUNC</constant>,
- <constant>GL_STENCIL_BACK_PASS_DEPTH_FAIL</constant>,
- <constant>GL_STENCIL_BACK_PASS_DEPTH_PASS</constant>,
- <constant>GL_STENCIL_BACK_REF</constant>,
- <constant>GL_STENCIL_BACK_VALUE_MASK</constant>,
- <constant>GL_STENCIL_BACK_WRITEMASK</constant>,
- <constant>GL_VERTEX_PROGRAM_POINT_SIZE</constant>, and
- <constant>GL_VERTEX_PROGRAM_TWO_SIDE</constant>
- are available only if the GL version is 2.0 or greater.
- </para>
- <para>
- <constant>GL_CURRENT_RASTER_SECONDARY_COLOR</constant>,
- <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant> and
- <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- are available only if the GL version is 2.1 or greater.
- </para>
- <para>
- <constant>GL_LINE_WIDTH_GRANULARITY</constant> was deprecated in GL version 1.2. Its
- functionality was replaced by <constant>GL_SMOOTH_LINE_WIDTH_GRANULARITY</constant>.
- </para>
- <para>
- <constant>GL_LINE_WIDTH_RANGE</constant> was deprecated in GL version 1.2. Its
- functionality was replaced by <constant>GL_SMOOTH_LINE_WIDTH_RANGE</constant>.
- </para>
- <para>
- <constant>GL_POINT_SIZE_GRANULARITY</constant> was deprecated in GL version 1.2. Its
- functionality was replaced by <constant>GL_SMOOTH_POINT_SIZE_GRANULARITY</constant>.
- </para>
- <para>
- <constant>GL_POINT_SIZE_RANGE</constant> was deprecated in GL version 1.2. Its
- functionality was replaced by <constant>GL_SMOOTH_POINT_SIZE_RANGE</constant>.
- </para>
- <para>
- <constant>GL_BLEND_EQUATION</constant> was deprecated in GL version 2.0. Its
- functionality was replaced by <constant>GL_BLEND_EQUATION_RGB</constant> and
- <constant>GL_BLEND_EQUATION_ALPHA</constant>.
- </para>
- <para>
- <constant>GL_COLOR_MATRIX</constant>,
- <constant>GL_COLOR_MATRIX_STACK_DEPTH</constant>,
- <constant>GL_COLOR_TABLE</constant>,
- <constant>GL_CONVOLUTION_1D</constant>,
- <constant>GL_CONVOLUTION_2D</constant>,
- <constant>GL_HISTOGRAM</constant>,
- <constant>GL_MAX_COLOR_MATRIX_STACK_DEPTH</constant>,
- <constant>GL_MINMAX</constant>,
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>,
- <constant>GL_POST_COLOR_MATRIX_RED_BIAS</constant>,
- <constant>GL_POST_COLOR_MATRIX_GREEN_BIAS</constant>,
- <constant>GL_POST_COLOR_MATRIX_BLUE_BIAS</constant>,
- <constant>GL_POST_COLOR_MATRIX_ALPHA_BIAS</constant>,
- <constant>GL_POST_COLOR_MATRIX_RED_SCALE</constant>,
- <constant>GL_POST_COLOR_MATRIX_GREEN_SCALE</constant>,
- <constant>GL_POST_COLOR_MATRIX_BLUE_SCALE</constant>,
- <constant>GL_POST_COLOR_MATRIX_ALPHA_SCALE</constant>,
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>,
- <constant>GL_POST_CONVOLUTION_RED_BIAS</constant>,
- <constant>GL_POST_CONVOLUTION_GREEN_BIAS</constant>,
- <constant>GL_POST_CONVOLUTION_BLUE_BIAS</constant>,
- <constant>GL_POST_CONVOLUTION_ALPHA_BIAS</constant>,
- <constant>GL_POST_CONVOLUTION_RED_SCALE</constant>,
- <constant>GL_POST_CONVOLUTION_GREEN_SCALE</constant>,
- <constant>GL_POST_CONVOLUTION_BLUE_SCALE</constant>,
- <constant>GL_POST_CONVOLUTION_ALPHA_SCALE</constant>, and
- <constant>GL_SEPARABLE_2D</constant>
- are available only if <code>ARB_imaging</code> is returned from <function>glGet</function>
- when called with the argument <constant>GL_EXTENSIONS</constant>.
- </para>
- <para>
- When the <code>ARB_multitexture</code> extension is supported, or the GL version
- is 1.3 or greater, the following
- parameters return the associated value for the active texture unit:
- <constant>GL_CURRENT_RASTER_TEXTURE_COORDS</constant>,
- <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_BINDING_1D</constant>,
- <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_BINDING_2D</constant>,
- <constant>GL_TEXTURE_3D</constant>, <constant>GL_TEXTURE_BINDING_3D</constant>,
- <constant>GL_TEXTURE_GEN_S</constant>,
- <constant>GL_TEXTURE_GEN_T</constant>,
- <constant>GL_TEXTURE_GEN_R</constant>,
- <constant>GL_TEXTURE_GEN_Q</constant>,
- <constant>GL_TEXTURE_MATRIX</constant>, and
- <constant>GL_TEXTURE_STACK_DEPTH</constant>.
- Likewise, the following parameters return the associated value for the
- active client texture unit:
- <constant>GL_TEXTURE_COORD_ARRAY</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_SIZE</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_STRIDE</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_TYPE</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGet</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetBufferParameteriv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetBufferPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetBufferSubData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetClipPlane</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetColorTableParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetConvolutionFilter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetConvolutionParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetHistogram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetHistogramParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetLight</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetMap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetMaterial</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetMinmax</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetMinmaxParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPixelMap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPolygonStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetSeparableFilter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetShaderSource</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetString</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetVertexAttribPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsEnabled</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>
+++ /dev/null
-<?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="glGetActiveAttrib">
- <refmeta>
- <refentrytitle>glGetActiveAttrib</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetActiveAttrib</refname>
- <refpurpose>Returns information about an active attribute variable for the specified program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetActiveAttrib</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
- <paramdef>GLsizei *<parameter>length</parameter></paramdef>
- <paramdef>GLint *<parameter>size</parameter></paramdef>
- <paramdef>GLenum *<parameter>type</parameter></paramdef>
- <paramdef>GLchar *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the attribute variable
- to be queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>bufSize</parameter></term>
- <listitem>
- <para>Specifies the maximum number of characters
- OpenGL is allowed to write in the character buffer
- indicated by <parameter>name</parameter>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>length</parameter></term>
- <listitem>
- <para>Returns the number of characters actually
- written by OpenGL in the string indicated by
- <parameter>name</parameter> (excluding the null
- terminator) if a value other than
- <constant>NULL</constant> is passed.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>Returns the size of the attribute
- variable.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>Returns the data type of the attribute
- variable.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>name</parameter></term>
- <listitem>
- <para>Returns a null terminated string containing
- the name of the attribute variable.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetActiveAttrib</function> returns information
- about an active attribute variable in the program object
- specified by <parameter>program</parameter>. The number of
- active attributes can be obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with the value <constant>GL_ACTIVE_ATTRIBUTES</constant>. A
- value of 0 for <parameter>index</parameter> selects the first
- active attribute variable. Permissible values for
- <parameter>index</parameter> range from 0 to the number of
- active attribute variables minus 1.</para>
-
- <para>A vertex shader may use either built-in attribute
- variables, user-defined attribute variables, or both. Built-in
- attribute variables have a prefix of "gl_" and
- reference conventional OpenGL vertex attribtes (e.g.,
- <parameter>gl_Vertex</parameter>,
- <parameter>gl_Normal</parameter>, etc., see the OpenGL Shading
- Language specification for a complete list.) User-defined
- attribute variables have arbitrary names and obtain their values
- through numbered generic vertex attributes. An attribute
- variable (either built-in or user-defined) is considered active
- if it is determined during the link operation that it may be
- accessed during program execution. Therefore,
- <parameter>program</parameter> should have previously been the
- target of a call to
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- but it is not necessary for it to have been linked
- successfully.</para>
-
- <para>The size of the character buffer required to store the
- longest attribute variable name in
- <parameter>program</parameter> can be obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with the value
- <constant>GL_ACTIVE_ATTRIBUTE_MAX_LENGTH</constant>. This value
- should be used to allocate a buffer of sufficient size to store
- the returned attribute name. The size of this character buffer
- is passed in <parameter>bufSize</parameter>, and a pointer to
- this character buffer is passed in
- <parameter>name</parameter>.</para>
-
- <para><function>glGetActiveAttrib</function> returns the name of
- the attribute variable indicated by
- <parameter>index</parameter>, storing it in the character buffer
- specified by <parameter>name</parameter>. The string returned
- will be null terminated. The actual number of characters written
- into this buffer is returned in <parameter>length</parameter>,
- and this count does not include the null termination character.
- If the length of the returned string is not required, a value of
- <constant>NULL</constant> can be passed in the
- <parameter>length</parameter> argument.</para>
-
- <para>The <parameter>type</parameter> argument will return a
- pointer to the attribute variable's data type. The symbolic
- constants <constant>GL_FLOAT</constant>,
- <constant>GL_FLOAT_VEC2</constant>,
- <constant>GL_FLOAT_VEC3</constant>,
- <constant>GL_FLOAT_VEC4</constant>,
- <constant>GL_FLOAT_MAT2</constant>,
- <constant>GL_FLOAT_MAT3</constant>,
- <constant>GL_FLOAT_MAT4</constant>,
- <constant>GL_FLOAT_MAT2x3</constant>,
- <constant>GL_FLOAT_MAT2x4</constant>,
- <constant>GL_FLOAT_MAT3x2</constant>,
- <constant>GL_FLOAT_MAT3x4</constant>,
- <constant>GL_FLOAT_MAT4x2</constant>, or
- <constant>GL_FLOAT_MAT4x3</constant> may be returned. The
- <parameter>size</parameter> argument will return the size of the
- attribute, in units of the type returned in
- <parameter>type</parameter>.</para>
-
- <para>The list of active attribute variables may include both
- built-in attribute variables (which begin with the prefix
- "gl_") as well as user-defined attribute variable
- names.</para>
-
- <para>This function will return as much information as it can
- about the specified active attribute variable. If no information
- is available, <parameter>length</parameter> will be 0, and
- <parameter>name</parameter> will be an empty string. This
- situation could occur if this function is called after a link
- operation that failed. If an error occurs, the return values
- <parameter>length</parameter>, <parameter>size</parameter>,
- <parameter>type</parameter>, and <parameter>name</parameter>
- will be unmodified.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetActiveAttrib</function>
- is available only if the GL version is 2.0 or greater.</para>
-
- <para><constant>GL_FLOAT_MAT2x3</constant>,
- <constant>GL_FLOAT_MAT2x4</constant>,
- <constant>GL_FLOAT_MAT3x2</constant>,
- <constant>GL_FLOAT_MAT3x4</constant>,
- <constant>GL_FLOAT_MAT4x2</constant>, and
- <constant>GL_FLOAT_MAT4x3</constant>
- will only be returned as a <parameter>type</parameter>
- if the GL version is 2.1 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to the
- number of active attribute variables in
- <parameter>program</parameter>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetActiveAttrib</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>bufSize</parameter> is less than 0.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with argument <constant>GL_ACTIVE_ATTRIBUTES</constant> or
- <constant>GL_ACTIVE_ATTRIBUTE_MAX_LENGTH</constant>.</para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetActiveUniform">
- <refmeta>
- <refentrytitle>glGetActiveUniform</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetActiveUniform</refname>
- <refpurpose>Returns information about an active uniform variable for the specified program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetActiveUniform</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
- <paramdef>GLsizei *<parameter>length</parameter></paramdef>
- <paramdef>GLint *<parameter>size</parameter></paramdef>
- <paramdef>GLenum *<parameter>type</parameter></paramdef>
- <paramdef>GLchar *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the uniform variable to
- be queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>bufSize</parameter></term>
- <listitem>
- <para>Specifies the maximum number of characters
- OpenGL is allowed to write in the character buffer
- indicated by <parameter>name</parameter>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>length</parameter></term>
- <listitem>
- <para>Returns the number of characters actually
- written by OpenGL in the string indicated by
- <parameter>name</parameter> (excluding the null
- terminator) if a value other than
- <constant>NULL</constant> is passed.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>Returns the size of the uniform
- variable.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>Returns the data type of the uniform
- variable.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>name</parameter></term>
- <listitem>
- <para>Returns a null terminated string containing
- the name of the uniform variable.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetActiveUniform</function> returns
- information about an active uniform variable in the program
- object specified by <parameter>program</parameter>. The number
- of active uniform variables can be obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with the value <constant>GL_ACTIVE_UNIFORMS</constant>. A value
- of 0 for <parameter>index</parameter> selects the first active
- uniform variable. Permissible values for
- <parameter>index</parameter> range from 0 to the number of
- active uniform variables minus 1.</para>
-
- <para>Shaders may use either built-in uniform variables,
- user-defined uniform variables, or both. Built-in uniform
- variables have a prefix of "gl_" and reference
- existing OpenGL state or values derived from such state (e.g.,
- <parameter>gl_Fog</parameter>,
- <parameter>gl_ModelViewMatrix</parameter>, etc., see the OpenGL
- Shading Language specification for a complete list.)
- User-defined uniform variables have arbitrary names and obtain
- their values from the application through calls to
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>.
- A uniform variable (either built-in or user-defined) is
- considered active if it is determined during the link operation
- that it may be accessed during program execution. Therefore,
- <parameter>program</parameter> should have previously been the
- target of a call to
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- but it is not necessary for it to have been linked
- successfully.</para>
-
- <para>The size of the character buffer required to store the
- longest uniform variable name in <parameter>program</parameter>
- can be obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with the value
- <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>. This value
- should be used to allocate a buffer of sufficient size to store
- the returned uniform variable name. The size of this character
- buffer is passed in <parameter>bufSize</parameter>, and a
- pointer to this character buffer is passed in
- <parameter>name.</parameter></para>
-
- <para><function>glGetActiveUniform</function> returns the name
- of the uniform variable indicated by
- <parameter>index</parameter>, storing it in the character buffer
- specified by <parameter>name</parameter>. The string returned
- will be null terminated. The actual number of characters written
- into this buffer is returned in <parameter>length</parameter>,
- and this count does not include the null termination character.
- If the length of the returned string is not required, a value of
- <constant>NULL</constant> can be passed in the
- <parameter>length</parameter> argument.</para>
-
- <para>The <parameter>type</parameter>
- argument will return a pointer to the uniform variable's data
- type. The symbolic constants
- <constant>GL_FLOAT</constant>,
- <constant>GL_FLOAT_VEC2</constant>,
- <constant>GL_FLOAT_VEC3</constant>,
- <constant>GL_FLOAT_VEC4</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_INT_VEC2</constant>,
- <constant>GL_INT_VEC3</constant>,
- <constant>GL_INT_VEC4</constant>,
- <constant>GL_BOOL</constant>,
- <constant>GL_BOOL_VEC2</constant>,
- <constant>GL_BOOL_VEC3</constant>,
- <constant>GL_BOOL_VEC4</constant>,
- <constant>GL_FLOAT_MAT2</constant>,
- <constant>GL_FLOAT_MAT3</constant>,
- <constant>GL_FLOAT_MAT4</constant>,
- <constant>GL_FLOAT_MAT2x3</constant>,
- <constant>GL_FLOAT_MAT2x4</constant>,
- <constant>GL_FLOAT_MAT3x2</constant>,
- <constant>GL_FLOAT_MAT3x4</constant>,
- <constant>GL_FLOAT_MAT4x2</constant>,
- <constant>GL_FLOAT_MAT4x3</constant>,
- <constant>GL_SAMPLER_1D</constant>,
- <constant>GL_SAMPLER_2D</constant>,
- <constant>GL_SAMPLER_3D</constant>,
- <constant>GL_SAMPLER_CUBE</constant>,
- <constant>GL_SAMPLER_1D_SHADOW</constant>, or
- <constant>GL_SAMPLER_2D_SHADOW</constant>
- may be returned.</para>
-
- <para>If one or more elements of an array are active, the name
- of the array is returned in <parameter>name</parameter>, the
- type is returned in <parameter>type</parameter>, and the
- <parameter>size</parameter> parameter returns the highest array
- element index used, plus one, as determined by the compiler
- and/or linker. Only one active uniform variable will be reported
- for a uniform array.</para>
-
- <para>Uniform variables that are declared as structures or
- arrays of structures will not be returned directly by this
- function. Instead, each of these uniform variables will be
- reduced to its fundamental components containing the
- "." and "[]" operators such that each of the
- names is valid as an argument to
- <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>.
- Each of these reduced uniform variables is counted as one active
- uniform variable and is assigned an index. A valid name cannot
- be a structure, an array of structures, or a subcomponent of a
- vector or matrix.</para>
-
- <para>The size of the uniform variable will be returned in
- <parameter>size</parameter>. Uniform variables other than arrays
- will have a size of 1. Structures and arrays of structures will
- be reduced as described earlier, such that each of the names
- returned will be a data type in the earlier list. If this
- reduction results in an array, the size returned will be as
- described for uniform arrays; otherwise, the size returned will
- be 1.</para>
-
- <para>The list of active uniform variables may include both
- built-in uniform variables (which begin with the prefix
- "gl_") as well as user-defined uniform variable
- names.</para>
-
- <para>This function will return as much information as it can
- about the specified active uniform variable. If no information
- is available, <parameter>length</parameter> will be 0, and
- <parameter>name</parameter> will be an empty string. This
- situation could occur if this function is called after a link
- operation that failed. If an error occurs, the return values
- <parameter>length</parameter>, <parameter>size</parameter>,
- <parameter>type</parameter>, and <parameter>name</parameter>
- will be unmodified.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetActiveUniform</function> is available only
- if the GL version is 2.0 or greater.</para>
-
- <para><constant>GL_FLOAT_MAT2x3</constant>,
- <constant>GL_FLOAT_MAT2x4</constant>,
- <constant>GL_FLOAT_MAT3x2</constant>,
- <constant>GL_FLOAT_MAT3x4</constant>,
- <constant>GL_FLOAT_MAT4x2</constant>, and
- <constant>GL_FLOAT_MAT4x3</constant>
- will only be returned as a <parameter>type</parameter>
- if the GL version is 2.1 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to the
- number of active uniform variables in
- <parameter>program</parameter>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetActiveUniform</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>bufSize</parameter> is less than 0.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_UNIFORM_COMPONENTS
- </constant> or
- <constant>GL_MAX_FRAGMENT_UNIFORM_COMPONENTS</constant>.</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with argument <constant>GL_ACTIVE_UNIFORMS</constant> or
- <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>.</para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetAttachedShaders">
- <refmeta>
- <refentrytitle>glGetAttachedShaders</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetAttachedShaders</refname>
- <refpurpose>Returns the handles of the shader objects attached to a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetAttachedShaders</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLsizei <parameter>maxCount</parameter></paramdef>
- <paramdef>GLsizei *<parameter>count</parameter></paramdef>
- <paramdef>GLuint *<parameter>shaders</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>maxCount</parameter></term>
- <listitem>
- <para>Specifies the size of the array for storing
- the returned object names.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>Returns the number of names actually returned
- in <parameter>shaders</parameter>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>shaders</parameter></term>
- <listitem>
- <para>Specifies an array that is used to return the
- names of attached shader objects.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetAttachedShaders</function> returns the
- names of the shader objects attached to
- <parameter>program</parameter>. The names of shader objects that
- are attached to <parameter>program</parameter> will be returned
- in <parameter>shaders.</parameter> The actual number of shader
- names written into <parameter>shaders</parameter> is returned in
- <parameter>count.</parameter> If no shader objects are attached
- to <parameter>program</parameter>, <parameter>count</parameter>
- is set to 0. The maximum number of shader names that may be
- returned in <parameter>shaders</parameter> is specified by
- <parameter>maxCount</parameter>. </para>
-
- <para>If the number of names actually returned is not required
- (for instance, if it has just been obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>),
- a value of <constant>NULL</constant> may be passed for count. If
- no shader objects are attached to
- <parameter>program</parameter>, a value of 0 will be returned in
- <parameter>count</parameter>. The actual number of attached
- shaders can be obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with the value <constant>GL_ATTACHED_SHADERS</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetAttachedShaders</function>
- is available only if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>maxCount</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- is executed between the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with argument <constant>GL_ATTACHED_SHADERS</constant></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry></para>.
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetAttribLocation">
- <refmeta>
- <refentrytitle>glGetAttribLocation</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetAttribLocation</refname>
- <refpurpose>Returns the location of an attribute variable</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLint <function>glGetAttribLocation</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>const GLchar *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>name</parameter></term>
- <listitem>
- <para>Points to a null terminated string containing
- the name of the attribute variable whose location is
- to be queried.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetAttribLocation</function> queries the
- previously linked program object specified by
- <parameter>program</parameter> for the attribute variable
- specified by <parameter>name</parameter> and returns the index
- of the generic vertex attribute that is bound to that attribute
- variable. If <parameter>name</parameter> is a matrix attribute
- variable, the index of the first column of the matrix is
- returned. If the named attribute variable is not an active
- attribute in the specified program object or if
- <parameter>name</parameter> starts with the reserved prefix
- "gl_", a value of -1 is returned.</para>
-
- <para>The association between an attribute variable name and a
- generic attribute index can be specified at any time by calling
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>.
- Attribute bindings do not go into effect until
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
- is called. After a program object has been linked successfully,
- the index values for attribute variables remain fixed until the
- next link command occurs. The attribute values can only be
- queried after a link if the link was successful.
- <function>glGetAttribLocation</function> returns the binding
- that actually went into effect the last time
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
- was called for the specified program object. Attribute bindings
- that have been specified since the last link operation are not
- returned by <function>glGetAttribLocation</function>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetAttribLocation</function> is available only
- if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> has not been successfully
- linked.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetAttribLocation</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with argument <parameter>program</parameter> and the index of an
- active attribute</para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetBufferPointerv">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetBufferPointerv</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetBufferPointerv</refname>
- <refpurpose>return the pointer to a mapped buffer object's data store</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetBufferPointerv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLvoid ** <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target buffer object.
- The symbolic constant must be <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the pointer to be returned. The symbolic constant must be <constant>GL_BUFFER_MAP_POINTER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Returns the pointer value specified by <parameter>pname</parameter>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetBufferPointerv</function> returns pointer information. <parameter>pname</parameter> is a symbolic constant
- indicating the pointer to be returned, which must be <constant>GL_BUFFER_MAP_POINTER</constant>, the pointer
- to which the buffer object's data store is mapped. If the data store is not currently mapped, <constant>NULL</constant> is returned.
- <parameter>params</parameter> is a pointer to a location in which to place the returned pointer value.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>params</parameter>.
- </para>
- <para>
- <function>glGetBufferPointerv</function> is available only if the GL version is 1.5 or greater.
- </para>
- <para>
- Targets <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are available
- only if the GL version is 2.1 or greater.
- </para>
- <para>
- The initial value for the pointer is <constant>NULL</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetBufferPointerv</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetBufferSubData">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetBufferSubData</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetBufferSubData</refname>
- <refpurpose>returns a subset of a buffer object's data store</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetBufferSubData</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLintptr <parameter>offset</parameter></paramdef>
- <paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
- <paramdef>GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target buffer object.
- The symbolic constant must be <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>offset</parameter></term>
- <listitem>
- <para>
- Specifies the offset into the buffer object's data store from which data will be returned,
- measured in bytes.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>
- Specifies the size in bytes of the data store region being returned.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the location where buffer object data is returned.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetBufferSubData</function> returns some or all of the data from the buffer object currently
- bound to <parameter>target</parameter>. Data starting at byte offset <parameter>offset</parameter> and
- extending for <parameter>size</parameter> bytes is copied from the data store to the memory pointed to by
- <parameter>data</parameter>. An error is thrown if the buffer object is currently mapped, or if
- <parameter>offset</parameter> and <parameter>size</parameter> together define a range beyond the bounds
- of the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>data</parameter>.
- </para>
- <para>
- <function>glGetBufferSubData</function> is available only if the GL version is 1.5 or greater.
- </para>
- <para>
- Targets <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are available
- only if the GL version is 2.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
- <constant>GL_ARRAY_BUFFER</constant>, <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or
- <parameter>size</parameter> is negative, or if together they define a region of memory
- that extends beyond the buffer object's allocated data store.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the buffer object being queried is mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetBufferSubData</function>
- is executed between the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBufferSubData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetCompressedTexImage">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetCompressedTexImage</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetCompressedTexImage</refname>
- <refpurpose>return a compressed texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetCompressedTexImage</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>lod</parameter></paramdef>
- <paramdef>GLvoid * <parameter>img</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies which texture is to be obtained.
- <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, and <constant>GL_TEXTURE_3D</constant>
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, and
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>lod</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number of the desired image.
- Level 0 is the base image level.
- Level
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>th
- mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>img</parameter></term>
- <listitem>
- <para>
- Returns the compressed texture image.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetCompressedTexImage</function> returns the compressed texture image associated with <parameter>target</parameter> and <parameter>lod</parameter>
- into <parameter>img</parameter>. <parameter>img</parameter> should be an array of
- <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant> bytes.
- <parameter>target</parameter> specifies whether the desired texture image was one specified by
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> (<constant>GL_TEXTURE_1D</constant>),
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> (<constant>GL_TEXTURE_2D</constant> or any of <constant>GL_TEXTURE_CUBE_MAP_*</constant>), or
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> (<constant>GL_TEXTURE_3D</constant>).
- <parameter>lod</parameter> specifies the level-of-detail number of the desired image.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- requested, <parameter>img</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- <para>
- To minimize errors, first verify that the texture is compressed by calling
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>. If
- the texture is compressed, then determine the amount of memory required to
- store the compressed texture by calling <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with
- argument <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>. Finally, retrieve the
- internal format of the texture by calling <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with
- argument <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>.
- To store the texture for later use, associate the internal format and size
- with the retrieved texture image. These data can be used by the respective
- texture or subtexture loading routine used for loading <parameter>target</parameter> textures.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glGetCompressedTexImage</function> is available only if the GL version is 1.3 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>lod</parameter> is less than zero or greater
- than the maximum number of LODs permitted by the implementation.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetCompressedTexImage</function> is used to retrieve a
- texture that is in an uncompressed internal format.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer
- object such that the memory writes required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetCompressedTexImage</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glGetError">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetError</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetError</refname>
- <refpurpose>return error information</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLenum <function>glGetError</function></funcdef>
- <paramdef> <parameter>void</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetError</function> returns the value of the error flag.
- Each detectable error is assigned a numeric code and symbolic name.
- When an error occurs,
- the error flag is set to the appropriate error code value.
- No other errors are recorded until <function>glGetError</function> is called,
- the error code is returned,
- and the flag is reset to <constant>GL_NO_ERROR</constant>.
- If a call to <function>glGetError</function> returns <constant>GL_NO_ERROR</constant>,
- there has been no detectable error since the last call to <function>glGetError</function>,
- or since the GL was initialized.
- </para>
- <para>
- To allow for distributed implementations,
- there may be several error flags.
- If any single error flag has recorded an error,
- the value of that flag is returned
- and that flag is reset to <constant>GL_NO_ERROR</constant>
- when <function>glGetError</function> is called.
- If more than one flag has recorded an error,
- <function>glGetError</function> returns and clears an arbitrary error flag value.
- Thus, <function>glGetError</function> should always be called in a loop,
- until it returns <constant>GL_NO_ERROR</constant>,
- if all error flags are to be reset.
- </para>
- <para>
- Initially, all error flags are set to <constant>GL_NO_ERROR</constant>.
- </para>
- <para>
- The following errors are currently defined:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_NO_ERROR</constant></term>
- <listitem>
- <para>
- No error has been recorded.
- The value of this symbolic constant is guaranteed to be 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INVALID_ENUM</constant></term>
- <listitem>
- <para>
- An unacceptable value is specified for an enumerated argument.
- The offending command is ignored
- and has no other side effect than to set the error flag.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INVALID_VALUE</constant></term>
- <listitem>
- <para>
- A numeric argument is out of range.
- The offending command is ignored
- and has no other side effect than to set the error flag.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INVALID_OPERATION</constant></term>
- <listitem>
- <para>
- The specified operation is not allowed in the current state.
- The offending command is ignored
- and has no other side effect than to set the error flag.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STACK_OVERFLOW</constant></term>
- <listitem>
- <para>
- This command would cause a stack overflow.
- The offending command is ignored
- and has no other side effect than to set the error flag.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STACK_UNDERFLOW</constant></term>
- <listitem>
- <para>
- This command would cause a stack underflow.
- The offending command is ignored
- and has no other side effect than to set the error flag.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_OUT_OF_MEMORY</constant></term>
- <listitem>
- <para>
- There is not enough memory left to execute the command.
- The state of the GL is undefined,
- except for the state of the error flags,
- after this error is recorded.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TABLE_TOO_LARGE</constant></term>
- <listitem>
- <para>
- The specified table exceeds the implementation's maximum supported table
- size. The offending command is ignored and has no other side effect
- than to set the error flag.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- When an error flag is set,
- results of a GL operation are undefined only if <constant>GL_OUT_OF_MEMORY</constant>
- has occurred.
- In all other cases,
- the command generating the error is ignored and has no effect on the GL state
- or frame buffer contents.
- If the generating command returns a value, it returns 0.
- If <function>glGetError</function> itself generates an error, it returns 0.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <constant>GL_TABLE_TOO_LARGE</constant> was introduced in GL version 1.2.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetError</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- In this case, <function>glGetError</function> returns 0.
- </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>
+++ /dev/null
-<?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="glGetProgram">
- <refmeta>
- <refentrytitle>glGetProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetProgramiv</refname>
- <refpurpose>Returns a parameter from a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetProgramiv</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint *<parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>Specifies the object parameter. Accepted
- symbolic names are
- <constant>GL_DELETE_STATUS</constant>,
- <constant>GL_LINK_STATUS</constant>,
- <constant>GL_VALIDATE_STATUS</constant>,
- <constant>GL_INFO_LOG_LENGTH</constant>,
- <constant>GL_ATTACHED_SHADERS</constant>,
- <constant>GL_ACTIVE_ATTRIBUTES</constant>,
- <constant>GL_ACTIVE_ATTRIBUTE_MAX_LENGTH</constant>,
- <constant>GL_ACTIVE_UNIFORMS</constant>,
- <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>Returns the requested object parameter.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetProgram</function>
- returns in <parameter>params</parameter>
- the value of a parameter for a specific program object. The following parameters are defined:</para>
-
- <variablelist>
- <varlistentry>
- <term><constant>GL_DELETE_STATUS</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns
- <constant>GL_TRUE</constant> if
- <parameter>program</parameter> is currently flagged
- for deletion, and <constant>GL_FALSE</constant>
- otherwise.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_LINK_STATUS</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns
- <constant>GL_TRUE</constant> if the last link
- operation on <parameter>program</parameter> was
- successful, and <constant>GL_FALSE</constant>
- otherwise.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_VALIDATE_STATUS</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns
- <constant>GL_TRUE</constant> or if the last
- validation operation on
- <parameter>program</parameter> was successful, and
- <constant>GL_FALSE</constant>
- otherwise.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_INFO_LOG_LENGTH</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns the
- number of characters in the information log for
- <parameter>program</parameter> including the null
- termination character (i.e., the size of the
- character buffer required to store the information
- log). If <parameter>program</parameter> has no
- information log, a value of 0 is
- returned.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_ATTACHED_SHADERS</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns the
- number of shader objects attached to
- <parameter>program</parameter>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_ACTIVE_ATTRIBUTES</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns the
- number of active attribute variables for
- <parameter>program</parameter>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_ACTIVE_ATTRIBUTE_MAX_LENGTH</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns the
- length of the longest active attribute name for
- <parameter>program</parameter>, including the null
- termination character (i.e., the size of the
- character buffer required to store the longest
- attribute name). If no active attributes exist, 0 is
- returned.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_ACTIVE_UNIFORMS</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns the
- number of active uniform variables for
- <parameter>program</parameter>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns the
- length of the longest active uniform variable name
- for <parameter>program</parameter>, including the
- null termination character (i.e., the size of the
- character buffer required to store the longest
- uniform variable name). If no active uniform
- variables exist, 0 is returned.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetProgram</function> is available only if the
- GL version is 2.0 or greater.</para>
-
- <para>If an error is generated, no change is made to the
- contents of <parameter>params</parameter>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant>
- is generated if <parameter>program</parameter>
- is not a value generated by OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant>
- is generated if <parameter>program</parameter>
- does not refer to a program object.</para>
-
- <para><constant>GL_INVALID_ENUM</constant>
- is generated if <parameter>pname</parameter>
- is not an accepted value.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetProgram</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry>
- <parameter></parameter></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetProgramInfoLog">
- <refmeta>
- <refentrytitle>glGetProgramInfoLog</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetProgramInfoLog</refname>
- <refpurpose>Returns the information log for a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetProgramInfoLog</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLsizei <parameter>maxLength</parameter></paramdef>
- <paramdef>GLsizei *<parameter>length</parameter></paramdef>
- <paramdef>GLchar *<parameter>infoLog</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object whose information
- log is to be queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>maxLength</parameter></term>
- <listitem>
- <para>Specifies the size of the character buffer for
- storing the returned information log.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>length</parameter></term>
- <listitem>
- <para>Returns the length of the string returned in
- <parameter>infoLog</parameter> (excluding the null
- terminator).</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>infoLog</parameter></term>
- <listitem>
- <para>Specifies an array of characters that is used
- to return the information log.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetProgramInfoLog</function> returns the
- information log for the specified program object. The
- information log for a program object is modified when the
- program object is linked or validated. The string that is
- returned will be null terminated.</para>
-
- <para><function>glGetProgramInfoLog</function> returns in
- <parameter>infoLog</parameter> as much of the information log as
- it can, up to a maximum of <parameter>maxLength</parameter>
- characters. The number of characters actually returned,
- excluding the null termination character, is specified by
- <parameter>length</parameter>. If the length of the returned
- string is not required, a value of <constant>NULL</constant> can
- be passed in the <parameter>length</parameter> argument. The
- size of the buffer required to store the returned information
- log can be obtained by calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with the value <constant>GL_INFO_LOG_LENGTH</constant>. </para>
-
- <para>The information log for a program object is either an
- empty string, or a string containing information about the last
- link operation, or a string containing information about the
- last validation operation. It may contain diagnostic messages,
- warning messages, and other information. When a program object
- is created, its information log will be a string of length
- 0.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetProgramInfoLog</function> is available only
- if the GL version is 2.0 or greater.</para>
-
- <para>The information log for a program object is the OpenGL
- implementer's primary mechanism for conveying information about
- linking and validating. Therefore, the information log can be
- helpful to application developers during the development
- process, even when these operations are successful. Application
- developers should not expect different OpenGL implementations to
- produce identical information logs.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>maxLength</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetProgramInfoLog</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with argument <constant>GL_INFO_LOG_LENGTH</constant></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetQueryObject">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetQueryObject</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetQueryObject</refname>
- <refpurpose>return parameters of a query object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetQueryObjectiv</function></funcdef>
- <paramdef>GLuint <parameter>id</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetQueryObjectuiv</function></funcdef>
- <paramdef>GLuint <parameter>id</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLuint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>id</parameter></term>
- <listitem>
- <para>
- Specifies the name of a query object.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of a query object parameter.
- Accepted values are <constant>GL_QUERY_RESULT</constant> or <constant>GL_QUERY_RESULT_AVAILABLE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Returns the requested data.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetQueryObject</function> returns in <parameter>params</parameter> a selected parameter of the query object
- specified by <parameter>id</parameter>.
- </para>
- <para>
- <parameter>pname</parameter> names a specific query object parameter. <parameter>pname</parameter> can be as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_QUERY_RESULT</constant></term>
- <listitem>
- <para>
- <parameter>params</parameter> returns the value of the query object's passed samples counter.
- The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_QUERY_RESULT_AVAILABLE</constant></term>
- <listitem>
- <para>
- <parameter>params</parameter> returns whether the passed samples counter is immediately available.
- If a delay would occur waiting for the query result, <constant>GL_FALSE</constant> is returned.
- Otherwise, <constant>GL_TRUE</constant> is returned, which also indicates that the results of all
- previous queries are available as well.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>params</parameter>.
- </para>
- <para>
- <function>glGetQueryObject</function> implicitly flushes the GL pipeline so that any incomplete rendering
- delimited by the occlusion query completes in finite time.
- </para>
- <para>
- If multiple queries are issued using the same query object <parameter>id</parameter> before calling
- <function>glGetQueryObject</function>, the results of the most recent query will be returned. In this case,
- when issuing a new query, the results of the previous query are discarded.
- </para>
- <para>
- <function>glGetQueryObject</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is not the name of a query object.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>id</parameter> is the name of a currently active
- query object.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetQueryObject</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetQueryiv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetQueryiv">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetQueryiv</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetQueryiv</refname>
- <refpurpose>return parameters of a query object target</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetQueryiv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies a query object target.
- Must be <constant>GL_SAMPLES_PASSED</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of a query object target parameter.
- Accepted values are <constant>GL_CURRENT_QUERY</constant> or <constant>GL_QUERY_COUNTER_BITS</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Returns the requested data.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetQueryiv</function> returns in <parameter>params</parameter> a selected parameter of the query object target
- specified by <parameter>target</parameter>.
- </para>
- <para>
- <parameter>pname</parameter> names a specific query object target parameter. When <parameter>target</parameter> is
- <constant>GL_SAMPLES_PASSED</constant>, <parameter>pname</parameter> can be as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_CURRENT_QUERY</constant></term>
- <listitem>
- <para>
- <parameter>params</parameter> returns the name of the currently active occlusion query object.
- If no occlusion query is active, 0 is returned. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_QUERY_COUNTER_BITS</constant></term>
- <listitem>
- <para>
- <parameter>params</parameter> returns the number of bits in the query counter used to accumulate passing samples.
- If the number of bits returned is 0, the implementation does not support a query counter, and the results
- obtained from <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry> are useless.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>params</parameter>.
- </para>
- <para>
- <function>glGetQueryiv</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetQueryiv</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glGetQueryObject</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsQuery</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetShader">
- <refmeta>
- <refentrytitle>glGetShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetShaderiv</refname>
- <refpurpose>Returns a parameter from a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetShaderiv</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint *<parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>Specifies the object parameter. Accepted
- symbolic names are
- <constant>GL_SHADER_TYPE</constant>,
- <constant>GL_DELETE_STATUS</constant>,
- <constant>GL_COMPILE_STATUS</constant>,
- <constant>GL_INFO_LOG_LENGTH</constant>,
- <constant>GL_SHADER_SOURCE_LENGTH</constant>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>Returns the requested object parameter.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
-
- <para><function>glGetShader</function>
- returns in <parameter>params</parameter>
- the value of a parameter for a specific shader object. The
- following parameters are defined:</para>
-
- <variablelist>
- <varlistentry>
- <term><constant>GL_SHADER_TYPE</constant></term>
- <listitem>
- <para> <parameter>params</parameter> returns
- <constant>GL_VERTEX_SHADER</constant> if
- <parameter>shader</parameter> is a vertex shader
- object, and <constant>GL_FRAGMENT_SHADER</constant>
- if <parameter>shader</parameter> is a fragment
- shader object.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_DELETE_STATUS</constant></term>
- <listitem>
- <para> <parameter>params</parameter> returns
- <constant>GL_TRUE</constant> if
- <parameter>shader</parameter> is currently flagged
- for deletion, and <constant>GL_FALSE</constant>
- otherwise.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_COMPILE_STATUS</constant></term>
- <listitem>
- <para> <parameter>params</parameter> returns
- <constant>GL_TRUE</constant> if the last compile
- operation on <parameter>shader</parameter> was
- successful, and <constant>GL_FALSE</constant>
- otherwise.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_INFO_LOG_LENGTH</constant></term>
- <listitem>
- <para> <parameter>params</parameter> returns the
- number of characters in the information log for
- <parameter>shader</parameter> including the null
- termination character (i.e., the size of the
- character buffer required to store the information
- log). If <parameter>shader</parameter> has no
- information log, a value of 0 is returned.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_SHADER_SOURCE_LENGTH</constant></term>
- <listitem>
- <para> <parameter>params</parameter> returns the
- length of the concatenation of the source strings
- that make up the shader source for the
- <parameter>shader</parameter>, including the null
- termination character. (i.e., the size of the
- character buffer required to store the shader
- source). If no source code exists, 0 is
- returned.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetShader</function> is available only if the
- GL version is 2.0 or greater.</para>
-
- <para>If an error is generated, no change is made to the
- contents of <parameter>params</parameter>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>shader</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> does not refer to a shader
- object.</para>
-
- <para><constant>GL_INVALID_ENUM</constant> is generated if
- <parameter>pname</parameter> is not an accepted value.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>
- with argument <parameter>shader</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetShaderSource</refentrytitle></citerefentry>
- with argument <parameter>shader</parameter></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetShaderInfoLog">
- <refmeta>
- <refentrytitle>glGetShaderInfoLog</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetShaderInfoLog</refname>
- <refpurpose>Returns the information log for a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetShaderInfoLog</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- <paramdef>GLsizei <parameter>maxLength</parameter></paramdef>
- <paramdef>GLsizei *<parameter>length</parameter></paramdef>
- <paramdef>GLchar *<parameter>infoLog</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object whose information
- log is to be queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>maxLength</parameter></term>
- <listitem>
- <para>Specifies the size of the character buffer for
- storing the returned information log.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>length</parameter></term>
- <listitem>
- <para>Returns the length of the string returned in
- <parameter>infoLog</parameter> (excluding the null
- terminator).</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>infoLog</parameter></term>
- <listitem>
- <para>Specifies an array of characters that is used
- to return the information log.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetShaderInfoLog</function> returns the
- information log for the specified shader object. The information
- log for a shader object is modified when the shader is compiled.
- The string that is returned will be null terminated.</para>
-
- <para><function>glGetShaderInfoLog</function> returns in
- <parameter>infoLog</parameter> as much of the information log as
- it can, up to a maximum of <parameter>maxLength</parameter>
- characters. The number of characters actually returned,
- excluding the null termination character, is specified by
- <parameter>length</parameter>. If the length of the returned
- string is not required, a value of <constant>NULL</constant> can
- be passed in the <parameter>length</parameter> argument. The
- size of the buffer required to store the returned information
- log can be obtained by calling
- <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with the value <constant>GL_INFO_LOG_LENGTH</constant>.</para>
-
- <para>The information log for a shader object is a string that
- may contain diagnostic messages, warning messages, and other
- information about the last compile operation. When a shader
- object is created, its information log will be a string of
- length 0.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetShaderInfoLog</function> is available only
- if the GL version is 2.0 or greater.</para>
-
- <para>The information log for a shader object is the OpenGL
- implementer's primary mechanism for conveying information about
- the compilation process. Therefore, the information log can be
- helpful to application developers during the development
- process, even when compilation is successful. Application
- developers should not expect different OpenGL implementations to
- produce identical information logs.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>shader</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not a shader object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>maxLength</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetShaderInfoLog</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with argument <constant>GL_INFO_LOG_LENGTH</constant></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetShaderSource">
- <refmeta>
- <refentrytitle>glGetShaderSource</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetShaderSource</refname>
- <refpurpose>Returns the source code string from a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetShaderSource</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- <paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
- <paramdef>GLsizei *<parameter>length</parameter></paramdef>
- <paramdef>GLchar *<parameter>source</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the shader object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>bufSize</parameter></term>
- <listitem>
- <para>Specifies the size of the character buffer for
- storing the returned source code string.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>length</parameter></term>
- <listitem>
- <para>Returns the length of the string returned in
- <parameter>source</parameter> (excluding the null
- terminator).</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>source</parameter></term>
- <listitem>
- <para>Specifies an array of characters that is used
- to return the source code string.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetShaderSource</function> returns the
- concatenation of the source code strings from the shader object
- specified by <parameter>shader</parameter>. The source code
- strings for a shader object are the result of a previous call to
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry>.
- The string returned by the function will be null
- terminated.</para>
-
- <para><function>glGetShaderSource</function> returns in
- <parameter>source</parameter> as much of the source code string
- as it can, up to a maximum of <parameter>bufSize</parameter>
- characters. The number of characters actually returned,
- excluding the null termination character, is specified by
- <parameter>length</parameter>. If the length of the returned
- string is not required, a value of <constant>NULL</constant> can
- be passed in the <parameter>length</parameter> argument. The
- size of the buffer required to store the returned source code
- string can be obtained by calling
- <citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with the value
- <constant>GL_SHADER_SOURCE_LENGTH</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetShaderSource</function> is available only
- if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>shader</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not a shader object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>bufSize</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetShaderSource</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with argument
- <constant>GL_SHADER_SOURCE_LENGTH</constant></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetString">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetString</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetString</refname>
- <refpurpose>return a string describing the current GL connection</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>const GLubyte* <function>glGetString</function></funcdef>
- <paramdef>GLenum <parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>name</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant, one of
- <constant>GL_VENDOR</constant>, <constant>GL_RENDERER</constant>, <constant>GL_VERSION</constant>, <constant>GL_SHADING_LANGUAGE_VERSION</constant>, or <constant>GL_EXTENSIONS</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetString</function> returns a pointer to a static string
- describing some aspect of the current GL connection.
- <parameter>name</parameter> can be one of the following:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_VENDOR</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Returns the company responsible for this GL implementation.
- This name does not change from release to release.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RENDERER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Returns the name of the renderer.
- This name is typically specific to a particular configuration of a hardware
- platform.
- It does not change from release to release.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_VERSION</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Returns a version or release number.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_SHADING_LANGUAGE_VERSION</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Returns a version or release number for the shading language.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EXTENSIONS</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Returns a space-separated list of supported extensions to GL.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Because the GL does not include queries for the performance
- characteristics of an implementation, some applications are written to
- recognize known platforms and modify their GL usage based on known
- performance characteristics of these platforms.
- Strings <constant>GL_VENDOR</constant> and <constant>GL_RENDERER</constant> together uniquely specify
- a platform. They do not change from release to release and should be used
- by platform-recognition algorithms.
- </para>
- <para>
- Some applications want to make use of features that
- are not part of the standard GL. These features
- may be implemented as extensions to the standard GL.
- The <constant>GL_EXTENSIONS</constant> string is a space-separated
- list of supported GL extensions.
- (Extension names never contain a space character.)
- </para>
- <para>
- The <constant>GL_VERSION</constant> and <constant>GL_SHADING_LANGUAGE_VERSION</constant> strings begin with a version number.
- The version number uses one
- of these forms:
- </para>
- <para>
- <emphasis>major_number.minor_number</emphasis>
- <emphasis>major_number.minor_number.release_number</emphasis>
- </para>
- <para>
- Vendor-specific information may follow the version
- number. Its format depends on the implementation, but
- a space always separates the version number and
- the vendor-specific information.
- </para>
- <para>
- All strings are null-terminated.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated, <function>glGetString</function> returns 0.
- </para>
- <para>
- The client and server may support different versions or extensions.
- <function>glGetString</function> always returns a compatible version number or list of extensions.
- The release number always describes the server.
- </para>
- <para>
- <constant>GL_SHADING_LANGUAGE_VERSION</constant> is available only if the GL version is 2.0 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>name</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetString</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</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>
+++ /dev/null
-<?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="glGetTexImage">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetTexImage</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetTexImage</refname>
- <refpurpose>return a texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetTexImage</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>GLvoid * <parameter>img</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies which texture is to be obtained.
- <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, and
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number of the desired image.
- Level 0 is the base image level.
- Level
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>th
- mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies a pixel format for the returned data.
- The supported formats are
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies a pixel type for the returned data.
- The supported types are
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>img</parameter></term>
- <listitem>
- <para>
- Returns the texture image.
- Should be a pointer to an array of the type specified by <parameter>type</parameter>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetTexImage</function> returns a texture image into <parameter>img</parameter>.
- <parameter>target</parameter> specifies whether the desired texture image is one specified by
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> (<constant>GL_TEXTURE_1D</constant>),
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> (<constant>GL_TEXTURE_2D</constant> or any of
- <constant>GL_TEXTURE_CUBE_MAP_*</constant>),
- or
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> (<constant>GL_TEXTURE_3D</constant>).
- <parameter>level</parameter> specifies the level-of-detail number of the desired image.
- <parameter>format</parameter> and <parameter>type</parameter> specify the format and type of the desired image array.
- See the reference pages <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>
- for a description of the acceptable values for the <parameter>format</parameter> and <parameter>type</parameter>
- parameters, respectively.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- requested, <parameter>img</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- <para>
- To understand the operation of <function>glGetTexImage</function>, consider the selected internal
- four-component texture image to be an RGBA color buffer the size of the image.
- The semantics of <function>glGetTexImage</function> are then identical to those of <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
- with the exception that no pixel transfer operations are performed,
- when called with the same <parameter>format</parameter> and <parameter>type</parameter>,
- with <emphasis>x</emphasis> and <emphasis>y</emphasis> set to 0,
- <emphasis>width</emphasis> set to the width of the texture image
- (including border if one was specified),
- and <emphasis>height</emphasis> set to 1 for 1D images,
- or to the height of the texture image
- (including border if one was specified)
- for 2D images.
- Because the internal texture image is an RGBA image,
- pixel formats <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_STENCIL_INDEX</constant>,
- and <constant>GL_DEPTH_COMPONENT</constant> are not accepted,
- and pixel type <constant>GL_BITMAP</constant> is not accepted.
- </para>
- <para>
- If the selected texture image does not contain four components,
- the following mappings are applied.
- Single-component textures are treated as RGBA buffers with red set
- to the single-component value,
- green set to 0, blue set to 0, and alpha set to 1.
- Two-component textures are treated as RGBA buffers with red set to
- the value of component zero,
- alpha set to the value of component one,
- and green and blue set to 0.
- Finally,
- three-component textures are treated as RGBA buffers with red set to
- component zero,
- green set to component one,
- blue set to component two,
- and alpha set to 1.
- </para>
- <para>
- To determine the required size of <parameter>img</parameter>,
- use <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> to determine the dimensions of the
- internal texture image,
- then scale the required number of pixels by the storage required for
- each pixel,
- based on <parameter>format</parameter> and <parameter>type</parameter>.
- Be sure to take the pixel storage parameters into account,
- especially <constant>GL_PACK_ALIGNMENT</constant>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>img</parameter>.
- </para>
- <para>
- The types <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>,
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>,
- and the formats
- <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> are available only if the GL version is
- 1.2 or greater.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glGetTexImage</function> returns
- the texture image for the active texture unit.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter>, <parameter>format</parameter>, or <parameter>type</parameter> is not
- an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2 (max):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">max</mml:mi></mml:math></inlineequation>
- is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is returned if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant> and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is returned if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>, and <parameter>format</parameter> is neither <constant>GL_RGBA</constant>
- or <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer
- object such that the memory writes required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>img</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetTexImage</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_WIDTH</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_HEIGHT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BORDER</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments <constant>GL_PACK_ALIGNMENT</constant> and others
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glGetTexLevelParameter">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetTexLevelParameter</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetTexLevelParameter</refname>
- <refpurpose>return texture parameter values for a specific level of detail</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetTexLevelParameterfv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetTexLevelParameteriv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of the target texture,
- either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>,
- <constant>GL_PROXY_TEXTURE_1D</constant>, <constant>GL_PROXY_TEXTURE_2D</constant>,
- <constant>GL_PROXY_TEXTURE_3D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number of the desired image.
- Level 0 is the base image level.
- Level
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>th
- mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of a texture parameter.
- <constant>GL_TEXTURE_WIDTH</constant>,
- <constant>GL_TEXTURE_HEIGHT</constant>,
- <constant>GL_TEXTURE_DEPTH</constant>,
- <constant>GL_TEXTURE_INTERNAL_FORMAT</constant>,
- <constant>GL_TEXTURE_BORDER</constant>,
- <constant>GL_TEXTURE_RED_SIZE</constant>,
- <constant>GL_TEXTURE_GREEN_SIZE</constant>,
- <constant>GL_TEXTURE_BLUE_SIZE</constant>,
- <constant>GL_TEXTURE_ALPHA_SIZE</constant>,
- <constant>GL_TEXTURE_LUMINANCE_SIZE</constant>,
- <constant>GL_TEXTURE_INTENSITY_SIZE</constant>,
- <constant>GL_TEXTURE_DEPTH_SIZE</constant>,
- <constant>GL_TEXTURE_COMPRESSED</constant>, and
- <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Returns the requested data.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetTexLevelParameter</function> returns in <parameter>params</parameter> texture parameter values for a specific
- level-of-detail value,
- specified as <parameter>level</parameter>.
- <parameter>target</parameter> defines the target texture,
- either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>,
- <constant>GL_PROXY_TEXTURE_1D</constant>,
- <constant>GL_PROXY_TEXTURE_2D</constant>,
- <constant>GL_PROXY_TEXTURE_3D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>.
- </para>
- <para>
- <constant>GL_MAX_TEXTURE_SIZE</constant>, and <constant>GL_MAX_3D_TEXTURE_SIZE</constant> are not really
- descriptive enough.
- It has to report the largest square texture image that can be
- accommodated with mipmaps and borders,
- but a long skinny texture, or a texture without mipmaps and borders, may
- easily fit in texture memory.
- The proxy targets allow the user to more accurately query
- whether the GL can accommodate a texture of a given configuration.
- If the texture cannot be accommodated, the texture state variables, which
- may be queried with <function>glGetTexLevelParameter</function>, are set to 0. If the texture can be accommodated,
- the texture state values will be set as they would be set for a
- non-proxy target.
- </para>
- <para>
- <parameter>pname</parameter> specifies the texture parameter whose value or values
- will be returned.
- </para>
- <para>
- The accepted parameter names are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_WIDTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value,
- the width of the texture image.
- This value includes the border of the texture image. The initial value is
- 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_HEIGHT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value,
- the height of the texture image.
- This value includes the border of the texture image. The initial value is
- 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_DEPTH</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value,
- the depth of the texture image.
- This value includes the border of the texture image. The initial value is
- 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_INTERNAL_FORMAT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value,
- the internal format of the texture image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BORDER</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single value,
- the width in pixels of the border of the texture image. The initial value
- is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_RED_SIZE</constant>,</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_GREEN_SIZE</constant>,</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BLUE_SIZE</constant>,</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_ALPHA_SIZE</constant>,</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_LUMINANCE_SIZE</constant>,</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_INTENSITY_SIZE</constant>,</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_DEPTH_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- The internal storage resolution of an individual component.
- The resolution chosen by the GL will be a close match for the resolution
- requested by the user with the component argument of <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPRESSED</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single boolean value indicating if the texture image is
- stored in a compressed internal format. The initiali value is <constant>GL_FALSE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> returns a single integer value, the number of unsigned bytes of the
- compressed texture image that would be returned from
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>params</parameter>.
- </para>
- <para>
- <constant>GL_TEXTURE_INTERNAL_FORMAT</constant> is available only if the GL version is
- 1.1 or greater. In version 1.0, use <constant>GL_TEXTURE_COMPONENTS</constant>
- instead.
- </para>
- <para>
- <constant>GL_PROXY_TEXTURE_1D</constant> and <constant>GL_PROXY_TEXTURE_2D</constant> are
- available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_3D</constant>, <constant>GL_PROXY_TEXTURE_3D</constant>, and <constant>GL_TEXTURE_DEPTH</constant>
- are available only if the GL version is 1.2 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_COMPRESSED</constant>,
- <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, and
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant> are available only if the GL version is 1.3
- or greater.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glGetTexLevelParameter</function> returns
- the texture level parameters for the active texture unit.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>
- <emphasis>max</emphasis>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetTexLevelParameter</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if
- <constant>GL_TEXTURE_COMPRESSED_IMAGE_SIZE</constant> is queried on texture images with an
- uncompressed internal format or on proxy targets.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glGetTexParameter">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glGetTexParameter</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetTexParameter</refname>
- <refpurpose>return texture parameter values</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetTexParameterfv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetTexParameteriv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of the target texture.
- <constant>GL_TEXTURE_1D</constant>,
- <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_3D</constant>, and
- <constant>GL_TEXTURE_CUBE_MAP</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of a texture parameter.
- <constant>GL_TEXTURE_MAG_FILTER</constant>,
- <constant>GL_TEXTURE_MIN_FILTER</constant>,
- <constant>GL_TEXTURE_MIN_LOD</constant>,
- <constant>GL_TEXTURE_MAX_LOD</constant>,
- <constant>GL_TEXTURE_BASE_LEVEL</constant>,
- <constant>GL_TEXTURE_MAX_LEVEL</constant>,
- <constant>GL_TEXTURE_WRAP_S</constant>,
- <constant>GL_TEXTURE_WRAP_T</constant>,
- <constant>GL_TEXTURE_WRAP_R</constant>,
- <constant>GL_TEXTURE_BORDER_COLOR</constant>,
- <constant>GL_TEXTURE_PRIORITY</constant>,
- <constant>GL_TEXTURE_RESIDENT</constant>,
- <constant>GL_TEXTURE_COMPARE_MODE</constant>,
- <constant>GL_TEXTURE_COMPARE_FUNC</constant>,
- <constant>GL_DEPTH_TEXTURE_MODE</constant>, and
- <constant>GL_GENERATE_MIPMAP</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Returns the texture parameters.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glGetTexParameter</function> returns in <parameter>params</parameter> the value or values of the texture parameter
- specified as <parameter>pname</parameter>.
- <parameter>target</parameter> defines the target texture,
- either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>, or <constant>GL_TEXTURE_CUBE_MAP</constant>,
- to specify one-, two-, or three-dimensional or cube-mapped texturing.
- <parameter>pname</parameter> accepts the same symbols as <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
- with the same interpretations:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_MAG_FILTER</constant></term>
- <listitem>
- <para>
- Returns the single-valued texture magnification filter,
- a symbolic constant. The initial value is <constant>GL_LINEAR</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_MIN_FILTER</constant></term>
- <listitem>
- <para>
- Returns the single-valued texture minification filter,
- a symbolic constant. The initial value is <constant>GL_NEAREST_MIPMAP_LINEAR</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_MIN_LOD</constant></term>
- <listitem>
- <para>
- Returns the single-valued texture minimum level-of-detail value. The
- initial value is
- <inlineequation><mml:math>
- <!-- eqn: -1000:-->
- <mml:mn>-1000</mml:mn>
- </mml:math></inlineequation>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_MAX_LOD</constant></term>
- <listitem>
- <para>
- Returns the single-valued texture maximum level-of-detail value. The
- initial value is 1000.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BASE_LEVEL</constant></term>
- <listitem>
- <para>
- Returns the single-valued base texture mipmap level. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_MAX_LEVEL</constant></term>
- <listitem>
- <para>
- Returns the single-valued maximum texture mipmap array level. The initial
- value is 1000.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_WRAP_S</constant></term>
- <listitem>
- <para>
- Returns the single-valued wrapping function for texture coordinate
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>,
- a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_WRAP_T</constant></term>
- <listitem>
- <para>
- Returns the single-valued wrapping function for texture coordinate
- <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>,
- a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_WRAP_R</constant></term>
- <listitem>
- <para>
- Returns the single-valued wrapping function for texture coordinate
- <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>,
- a symbolic constant. The initial value is <constant>GL_REPEAT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BORDER_COLOR</constant></term>
- <listitem>
- <para>
- Returns four integer or floating-point numbers that comprise the RGBA color
- of the texture border.
- Floating-point values are returned in the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- Integer values are returned as a linear mapping of the internal floating-point
- representation such that 1.0 maps to the most positive representable
- integer and
- <inlineequation><mml:math>
- <!-- eqn: -1.0:-->
- <mml:mn>-1.0</mml:mn>
- </mml:math></inlineequation>
- maps to the most negative representable
- integer. The initial value is (0, 0, 0, 0).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_PRIORITY</constant></term>
- <listitem>
- <para>
- Returns the residence priority of the target texture (or the named
- texture bound to it). The initial value is 1.
- See <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_RESIDENT</constant></term>
- <listitem>
- <para>
- Returns the residence status of the target texture.
- If the value returned in <parameter>params</parameter> is <constant>GL_TRUE</constant>, the texture is
- resident in texture memory.
- See <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term>
- <listitem>
- <para>
- Returns a single-valued texture comparison mode, a symbolic constant. The
- initial value is <constant>GL_NONE</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term>
- <listitem>
- <para>
- Returns a single-valued texture comparison function, a symbolic constant. The
- initial value is <constant>GL_LEQUAL</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_TEXTURE_MODE</constant></term>
- <listitem>
- <para>
- Returns a single-valued texture format indicating how the depth values
- should be converted into color components. The initial value is
- <constant>GL_LUMINANCE</constant>. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GENERATE_MIPMAP</constant></term>
- <listitem>
- <para>
- Returns a single boolean value indicating if automatic mipmap level updates
- are enabled.
- See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <constant>GL_TEXTURE_PRIORITY</constant> and <constant>GL_TEXTURE_RESIDENT</constant> are
- available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_3D</constant>,
- <constant>GL_TEXTURE_MIN_LOD</constant>, <constant>GL_TEXTURE_MAX_LOD</constant>, <constant>GL_TEXTURE_BASE_LEVEL</constant>,
- <constant>GL_TEXTURE_MAX_LEVEL</constant>, and <constant>GL_TEXTURE_WRAP_R</constant> are available only
- if the GL version is 1.2 or greater.
- </para>
- <para>
- <constant>GL_TEXTURE_COMPARE_MODE</constant>, <constant>GL_TEXTURE_COMPARE_FUNC</constant>, and
- <constant>GL_GENERATE_MIPMAP</constant> is available only if the GL version is 1.4 or
- greater.
- </para>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>params</parameter>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetTexParameter</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAreTexturesResident</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glGetUniform">
- <refmeta>
- <refentrytitle>glGetUniform</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refdescriptor>glGetUniform</refdescriptor>
- <refname>glGetUniformfv</refname>
- <refname>glGetUniformiv</refname>
- <refpurpose>Returns the value of a uniform variable</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetUniformfv</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLfloat *<parameter>params</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glGetUniformiv</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLint *<parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>location</parameter></term>
- <listitem>
- <para>Specifies the location of the uniform variable
- to be queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>Returns the value of the specified uniform
- variable.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetUniform</function> returns in
- <parameter>params</parameter> the value(s) of the specified
- uniform variable. The type of the uniform variable specified by
- <parameter>location</parameter> determines the number of values
- returned. If the uniform variable is defined in the shader as a
- boolean, int, or float, a single value will be returned. If it
- is defined as a vec2, ivec2, or bvec2, two values will be
- returned. If it is defined as a vec3, ivec3, or bvec3, three
- values will be returned, and so on. To query values stored in
- uniform variables declared as arrays, call
- <function>glGetUniform</function> for each element of the array.
- To query values stored in uniform variables declared as
- structures, call <function>glGetUniform</function> for each
- field in the structure. The values for uniform variables
- declared as a matrix will be returned in column major
- order.</para>
-
- <para>The locations assigned to uniform variables are not known
- until the program object is linked. After linking has occurred,
- the command
- <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- can be used to obtain the location of a uniform variable. This
- location value can then be passed to
- <function>glGetUniform</function> in order to query the current
- value of the uniform variable. After a program object has been
- linked successfully, the index values for uniform variables
- remain fixed until the next link command occurs. The uniform
- variable values can only be queried after a link if the link was
- successful.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetUniform</function> is available only if the
- GL version is 2.0 or greater.</para>
-
- <para>If an error is generated, no change is made to the
- contents of <parameter>params</parameter>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> has not been successfully
- linked.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>location</parameter> does not correspond to a valid
- uniform variable location for the specified program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetUniform</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the index of an active
- uniform variable</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_ACTIVE_UNIFORMS</constant> or
- <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant></para>
-
- <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the name of a
- uniform variable</para>
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetUniformLocation">
- <refmeta>
- <refentrytitle>glGetUniformLocation</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetUniformLocation</refname>
- <refpurpose>Returns the location of a uniform variable</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLint <function>glGetUniformLocation</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- <paramdef>const GLchar *<parameter>name</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the program object to be
- queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>name</parameter></term>
- <listitem>
- <para>Points to a null terminated string containing
- the name of the uniform variable whose location is
- to be queried.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetUniformLocation </function> returns an
- integer that represents the location of a specific uniform
- variable within a program object. <parameter>name</parameter>
- must be a null terminated string that contains no white space.
- <parameter>name</parameter> must be an active uniform variable
- name in <parameter>program</parameter> that is not a structure,
- an array of structures, or a subcomponent of a vector or a
- matrix. This function returns -1 if <parameter>name</parameter>
- does not correspond to an active uniform variable in
- <parameter>program</parameter> or if <parameter>name</parameter>
- starts with the reserved prefix "gl_".</para>
-
- <para>Uniform variables that are structures or arrays of
- structures may be queried by calling
- <function>glGetUniformLocation</function> for each field within
- the structure. The array element operator "[]" and the
- structure field operator "." may be used in
- <parameter>name</parameter> in order to select elements within
- an array or fields within a structure. The result of using these
- operators is not allowed to be another structure, an array of
- structures, or a subcomponent of a vector or a matrix. Except if
- the last part of <parameter>name</parameter> indicates a uniform
- variable array, the location of the first element of an array
- can be retrieved by using the name of the array, or by using the
- name appended by "[0]".</para>
-
- <para>The actual locations assigned to uniform variables are not
- known until the program object is linked successfully. After
- linking has occurred, the command
- <function>glGetUniformLocation</function> can be used to obtain
- the location of a uniform variable. This location value can then
- be passed to
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>
- to set the value of the uniform variable or to
- <citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- in order to query the current value of the uniform variable.
- After a program object has been linked successfully, the index
- values for uniform variables remain fixed until the next link
- command occurs. Uniform variable locations and values can only
- be queried after a link if the link was successful.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetUniformLocation</function> is available
- only if the GL version is 2.0 or greater.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> has not been successfully
- linked.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glGetUniformLocation</function> is executed between
- the execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the index of
- an active uniform variable</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_ACTIVE_UNIFORMS</constant> or
- <constant>GL_ACTIVE_UNIFORM_MAX_LENGTH</constant></para>
-
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the name of a
- uniform variable</para>
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetVertexAttrib">
- <refmeta>
- <refentrytitle>glGetVertexAttrib</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refdescriptor>glGetVertexAttrib</refdescriptor>
- <refname>glGetVertexAttribdv</refname>
- <refname>glGetVertexAttribfv</refname>
- <refname>glGetVertexAttribiv</refname>
- <refpurpose>Return a generic vertex attribute parameter</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetVertexAttribdv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLdouble *<parameter>params</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glGetVertexAttribfv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat *<parameter>params</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glGetVertexAttribiv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint *<parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the generic vertex attribute
- parameter to be queried.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>Specifies the symbolic name of the vertex
- attribute parameter to be queried. Accepted values are
- <constant>GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</constant>,
- <constant>GL_VERTEX_ATTRIB_ARRAY_ENABLED</constant>,
- <constant>GL_VERTEX_ATTRIB_ARRAY_SIZE</constant>,
- <constant>GL_VERTEX_ATTRIB_ARRAY_STRIDE</constant>,
- <constant>GL_VERTEX_ATTRIB_ARRAY_TYPE</constant>,
- <constant>GL_VERTEX_ATTRIB_ARRAY_NORMALIZED</constant>, or
- <constant>GL_CURRENT_VERTEX_ATTRIB</constant>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>Returns the requested data.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetVertexAttrib</function> returns in
- <parameter>params</parameter> the value of a generic vertex
- attribute parameter. The generic vertex attribute to be queried
- is specified by <parameter>index</parameter>, and the parameter
- to be queried is specified by <parameter>pname</parameter>.</para>
-
- <para>The accepted parameter names are as follows:</para>
-
- <variablelist>
- <varlistentry>
- <term><constant>GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns a
- single value, the name of the buffer object currently bound to
- the binding point corresponding to generic vertex attribute array
- <parameter>index</parameter>. If no buffer object is bound,
- 0 is returned. The initial value is 0.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_VERTEX_ATTRIB_ARRAY_ENABLED</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns a
- single value that is non-zero (true) if the vertex
- attribute array for <parameter>index</parameter> is
- enabled and 0 (false) if it is disabled. The initial
- value is <constant>GL_FALSE</constant>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_VERTEX_ATTRIB_ARRAY_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns a
- single value, the size of the vertex attribute array
- for <parameter>index</parameter>. The size is the
- number of values for each element of the vertex
- attribute array, and it will be 1, 2, 3, or 4. The
- initial value is 4.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_VERTEX_ATTRIB_ARRAY_STRIDE</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns a
- single value, the array stride for (number of bytes
- between successive elements in) the vertex attribute
- array for <parameter>index</parameter>. A value of 0
- indicates that the array elements are stored
- sequentially in memory. The initial value is 0.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_VERTEX_ATTRIB_ARRAY_TYPE</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns a
- single value, a symbolic constant indicating the
- array type for the vertex attribute array for
- <parameter>index</parameter>. Possible values are
- <constant>GL_BYTE</constant>,
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_FLOAT</constant>, and
- <constant>GL_DOUBLE</constant>. The initial value is
- <constant>GL_FLOAT</constant>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_VERTEX_ATTRIB_ARRAY_NORMALIZED</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns a
- single value that is non-zero (true) if fixed-point
- data types for the vertex attribute array indicated
- by <parameter>index</parameter> are normalized when
- they are converted to floating point, and 0 (false)
- otherwise. The initial value is
- <constant>GL_FALSE</constant>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><constant>GL_CURRENT_VERTEX_ATTRIB</constant></term>
- <listitem>
- <para>
- </para>
- <para> <parameter>params</parameter> returns four
- values that represent the current value for the
- generic vertex attribute specified by index. Generic
- vertex attribute 0 is unique in that it has no
- current state, so an error will be generated if
- <parameter>index</parameter> is 0. The initial value
- for all other generic vertex attributes is
- (0,0,0,1).</para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <para>All of the parameters except <constant>GL_CURRENT_VERTEX_ATTRIB</constant>
- represent client-side state.</para>
-
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetVertexAttrib</function> is available only
- if the GL version is 2.0 or greater.</para>
-
- <para>If an error is generated, no change is made to the
- contents of <parameter>params</parameter>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
-
- <para><constant>GL_INVALID_ENUM</constant> is generated if
- <parameter>pname</parameter> is not an accepted value.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>index</parameter> is 0 and
- <parameter>pname</parameter> is
- <constant>GL_CURRENT_VERTEX_ATTRIB</constant>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_ATTRIBS</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttribPointerv</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and
- <constant>GL_VERTEX_ATTRIB_ARRAY_POINTER</constant></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDisableVertexAttribArray</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnableVertexAttribArray</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glGetVertexAttribPointerv">
- <refmeta>
- <refentrytitle>glGetVertexAttribPointerv</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glGetVertexAttribPointerv</refname>
- <refpurpose>return the address of the specified generic vertex attribute pointer</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glGetVertexAttribPointerv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLvoid **<parameter>pointer</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the generic vertex attribute
- parameter to be returned.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>Specifies the symbolic name of the generic
- vertex attribute parameter to be returned. Must be
- <constant>GL_VERTEX_ATTRIB_ARRAY_POINTER</constant>.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pointer</parameter></term>
- <listitem>
- <para>Returns the pointer value.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glGetVertexAttribPointerv</function> returns
- pointer information. <parameter>index</parameter> is the generic
- vertex attribute to be queried, <parameter>pname</parameter> is
- a symbolic constant indicating the pointer to be returned, and
- <parameter>params</parameter> is a pointer to a location in
- which to place the returned data.</para>
-
- <para>If a non-zero named buffer object was bound to the <constant>GL_ARRAY_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) when the desired pointer was previously
- specified, the <parameter>pointer</parameter> returned is a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glGetVertexAttribPointerv</function>
- is available only if the GL version is 2.0 or greater.</para>
-
- <para>The pointer returned is client-side state.</para>
-
- <para>The initial value for each pointer is 0.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant>
- is generated if <parameter>index</parameter>
- is greater than or equal to <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
-
- <para><constant>GL_INVALID_ENUM</constant>
- is generated if <parameter>pname</parameter>
- is not an accepted value.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_ATTRIBS</constant></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glHint">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glHint</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glHint</refname>
- <refpurpose>specify implementation-specific hints</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glHint</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant indicating the behavior to be controlled.
- <constant>GL_FOG_HINT</constant>,
- <constant>GL_GENERATE_MIPMAP_HINT</constant>,
- <constant>GL_LINE_SMOOTH_HINT</constant>,
- <constant>GL_PERSPECTIVE_CORRECTION_HINT</constant>,
- <constant>GL_POINT_SMOOTH_HINT</constant>,
- <constant>GL_POLYGON_SMOOTH_HINT</constant>,
- <constant>GL_TEXTURE_COMPRESSION_HINT</constant>, and
- <constant>GL_FRAGMENT_SHADER_DERIVATIVE_HINT</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant indicating the desired behavior.
- <constant>GL_FASTEST</constant>,
- <constant>GL_NICEST</constant>, and
- <constant>GL_DONT_CARE</constant> are accepted.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Certain aspects of GL behavior,
- when there is room for interpretation,
- can be controlled with hints.
- A hint is specified with two arguments.
- <parameter>target</parameter> is a symbolic
- constant indicating the behavior to be controlled,
- and <parameter>mode</parameter> is another symbolic constant indicating the desired
- behavior. The initial value for each <parameter>target</parameter> is <constant>GL_DONT_CARE</constant>.
- <parameter>mode</parameter> can be one of the following:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_FASTEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- The most efficient option should be chosen.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NICEST</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- The most correct,
- or highest quality,
- option should be chosen.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DONT_CARE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- No preference.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Though the implementation aspects that can be hinted are well defined,
- the interpretation of the hints depends on the implementation.
- The hint aspects that can be specified with <parameter>target</parameter>,
- along with suggested semantics,
- are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_FOG_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the accuracy of fog calculation.
- If per-pixel fog calculation is not efficiently supported
- by the GL implementation,
- hinting <constant>GL_DONT_CARE</constant> or <constant>GL_FASTEST</constant> can result in per-vertex
- calculation of fog effects.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FRAGMENT_SHADER_DERIVATIVE_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the accuracy of the derivative calculation for the GL shading language fragment processing built-in functions:
- <constant>dFdx</constant>, <constant>dFdy</constant>, and <constant>fwidth</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GENERATE_MIPMAP_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the quality of filtering when generating mipmap images.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE_SMOOTH_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the sampling quality of antialiased lines.
- If a larger filter function is applied, hinting <constant>GL_NICEST</constant> can
- result in more pixel fragments being generated during rasterization.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PERSPECTIVE_CORRECTION_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the quality of color, texture coordinate, and fog coordinate
- interpolation. If perspective-corrected parameter interpolation is not
- efficiently supported by the GL implementation, hinting <constant>GL_DONT_CARE</constant>
- or <constant>GL_FASTEST</constant> can result in simple linear interpolation of colors
- and/or texture coordinates.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SMOOTH_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the sampling quality of antialiased points.
- If a larger filter function is applied, hinting <constant>GL_NICEST</constant> can
- result in more pixel fragments being generated during rasterization.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POLYGON_SMOOTH_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the sampling quality of antialiased polygons.
- Hinting <constant>GL_NICEST</constant> can result in more pixel fragments being generated
- during rasterization,
- if a larger filter function is applied.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPRESSION_HINT</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- Indicates the quality and performance of the compressing texture images.
- Hinting <constant>GL_FASTEST</constant> indicates that texture images should be compressed
- as quickly as possible, while <constant>GL_NICEST</constant> indicates that texture images
- should be compressed with as little image quality loss as possible.
- <constant>GL_NICEST</constant> should be selected if the texture is to be retrieved by
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry> for reuse.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- The interpretation of hints depends on the implementation.
- Some implementations ignore <function>glHint</function> settings.
- </para>
- <para>
- <constant>GL_TEXTURE_COMPRESSION_HINT</constant> is available only if the GL version is 1.3
- or greater.
- </para>
- <para>
- <constant>GL_GENERATE_MIPMAP_HINT</constant> is available only if the GL version is 1.4
- or greater.
- </para>
- <para>
- <constant>GL_FRAGMENT_SHADER_DERIVATIVE_HINT</constant> is available only if the GL version is 2.0
- or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if either <parameter>target</parameter> or <parameter>mode</parameter> is not
- an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glHint</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</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>
+++ /dev/null
-<?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="glIsBuffer">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glIsBuffer</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glIsBuffer</refname>
- <refpurpose>determine if a name corresponds to a buffer object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glIsBuffer</function></funcdef>
- <paramdef>GLuint <parameter>buffer</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>buffer</parameter></term>
- <listitem>
- <para>
- Specifies a value that may be the name of a buffer object.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glIsBuffer</function> returns <constant>GL_TRUE</constant> if <parameter>buffer</parameter> is currently the name of a buffer object.
- If <parameter>buffer</parameter> is zero, or is a non-zero value that is not currently the
- name of a buffer object, or if an error occurs, <function>glIsBuffer</function> returns <constant>GL_FALSE</constant>.
- </para>
- <para>
- A name returned by <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>, but not yet associated with a buffer object
- by calling <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>, is not the name of a buffer object.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glIsBuffer</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glIsBuffer</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glIsEnabled">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glIsEnabled</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glIsEnabled</refname>
- <refpurpose>test whether a capability is enabled</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glIsEnabled</function></funcdef>
- <paramdef>GLenum <parameter>cap</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>cap</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant indicating a GL capability.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glIsEnabled</function> returns <constant>GL_TRUE</constant> if <parameter>cap</parameter> is an enabled capability
- and returns <constant>GL_FALSE</constant> otherwise.
- Initially all capabilities except <constant>GL_DITHER</constant> are disabled;
- <constant>GL_DITHER</constant> is initially enabled.
- </para>
- <para>
- The following capabilities are accepted for <parameter>cap</parameter>:
- </para>
- <para>
- </para>
- <informaltable frame="topbot">
- <tgroup cols="2" align="left">
- <colspec/>
- <colspec/>
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Constant
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- See
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_ALPHA_TEST</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_AUTO_NORMAL</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glEvalCoord</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_BLEND</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CLIP_PLANE</constant><emphasis>i</emphasis>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glClipPlane</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COLOR_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COLOR_LOGIC_OP</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COLOR_MATERIAL</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glColorMaterial</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COLOR_SUM</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSecondaryColor</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COLOR_TABLE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CONVOLUTION_1D</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CONVOLUTION_2D</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_CULL_FACE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glCullFace</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_DEPTH_TEST</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glDepthRange</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_DITHER</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_EDGE_FLAG_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FOG</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glFog</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FOG_COORD_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_HISTOGRAM</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glHistogram</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_INDEX_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_INDEX_LOGIC_OP</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_LIGHT</constant><emphasis>i</emphasis>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_LIGHTING</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMaterial</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glLightModel</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glLight</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_LINE_SMOOTH</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_LINE_STIPPLE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_COLOR_4</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_INDEX</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_NORMAL</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_TEXTURE_COORD_1</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_TEXTURE_COORD_2</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_TEXTURE_COORD_3</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP1_TEXTURE_COORD_4</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap1</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_COLOR_4</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_INDEX</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_NORMAL</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_TEXTURE_COORD_1</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_TEXTURE_COORD_2</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_TEXTURE_COORD_3</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_TEXTURE_COORD_4</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_VERTEX_3</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MAP2_VERTEX_4</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMap2</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MINMAX</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glMinmax</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_MULTISAMPLE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NORMAL_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NORMALIZE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POINT_SMOOTH</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POINT_SPRITE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POLYGON_SMOOTH</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glPolygonMode</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POLYGON_OFFSET_FILL</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POLYGON_OFFSET_LINE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POLYGON_OFFSET_POINT</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glPolygonOffset</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POLYGON_STIPPLE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_RESCALE_NORMAL</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glNormal</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SAMPLE_ALPHA_TO_ONE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SAMPLE_COVERAGE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SCISSOR_TEST</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SECONDARY_COLOR_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SEPARABLE_2D</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_STENCIL_TEST</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_1D</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_2D</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_3D</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_COORD_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexCoordPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_CUBE_MAP</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_GEN_Q</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_GEN_R</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_GEN_S</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_TEXTURE_GEN_T</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_VERTEX_ARRAY</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_VERTEX_PROGRAM_POINT_SIZE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_VERTEX_PROGRAM_TWO_SIDE</constant>
- </entry>
- <entry align="left">
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated,
- <function>glIsEnabled</function> returns 0.
- </para>
- <para>
- <constant>GL_COLOR_LOGIC_OP</constant>,
- <constant>GL_COLOR_ARRAY</constant>,
- <constant>GL_EDGE_FLAG_ARRAY</constant>,
- <constant>GL_INDEX_ARRAY</constant>,
- <constant>GL_INDEX_LOGIC_OP</constant>,
- <constant>GL_NORMAL_ARRAY</constant>,
- <constant>GL_POLYGON_OFFSET_FILL</constant>,
- <constant>GL_POLYGON_OFFSET_LINE</constant>,
- <constant>GL_POLYGON_OFFSET_POINT</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY</constant>, and
- <constant>GL_VERTEX_ARRAY</constant>
- are available only
- if the GL version is 1.1 or greater.
- </para>
- <para>
- <constant>GL_RESCALE_NORMAL</constant>, and <constant>GL_TEXTURE_3D</constant> are available only if the GL
- version is 1.2 or greater.
- </para>
- <para>
- <constant>GL_MULTISAMPLE</constant>,
- <constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant>,
- <constant>GL_SAMPLE_ALPHA_TO_ONE</constant>,
- <constant>GL_SAMPLE_COVERAGE</constant>,
- <constant>GL_TEXTURE_CUBE_MAP</constant>
- are available only if the GL version is 1.3 or greater.
- </para>
- <para>
- <constant>GL_FOG_COORD_ARRAY</constant> and <constant>GL_SECONDARY_COLOR_ARRAY</constant>
- are available only if the GL version is 1.4 or greater.
- </para>
- <para>
- <constant>GL_POINT_SPRITE</constant>,
- <constant>GL_VERTEX_PROGRAM_POINT_SIZE</constant>, and
- <constant>GL_VERTEX_PROGRAM_TWO_SIDE</constant>
- are available only if the GL version is 2.0 or greater.
- </para>
- <para>
- <constant>GL_COLOR_TABLE</constant>, <constant>GL_CONVOLUTION_1D</constant>, <constant>GL_CONVOLUTION_2D</constant>,
- <constant>GL_HISTOGRAM</constant>, <constant>GL_MINMAX</constant>,
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>,
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, and
- <constant>GL_SEPARABLE_2D</constant> are available only if <code>ARB_imaging</code> is
- returned when <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> is called with <constant>GL_EXTENSIONS</constant>.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, the following
- parameters return the associated value for the active texture unit:
- <constant>GL_TEXTURE_1D</constant>,
- <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_3D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP</constant>,
- <constant>GL_TEXTURE_GEN_S</constant>,
- <constant>GL_TEXTURE_GEN_T</constant>,
- <constant>GL_TEXTURE_GEN_R</constant>,
- <constant>GL_TEXTURE_GEN_Q</constant>,
- <constant>GL_TEXTURE_MATRIX</constant>, and
- <constant>GL_TEXTURE_STACK_DEPTH</constant>.
- Likewise, the following parameters return the associated value for the
- active client texture unit:
- <constant>GL_TEXTURE_COORD_ARRAY</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_SIZE</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_STRIDE</constant>,
- <constant>GL_TEXTURE_COORD_ARRAY_TYPE</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>cap</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glIsEnabled</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnableClientState</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</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>
+++ /dev/null
-<?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="glIsProgram">
- <refmeta>
- <refentrytitle>glIsProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glIsProgram</refname>
- <refpurpose>Determines if a name corresponds to a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glIsProgram</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies a potential program object.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glIsProgram</function> returns
- <constant>GL_TRUE</constant> if <parameter>program</parameter>
- is the name of a program object previously created with
- <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>
- and not yet deleted with <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>.
- If <parameter>program</parameter> is zero or a non-zero value that
- is not the name of a program object, or if an error occurs,
- <function>glIsProgram</function> returns <constant>GL_FALSE</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glIsProgram</function> is available only if the
- GL version is 2.0 or greater.</para>
-
- <para>No error is generated if <parameter>program</parameter> is
- not a valid program object name.</para>
-
- <para>A program object marked for deletion with <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>
- but still in use as part of current rendering state is still considered
- a program object and <function>glIsProgram</function> will return <constant>GL_TRUE</constant>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glIsProgram</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
-
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the index of
- an active attribute variable</para>
-
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the index of
- an active uniform variable</para>
-
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the name of an
- attribute variable</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the parameter
- to be queried</para>
-
- <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the location
- of a uniform variable</para>
-
- <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and the name of a
- uniform variable</para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glIsQuery">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glIsQuery</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glIsQuery</refname>
- <refpurpose>determine if a name corresponds to a query object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glIsQuery</function></funcdef>
- <paramdef>GLuint <parameter>id</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>id</parameter></term>
- <listitem>
- <para>
- Specifies a value that may be the name of a query object.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glIsQuery</function> returns <constant>GL_TRUE</constant> if <parameter>id</parameter> is currently the name of a query object.
- If <parameter>id</parameter> is zero, or is a non-zero value that is not currently the
- name of a query object, or if an error occurs, <function>glIsQuery</function> returns <constant>GL_FALSE</constant>.
- </para>
- <para>
- A name returned by <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>, but not yet associated with a query object
- by calling <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>, is not the name of a query object.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glIsQuery</function> is available only if the GL version is 1.5 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glIsQuery</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBeginQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteQueries</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEndQuery</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenQueries</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glIsShader">
- <refmeta>
- <refentrytitle>glIsShader</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glIsShader</refname>
- <refpurpose>Determines if a name corresponds to a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glIsShader</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies a potential shader object.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glIsShader</function> returns
- <constant>GL_TRUE</constant> if <parameter>shader</parameter> is
- the name of a shader object previously created with
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>
- and not yet deleted with <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>.
- If <parameter>shader</parameter> is
- zero or a non-zero value that is not the name of a shader
- object, or if an error occurs, <function>glIsShader </function> returns
- <constant>GL_FALSE</constant>.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glIsShader</function> is available only if the
- GL version is 2.0 or greater.</para>
-
- <para>No error is generated if <parameter>shader</parameter> is
- not a valid shader object name.</para>
-
- <para>A shader object marked for deletion with <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>
- but still attached to a program object is still considered
- a shader object and <function>glIsShader</function> will return <constant>GL_TRUE</constant>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glIsShader</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with a valid program object</para>
-
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and a parameter to
- be queried</para>
-
- <para><citerefentry><refentrytitle>glGetShaderInfoLog</refentrytitle></citerefentry>
- with argument <parameter>object</parameter></para>
-
- <para><citerefentry><refentrytitle>glGetShaderSource</refentrytitle></citerefentry>
- with argument <parameter>object</parameter></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glShaderSource</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glIsTexture">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glIsTexture</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glIsTexture</refname>
- <refpurpose>determine if a name corresponds to a texture</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glIsTexture</function></funcdef>
- <paramdef>GLuint <parameter>texture</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>texture</parameter></term>
- <listitem>
- <para>
- Specifies a value that may be the name of a texture.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glIsTexture</function> returns <constant>GL_TRUE</constant> if <parameter>texture</parameter> is currently the name of a texture.
- If <parameter>texture</parameter> is zero, or is a non-zero value that is not currently the
- name of a texture, or if an error occurs, <function>glIsTexture</function> returns <constant>GL_FALSE</constant>.
- </para>
- <para>
- A name returned by <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>, but not yet associated with a texture
- by calling <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>, is not the name of a texture.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glIsTexture</function> is available only if the GL version is 1.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glIsTexture</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glLineWidth">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glLineWidth</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glLineWidth</refname>
- <refpurpose>specify the width of rasterized lines</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glLineWidth</function></funcdef>
- <paramdef>GLfloat <parameter>width</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of rasterized lines.
- The initial value is 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glLineWidth</function> specifies the rasterized width of both aliased and antialiased
- lines.
- Using a line width other than 1 has different effects,
- depending on whether line antialiasing is enabled.
- To enable and disable line antialiasing, call
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
- with argument <constant>GL_LINE_SMOOTH</constant>. Line antialiasing is initially
- disabled.
- </para>
- <para>
- If line antialiasing is disabled,
- the actual width is determined by rounding the supplied width
- to the nearest integer.
- (If the rounding results in the value 0,
- it is as if the line width were 1.)
- If
- <inlineequation><mml:math>
- <!-- eqn: | DELTA x | >= | DELTA y |:-->
- <mml:mrow>
- <mml:mfenced open="∣" close="∣">
- <mml:mrow>
- <mml:mo>Δ</mml:mo>
- <mml:mi mathvariant="italic">x</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>>=</mml:mo>
- <mml:mfenced open="∣" close="∣">
- <mml:mrow>
- <mml:mo>Δ</mml:mo>
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- <emphasis>i</emphasis> pixels are filled in each column that is rasterized,
- where <emphasis>i</emphasis> is the rounded value of <parameter>width</parameter>.
- Otherwise,
- <emphasis>i</emphasis> pixels are filled in each row that is rasterized.
- </para>
- <para>
- If antialiasing is enabled,
- line rasterization produces a fragment for each pixel square
- that intersects the region lying within the rectangle having width
- equal to the current line width,
- length equal to the actual length of the line,
- and centered on the mathematical line segment.
- The coverage value for each fragment is the window coordinate area
- of the intersection of the rectangular region with the corresponding
- pixel square.
- This value is saved and used in the final rasterization step.
- </para>
- <para>
- Not all widths can be supported when line antialiasing is enabled. If an
- unsupported width is requested, the nearest supported width is used.
- Only width 1 is guaranteed to be supported; others depend on the
- implementation. Likewise, there is a range for aliased line widths as well.
- To query the range of supported widths and the size
- difference between supported widths within the range, call <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with arguments <constant>GL_ALIASED_LINE_WIDTH_RANGE</constant>,
- <constant>GL_SMOOTH_LINE_WIDTH_RANGE</constant>, and <constant>GL_SMOOTH_LINE_WIDTH_GRANULARITY</constant>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- The line width specified by <function>glLineWidth</function> is always returned when <constant>GL_LINE_WIDTH</constant>
- is queried.
- Clamping and rounding for aliased and antialiased lines have no effect on the specified value.
- </para>
- <para>
- Nonantialiased line width may be clamped to an implementation-dependent maximum. Call <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with <constant>GL_ALIASED_LINE_WIDTH_RANGE</constant> to determine the maximum width.
- </para>
- <para>
- In OpenGL 1.2, the tokens <constant>GL_LINE_WIDTH_RANGE</constant> and <constant>GL_LINE_WIDTH_GRANULARITY</constant> were replaced by <constant>GL_ALIASED_LINE_WIDTH_RANGE</constant>,
- <constant>GL_SMOOTH_LINE_WIDTH_RANGE</constant>, and <constant>GL_SMOOTH_LINE_WIDTH_GRANULARITY</constant>. The old names are retained for backward compatibility, but should not be used in new code.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than or equal to 0.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glLineWidth</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_LINE_WIDTH</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ALIASED_LINE_WIDTH_RANGE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SMOOTH_LINE_WIDTH_RANGE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SMOOTH_LINE_WIDTH_GRANULARITY</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_LINE_SMOOTH</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glEnable</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>
+++ /dev/null
-<?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="glLinkProgram">
- <refmeta>
- <refentrytitle>glLinkProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glLinkProgram</refname>
- <refpurpose>Links a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glLinkProgram</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the handle of the program object to be linked.</para>
-
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glLinkProgram</function> links the program
- object specified by <parameter>program</parameter>. If any
- shader objects of type <constant>GL_VERTEX_SHADER</constant> are
- attached to <parameter>program</parameter>, they will be used to
- create an executable that will run on the programmable vertex
- processor. If any shader objects of type
- <constant>GL_FRAGMENT_SHADER</constant> are attached to
- <parameter>program</parameter>, they will be used to create an
- executable that will run on the programmable fragment
- processor.</para>
-
- <para>The status of the link operation will be stored as part of
- the program object's state. This value will be set to
- <constant>GL_TRUE</constant> if the program object was linked
- without errors and is ready for use, and
- <constant>GL_FALSE</constant> otherwise. It can be queried by
- calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_LINK_STATUS</constant>.</para>
-
- <para>As a result of a successful link operation, all active
- user-defined uniform variables belonging to
- <parameter>program</parameter> will be initialized to 0, and
- each of the program object's active uniform variables will be
- assigned a location that can be queried by calling
- <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>.
- Also, any active user-defined attribute variables that have not
- been bound to a generic vertex attribute index will be bound to
- one at this time.</para>
-
- <para>Linking of a program object can fail for a number of
- reasons as specified in the <emphasis>OpenGL Shading Language
- Specification</emphasis>. The following lists some of the
- conditions that will cause a link error.</para>
-
- <itemizedlist>
- <listitem>
- <para>The number of active attribute variables supported
- by the implementation has been exceeded.</para>
- </listitem>
- <listitem>
- <para>The storage limit for uniform variables has been
- exceeded.</para>
- </listitem>
- <listitem>
- <para>The number of active uniform variables supported
- by the implementation has been exceeded.</para>
- </listitem>
- <listitem>
- <para>The <function>main</function> function is missing
- for the vertex shader or the fragment shader.</para>
- </listitem>
- <listitem>
- <para>A varying variable actually used in the fragment
- shader is not declared in the same way (or is not
- declared at all) in the vertex shader.</para>
- </listitem>
- <listitem>
- <para>A reference to a function or variable name is
- unresolved.</para>
- </listitem>
- <listitem>
- <para>A shared global is declared with two different
- types or two different initial values.</para>
- </listitem>
- <listitem>
- <para>One or more of the attached shader objects has not
- been successfully compiled.</para>
- </listitem>
- <listitem>
- <para>Binding a generic attribute matrix caused some
- rows of the matrix to fall outside the allowed maximum
- of <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
- </listitem>
- <listitem>
- <para>Not enough contiguous vertex attribute slots could
- be found to bind attribute matrices.</para>
- </listitem>
- </itemizedlist>
-
- <para>When a program object has been successfully linked, the
- program object can be made part of current state by calling
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>.
- Whether or not the link operation was successful, the program
- object's information log will be overwritten. The information
- log can be retrieved by calling
- <citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>.</para>
-
- <para><function>glLinkProgram</function> will also install the
- generated executables as part of the current rendering state if
- the link operation was successful and the specified program
- object is already currently in use as a result of a previous
- call to
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>.
- If the program object currently in use is relinked
- unsuccessfully, its link status will be set to
- <constant>GL_FALSE</constant> , but the executables and
- associated state will remain part of the current state until a
- subsequent call to <function>glUseProgram</function> removes it
- from use. After it is removed from use, it cannot be made part
- of current state until it has been successfully relinked.</para>
-
- <para>If <parameter>program</parameter> contains shader objects
- of type <constant>GL_VERTEX_SHADER</constant> but does not
- contain shader objects of type
- <constant>GL_FRAGMENT_SHADER</constant>, the vertex shader will
- be linked against the implicit interface for fixed functionality
- fragment processing. Similarly, if
- <parameter>program</parameter> contains shader objects of type
- <constant>GL_FRAGMENT_SHADER</constant> but it does not contain
- shader objects of type <constant>GL_VERTEX_SHADER</constant>,
- the fragment shader will be linked against the implicit
- interface for fixed functionality vertex processing.</para>
-
- <para>The program object's information log is updated and the
- program is generated at the time of the link operation. After
- the link operation, applications are free to modify attached
- shader objects, compile attached shader objects, detach shader
- objects, delete shader objects, and attach additional shader
- objects. None of these operations affects the information log or
- the program that is part of the program object.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glLinkProgram</function>
- is available only if the GL version is 2.0 or greater.</para>
- <para>If the link operation is unsuccessful, any information about a previous link operation on <parameter>program</parameter>
- is lost (i.e., a failed link does not restore the old state of <parameter>program</parameter>
- ). Certain information can still be retrieved from <parameter>program</parameter>
- even after an unsuccessful link operation. See for instance <citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant>
- is generated if <parameter>program</parameter>
- is not a value generated by OpenGL.</para>
- <para><constant>GL_INVALID_OPERATION</constant>
- is generated if <parameter>program</parameter>
- is not a program object.</para>
- <para><constant>GL_INVALID_OPERATION</constant>
- is generated if <function>glLinkProgram</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with argument <parameter>program</parameter>
- and the index of an active attribute variable</para>
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with argument <parameter>program</parameter>
- and the index of an active uniform variable<parameter></parameter></para>
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
- <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
- with argument <parameter>program</parameter>
- and an attribute variable name</para>
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter>
- and <constant>GL_LINK_STATUS</constant></para>
- <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- with argument <parameter>program</parameter>
- and a uniform variable location</para>
- <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- with argument <parameter>program</parameter>
- and a uniform variable name</para>
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glLogicOp">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glLogicOp</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glLogicOp</refname>
- <refpurpose>specify a logical pixel operation for color index rendering</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glLogicOp</function></funcdef>
- <paramdef>GLenum <parameter>opcode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>opcode</parameter></term>
- <listitem>
- <para>
- Specifies a symbolic constant that selects a logical operation.
- The following symbols are accepted:
- <constant>GL_CLEAR</constant>,
- <constant>GL_SET</constant>,
- <constant>GL_COPY</constant>,
- <constant>GL_COPY_INVERTED</constant>,
- <constant>GL_NOOP</constant>,
- <constant>GL_INVERT</constant>,
- <constant>GL_AND</constant>,
- <constant>GL_NAND</constant>,
- <constant>GL_OR</constant>,
- <constant>GL_NOR</constant>,
- <constant>GL_XOR</constant>,
- <constant>GL_EQUIV</constant>,
- <constant>GL_AND_REVERSE</constant>,
- <constant>GL_AND_INVERTED</constant>,
- <constant>GL_OR_REVERSE</constant>, and
- <constant>GL_OR_INVERTED</constant>. The initial value is <constant>GL_COPY</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glLogicOp</function> specifies a logical operation that,
- when enabled,
- is applied between the incoming color index or RGBA color
- and the color index or RGBA color at the corresponding location in the
- frame buffer.
- To enable or disable the logical operation, call
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
- using the symbolic constant <constant>GL_COLOR_LOGIC_OP</constant> for RGBA mode or
- <constant>GL_INDEX_LOGIC_OP</constant> for color index mode. The initial value is
- disabled for both operations.
- </para>
- <para>
- </para>
- <informaltable frame="topbot">
- <tgroup cols="2" align="left">
- <colspec/>
- <colspec/>
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Opcode
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Resulting Operation
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_CLEAR</constant>
- </entry>
- <entry align="center">
- 0
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SET</constant>
- </entry>
- <entry align="center">
- 1
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COPY</constant>
- </entry>
- <entry align="center">
- s
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_COPY_INVERTED</constant>
- </entry>
- <entry align="center">
- ~s
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NOOP</constant>
- </entry>
- <entry align="center">
- d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_INVERT</constant>
- </entry>
- <entry align="center">
- ~d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_AND</constant>
- </entry>
- <entry align="center">
- s & d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NAND</constant>
- </entry>
- <entry align="center">
- ~(s & d)
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_OR</constant>
- </entry>
- <entry align="center">
- s | d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NOR</constant>
- </entry>
- <entry align="center">
- ~(s | d)
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_XOR</constant>
- </entry>
- <entry align="center">
- s ^ d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_EQUIV</constant>
- </entry>
- <entry align="center">
- ~(s ^ d)
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_AND_REVERSE</constant>
- </entry>
- <entry align="center">
- s & ~d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_AND_INVERTED</constant>
- </entry>
- <entry align="center">
- ~s & d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_OR_REVERSE</constant>
- </entry>
- <entry align="center">
- s | ~d
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_OR_INVERTED</constant>
- </entry>
- <entry align="center">
- ~s | d
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- <parameter>opcode</parameter> is a symbolic constant chosen from the list above.
- In the explanation of the logical operations,
- <emphasis>s</emphasis> represents the incoming color index and
- <emphasis>d</emphasis> represents the index in the frame buffer.
- Standard C-language operators are used.
- As these bitwise operators suggest,
- the logical operation is applied independently to each bit pair of the
- source and destination indices or colors.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Color index logical operations are always supported. RGBA logical
- operations are supported only if the GL version is 1.1 or greater.
- </para>
- <para>
- When more than one RGBA color or index buffer is enabled for drawing,
- logical operations are performed separately for each enabled buffer,
- using for the destination value the contents of that buffer
- (see <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>).
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>opcode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glLogicOp</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_LOGIC_OP_MODE</constant>.
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_COLOR_LOGIC_OP</constant> or <constant>GL_INDEX_LOGIC_OP</constant>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</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>
+++ /dev/null
-<?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="glMapBuffer">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>2005</year>
- <holder>Sams Publishing</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glMapBuffer</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glMapBuffer</refname>
- <refpurpose>map a buffer object's data store</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void * <function>glMapBuffer</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>access</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target buffer object being mapped.
- The symbolic constant must be
- <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>access</parameter></term>
- <listitem>
- <para>
- Specifies the access policy, indicating whether it will be possible to read from, write to,
- or both read from and write to the buffer object's mapped data store. The symbolic constant must be
- <constant>GL_READ_ONLY</constant>, <constant>GL_WRITE_ONLY</constant>, or <constant>GL_READ_WRITE</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>GLboolean <function>glUnmapBuffer</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target buffer object being unmapped.
- The symbolic constant must be
- <constant>GL_ARRAY_BUFFER</constant>,
- <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or
- <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glMapBuffer</function> maps to the client's address space the entire data store of the buffer object
- currently bound to <parameter>target</parameter>. The data can then be directly read and/or written relative to
- the returned pointer, depending on the specified <parameter>access</parameter> policy. If the GL is unable to
- map the buffer object's data store, <function>glMapBuffer</function> generates an error and returns
- <constant>NULL</constant>. This may occur for system-specific reasons, such as low virtual memory availability.
- </para>
- <para>
- If a mapped data store is accessed in a way inconsistent with the specified <parameter>access</parameter> policy,
- no error is generated, but performance may be negatively impacted and system errors, including program
- termination, may result. Unlike the <parameter>usage</parameter> parameter of <function>glBufferData</function>,
- <parameter>access</parameter> is not a hint, and does in fact constrain the usage of the mapped data store on
- some GL implementations. In order to achieve the highest performance available, a buffer object's data store
- should be used in ways consistent with both its specified <parameter>usage</parameter> and
- <parameter>access</parameter> parameters.
- </para>
- <para>
- A mapped data store must be unmapped with <function>glUnmapBuffer</function> before its buffer object is used.
- Otherwise an error will be generated by any GL command that attempts to dereference the buffer object's data store.
- When a data store is unmapped, the pointer to its data store becomes invalid. <function>glUnmapBuffer</function>
- returns <constant>GL_TRUE</constant> unless the data store contents have become corrupt during the time
- the data store was mapped. This can occur for system-specific reasons that affect the availability of graphics
- memory, such as screen mode changes. In such situations, <constant>GL_FALSE</constant> is returned and the
- data store contents are undefined. An application must detect this rare condition and reinitialize the data store.
- </para>
- <para>
- A buffer object's mapped data store is automatically unmapped when the buffer object is deleted or its data store
- is recreated with <function>glBufferData</function>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- If an error is generated, <function>glMapBuffer</function> returns <constant>NULL</constant>, and
- <function>glUnmapBuffer</function> returns <constant>GL_FALSE</constant>.
- </para>
- <para>
- <function>glMapBuffer</function> and <function>glUnmapBuffer</function> are available only if the GL version is 1.5 or greater.
- </para>
- <para>
- <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are
- available only if the GL version is 2.1 or greater.
- </para>
- <para>
- Parameter values passed to GL commands may not be sourced from the returned pointer. No error will be generated,
- but results will be undefined and will likely vary across GL implementations.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
- <constant>GL_ARRAY_BUFFER</constant>, <constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
- <constant>GL_PIXEL_PACK_BUFFER</constant>, or <constant>GL_PIXEL_UNPACK_BUFFER</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>access</parameter> is not
- <constant>GL_READ_ONLY</constant>, <constant>GL_WRITE_ONLY</constant>, or <constant>GL_READ_WRITE</constant>.
- </para>
- <para>
- <constant>GL_OUT_OF_MEMORY</constant> is generated when <function>glMapBuffer</function> is executed
- if the GL is unable to map the buffer object's data store. This may occur for a variety of system-specific
- reasons, such as the absence of sufficient remaining virtual memory.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMapBuffer</function> is executed for
- a buffer object whose data store is already mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glUnmapBuffer</function> is executed for
- a buffer object whose data store is not currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMapBuffer</function> or <function>glUnmapBuffer</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetBufferPointerv</refentrytitle></citerefentry> with argument <constant>GL_BUFFER_MAP_POINTER</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetBufferParameteriv</refentrytitle></citerefentry> with argument <constant>GL_BUFFER_MAPPED</constant>, <constant>GL_BUFFER_ACCESS</constant>, or <constant>GL_BUFFER_USAGE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBufferSubData</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glMultiDrawArrays">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glMultiDrawArrays</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glMultiDrawArrays</refname>
- <refpurpose>render multiple sets of primitives from array data</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glMultiDrawArrays</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- <paramdef>GLint * <parameter>first</parameter></paramdef>
- <paramdef>GLsizei * <parameter>count</parameter></paramdef>
- <paramdef>GLsizei <parameter>primcount</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies what kind of primitives to render.
- Symbolic constants
- <constant>GL_POINTS</constant>,
- <constant>GL_LINE_STRIP</constant>,
- <constant>GL_LINE_LOOP</constant>,
- <constant>GL_LINES</constant>,
- <constant>GL_TRIANGLE_STRIP</constant>,
- <constant>GL_TRIANGLE_FAN</constant>,
- <constant>GL_TRIANGLES</constant>,
- <constant>GL_QUAD_STRIP</constant>,
- <constant>GL_QUADS</constant>,
- and <constant>GL_POLYGON</constant> are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>first</parameter></term>
- <listitem>
- <para>
- Points to an array of starting indices in the enabled arrays.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>
- Points to an array of the number of indices to be rendered.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>primcount</parameter></term>
- <listitem>
- <para>
- Specifies the size of the first and count
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glMultiDrawArrays</function> specifies multiple sets of geometric primitives
- with very few subroutine calls. Instead of calling a GL procedure
- to pass each individual vertex, normal, texture coordinate, edge
- flag, or color, you can prespecify
- separate arrays of vertices, normals, and colors and use them to
- construct a sequence of primitives with a single
- call to <function>glMultiDrawArrays</function>.
- </para>
- <para>
- <function>glMultiDrawArrays</function> behaves identically to <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry> except that <parameter>primcount</parameter>
- separate ranges of elements are specified instead.
- </para>
- <para>
- When <function>glMultiDrawArrays</function> is called, it uses <parameter>count</parameter> sequential elements from each
- enabled array to construct a sequence of geometric primitives,
- beginning with element <parameter>first</parameter>. <parameter>mode</parameter> specifies what kind of
- primitives are constructed, and how the array elements
- construct those primitives. If <constant>GL_VERTEX_ARRAY</constant> is not enabled, no
- geometric primitives are generated.
- </para>
- <para>
- Vertex attributes that are modified by <function>glMultiDrawArrays</function> have an
- unspecified value after <function>glMultiDrawArrays</function> returns. For example, if
- <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
- undefined after <function>glMultiDrawArrays</function> executes. Attributes that aren't
- modified remain well defined.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glMultiDrawArrays</function> is available only if the GL version is 1.4 or greater.
- </para>
- <para>
- <function>glMultiDrawArrays</function> is included in display lists. If <function>glMultiDrawArrays</function> is entered into a
- display list,
- the necessary array data (determined by the array pointers and
- enables) is also
- entered into the display list. Because the array pointers and
- enables are client-side state, their values affect display lists
- when the lists are created, not when the lists are executed.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
- enabled array and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMultiDrawArrays</function> is executed between
- the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexCoordPointer</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>
+++ /dev/null
-<?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="glMultiDrawElements">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glMultiDrawElements</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glMultiDrawElements</refname>
- <refpurpose>render multiple sets of primitives by specifying indices of array data elements</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glMultiDrawElements</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- <paramdef>const GLsizei * <parameter>count</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid ** <parameter>indices</parameter></paramdef>
- <paramdef>GLsizei <parameter>primcount</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies what kind of primitives to render.
- Symbolic constants
- <constant>GL_POINTS</constant>,
- <constant>GL_LINE_STRIP</constant>,
- <constant>GL_LINE_LOOP</constant>,
- <constant>GL_LINES</constant>,
- <constant>GL_TRIANGLE_STRIP</constant>,
- <constant>GL_TRIANGLE_FAN</constant>,
- <constant>GL_TRIANGLES</constant>,
- <constant>GL_QUAD_STRIP</constant>,
- <constant>GL_QUADS</constant>,
- and <constant>GL_POLYGON</constant> are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>
- Points to an array of the elements counts.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the type of the values in <parameter>indices</parameter>. Must be one of
- <constant>GL_UNSIGNED_BYTE</constant>, <constant>GL_UNSIGNED_SHORT</constant>, or
- <constant>GL_UNSIGNED_INT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>indices</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the location where the indices are stored.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>primcount</parameter></term>
- <listitem>
- <para>
- Specifies the size of the <parameter>count</parameter> array.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glMultiDrawElements</function> specifies multiple sets of geometric primitives with very few subroutine
- calls. Instead of calling a GL function to pass each individual vertex,
- normal, texture coordinate, edge flag, or color, you can prespecify
- separate arrays of vertices, normals, and so on, and use them to construct a
- sequence of primitives with a single call to <function>glMultiDrawElements</function>.
- </para>
- <para>
- <function>glMultiDrawElements</function> is identical in operation to <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry> except that
- <parameter>primcount</parameter> separate lists of elements are specified.
- </para>
- <para>
- Vertex attributes that are modified by <function>glMultiDrawElements</function> have an
- unspecified value after <function>glMultiDrawElements</function> returns. For example, if
- <constant>GL_COLOR_ARRAY</constant> is enabled, the value of the current color is
- undefined after <function>glMultiDrawElements</function> executes. Attributes that aren't
- modified maintain their previous values.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glMultiDrawElements</function> is available only if the GL version is 1.4 or greater.
- </para>
- <para>
- <function>glMultiDrawElements</function> is included in display lists. If <function>glMultiDrawElements</function> is entered into a
- display list,
- the necessary array data (determined by the array pointers and
- enables) is also
- entered into the display list. Because the array pointers and
- enables are client-side state, their values affect display lists
- when the lists are created, not when the lists are executed.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>primcount</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to an
- enabled array or the element array and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glMultiDrawElements</function> is executed between
- the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFogCoordPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetPointerv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glInterleavedArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glNormalPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSecondaryColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexCoordPointer</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>
+++ /dev/null
-<?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="glPixelStore">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glPixelStore</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glPixelStore</refname>
- <refpurpose>set pixel storage modes</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPixelStoref</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat <parameter>param</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPixelStorei</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint <parameter>param</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of the parameter to be set.
- Six values affect the packing of pixel data into memory:
- <constant>GL_PACK_SWAP_BYTES</constant>,
- <constant>GL_PACK_LSB_FIRST</constant>,
- <constant>GL_PACK_ROW_LENGTH</constant>,
- <constant>GL_PACK_IMAGE_HEIGHT</constant>,
- <constant>GL_PACK_SKIP_PIXELS</constant>,
- <constant>GL_PACK_SKIP_ROWS</constant>,
- <constant>GL_PACK_SKIP_IMAGES</constant>, and
- <constant>GL_PACK_ALIGNMENT</constant>.
- Six more affect the unpacking of pixel data <emphasis>from</emphasis> memory:
- <constant>GL_UNPACK_SWAP_BYTES</constant>,
- <constant>GL_UNPACK_LSB_FIRST</constant>,
- <constant>GL_UNPACK_ROW_LENGTH</constant>,
- <constant>GL_UNPACK_IMAGE_HEIGHT</constant>,
- <constant>GL_UNPACK_SKIP_PIXELS</constant>,
- <constant>GL_UNPACK_SKIP_ROWS</constant>,
- <constant>GL_UNPACK_SKIP_IMAGES</constant>, and
- <constant>GL_UNPACK_ALIGNMENT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>param</parameter></term>
- <listitem>
- <para>
- Specifies the value that <parameter>pname</parameter> is set to.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glPixelStore</function> sets pixel storage modes that affect the operation of subsequent
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry> as well as the unpacking of
- polygon stipple patterns (see <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>), bitmaps (see
- <citerefentry><refentrytitle>glBitmap</refentrytitle></citerefentry>), texture patterns (see <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>).
- Additionally, if the <code>ARB_imaging</code> extension is supported, pixel
- storage modes affect convolution filters
- (see <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>, color table (see <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glColorSubTable</refentrytitle></citerefentry>, and unpacking histogram (See <citerefentry><refentrytitle>glHistogram</refentrytitle></citerefentry>),
- and minmax (See <citerefentry><refentrytitle>glMinmax</refentrytitle></citerefentry>) data.
- </para>
- <para>
- <parameter>pname</parameter> is a symbolic constant indicating the parameter to be set, and
- <parameter>param</parameter> is the new value. Six of the twelve storage parameters affect
- how pixel data is returned to client memory.
- They are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_PACK_SWAP_BYTES</constant></term>
- <listitem>
- <para>
- If true,
- byte ordering for multibyte color components,
- depth components,
- color indices,
- or stencil indices
- is reversed.
- That is,
- if a four-byte component consists of bytes
- <inlineequation><mml:math>
- <!-- eqn: b sub 0:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>0</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 1:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>1</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 3:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>3</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- it is stored in memory as
- <inlineequation><mml:math>
- <!-- eqn: b sub 3:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>3</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 1:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>1</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 0:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>0</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>
- if <constant>GL_PACK_SWAP_BYTES</constant> is true.
- <constant>GL_PACK_SWAP_BYTES</constant> has no effect on the memory order of components
- within a pixel,
- only on the order of bytes within components or indices.
- For example,
- the three components of a <constant>GL_RGB</constant> format pixel are always stored with
- red first,
- green second,
- and blue third,
- regardless of the value of <constant>GL_PACK_SWAP_BYTES</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_LSB_FIRST</constant></term>
- <listitem>
- <para>
- If true,
- bits are ordered within a byte from least significant to most significant;
- otherwise,
- the first bit in each byte is the most significant one.
- This parameter is significant for bitmap data only.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_ROW_LENGTH</constant></term>
- <listitem>
- <para>
- If greater than 0,
- <constant>GL_PACK_ROW_LENGTH</constant> defines the number of pixels in a row.
- If the first pixel of a row is placed at location
- <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
- in memory,
- then the location of the first pixel of the next row is obtained by skipping
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: k = left { lpile { n l above {a over s} left ceiling { s n l } over a right ceiling} lpile {s >= a above s < a }:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mfenced open="" close="">
- <mml:mfrac>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="⌈" close="⌉">
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢</mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of components or indices in a pixel,
- <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
- is the number of pixels in a row
- (<constant>GL_PACK_ROW_LENGTH</constant> if it is greater than 0,
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
- argument to the pixel routine otherwise),
- <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
- is the value of <constant>GL_PACK_ALIGNMENT</constant>, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- is the size, in bytes, of a single component
- (if
- <inlineequation><mml:math>
- <!-- eqn: a < s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- then it is as if
- <inlineequation><mml:math>
- <!-- eqn: a = s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>).
- In the case of 1-bit values,
- the location of the next row is obtained by skipping
- </para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: k = 8 a left ceiling { n l } over { 8 a } right ceiling:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mn>8</mml:mn>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="⌈" close="⌉">
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mn>8</mml:mn>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- <para>
- components or indices.
- </para>
- <para>
- The word <emphasis>component</emphasis> in this description refers to the nonindex values
- red,
- green,
- blue,
- alpha,
- and depth.
- Storage format <constant>GL_RGB</constant>,
- for example,
- has three components per pixel:
- first red,
- then green,
- and finally blue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_IMAGE_HEIGHT</constant></term>
- <listitem>
- <para>
- If greater than 0,
- <constant>GL_PACK_IMAGE_HEIGHT</constant> defines the number of pixels in an image
- three-dimensional texture volume, where ``image'' is defined by all pixels
- sharing the same third dimension index.
- If the first pixel of a row is placed at location
- <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
- in memory,
- then the location of the first pixel of the next row is obtained by skipping
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: k = left { lpile { n l h above {a over s} left ceiling { s n l h } over a right ceiling} lpile {s >= a above s < a }:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">h</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mfenced open="" close="">
- <mml:mfrac>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="⌈" close="⌉">
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">h</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢</mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- components or indices, where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of components or indices
- in a pixel,
- <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
- is the number of pixels in a row
- (<constant>GL_PACK_ROW_LENGTH</constant> if it is greater than 0, the
- <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
- argument to <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> otherwise),
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- is the number of
- rows in a pixel image (<constant>GL_PACK_IMAGE_HEIGHT</constant> if it is greater than
- 0, the
- <inlineequation><mml:math><mml:mi mathvariant="italic">height</mml:mi></mml:math></inlineequation>
- argument to the <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> routine otherwise),
- <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
- is the value of
- <constant>GL_PACK_ALIGNMENT</constant>, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- is the size, in bytes, of a single
- component (if
- <inlineequation><mml:math>
- <!-- eqn: a < s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- then it is as if
- <inlineequation><mml:math>
- <!-- eqn: a = s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>).
- </para>
- <para>
- The word <emphasis>component</emphasis> in this description refers to the nonindex values
- red,
- green,
- blue,
- alpha,
- and depth.
- Storage format <constant>GL_RGB</constant>,
- for example,
- has three components per pixel:
- first red,
- then green,
- and finally blue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_SKIP_PIXELS</constant>, <constant>GL_PACK_SKIP_ROWS</constant>, and <constant>GL_PACK_SKIP_IMAGES</constant></term>
- <listitem>
- <para>
- These values are provided as a convenience to the programmer;
- they provide no functionality that cannot be duplicated simply by
- incrementing the pointer passed to <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>.
- Setting <constant>GL_PACK_SKIP_PIXELS</constant> to
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
- is equivalent to incrementing
- the pointer by
- <inlineequation><mml:math>
- <!-- eqn: i n:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of components or indices in each pixel.
- Setting <constant>GL_PACK_SKIP_ROWS</constant> to
- <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>
- is equivalent to incrementing
- the pointer by
- <inlineequation><mml:math>
- <!-- eqn: j m:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">j</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>
- is the number of components or indices per row,
- as just computed in the <constant>GL_PACK_ROW_LENGTH</constant> section.
- Setting <constant>GL_PACK_SKIP_IMAGES</constant> to
- <inlineequation><mml:math><mml:mi mathvariant="italic">k</mml:mi></mml:math></inlineequation>
- is equivalent to incrementing
- the pointer by
- <inlineequation><mml:math>
- <!-- eqn: k p:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">p</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
- is the number of components or indices
- per image, as computed in the <constant>GL_PACK_IMAGE_HEIGHT</constant> section.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_PACK_ALIGNMENT</constant></term>
- <listitem>
- <para>
- Specifies the alignment requirements for the start of each pixel row in memory.
- The allowable values are
- 1 (byte-alignment),
- 2 (rows aligned to even-numbered bytes),
- 4 (word-alignment), and
- 8 (rows start on double-word boundaries).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The other six of the twelve storage parameters affect how pixel data is
- read from client memory.
- These values are significant for <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBitmap</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>.
- </para>
- <para>
- Additionally, if the <code>ARB_imaging</code> extension is supported,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorSubTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>.
- They are as follows:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_UNPACK_SWAP_BYTES</constant></term>
- <listitem>
- <para>
- If true,
- byte ordering for multibyte color components,
- depth components,
- color indices,
- or stencil indices
- is reversed.
- That is,
- if a four-byte component consists of bytes
- <inlineequation><mml:math>
- <!-- eqn: b sub 0:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>0</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 1:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>1</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 3:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>3</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- it is taken from memory as
- <inlineequation><mml:math>
- <!-- eqn: b sub 3:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>3</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 1:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>1</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: b sub 0:-->
- <mml:msub><mml:mi mathvariant="italic">b</mml:mi>
- <mml:mn>0</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>
- if <constant>GL_UNPACK_SWAP_BYTES</constant> is true.
- <constant>GL_UNPACK_SWAP_BYTES</constant> has no effect on the memory order of components
- within a pixel,
- only on the order of bytes within components or indices.
- For example,
- the three components of a <constant>GL_RGB</constant> format pixel are always stored with
- red first,
- green second,
- and blue third,
- regardless of the value of <constant>GL_UNPACK_SWAP_BYTES</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_LSB_FIRST</constant></term>
- <listitem>
- <para>
- If true,
- bits are ordered within a byte from least significant to most significant;
- otherwise,
- the first bit in each byte is the most significant one.
- This is relevant only for bitmap data.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_ROW_LENGTH</constant></term>
- <listitem>
- <para>
- If greater than 0,
- <constant>GL_UNPACK_ROW_LENGTH</constant> defines the number of pixels in a row.
- If the first pixel of a row is placed at location
- <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
- in memory,
- then the location of the first pixel of the next row is obtained by skipping
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: k = left { lpile { n l above {a over s} left ceiling { s n l } over a right ceiling } lpile { s >= a above s < a }:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mfenced open="" close="">
- <mml:mfrac>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="⌈" close="⌉">
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢</mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of components or indices in a pixel,
- <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
- is the number of pixels in a row
- (<constant>GL_UNPACK_ROW_LENGTH</constant> if it is greater than 0,
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
- argument to the pixel routine otherwise),
- <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
- is the value of <constant>GL_UNPACK_ALIGNMENT</constant>, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- is the size, in bytes, of a single component
- (if
- <inlineequation><mml:math>
- <!-- eqn: a < s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- then it is as if
- <inlineequation><mml:math>
- <!-- eqn: a = s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>).
- In the case of 1-bit values,
- the location of the next row is obtained by skipping
- </para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: k = 8 a left ceiling { n l } over { 8 a } right ceiling:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mn>8</mml:mn>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="⌈" close="⌉">
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mn>8</mml:mn>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- </para>
- <para>
- components or indices.
- </para>
- <para>
- The word <emphasis>component</emphasis> in this description refers to the nonindex values
- red,
- green,
- blue,
- alpha,
- and depth.
- Storage format <constant>GL_RGB</constant>,
- for example,
- has three components per pixel:
- first red,
- then green,
- and finally blue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_IMAGE_HEIGHT</constant></term>
- <listitem>
- <para>
- If greater than 0,
- <constant>GL_UNPACK_IMAGE_HEIGHT</constant> defines the number of pixels in an image of
- a three-dimensional texture volume. Where ``image'' is defined by all
- pixel sharing the same third dimension index.
- If the first pixel of a row is placed at location
- <inlineequation><mml:math><mml:mi mathvariant="italic">p</mml:mi></mml:math></inlineequation>
- in memory,
- then the location of the first pixel of the next row is obtained by skipping
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: k = left { lpile { n l h above {a over s} left ceiling { s n l h } over a right ceiling } lpile { s >= a above s < a }:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">h</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mfenced open="" close="">
- <mml:mfrac>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="⌈" close="⌉">
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">h</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢</mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">s</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">a</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of components or indices in a pixel,
- <inlineequation><mml:math><mml:mi mathvariant="italic">l</mml:mi></mml:math></inlineequation>
- is the number of pixels in a row
- (<constant>GL_UNPACK_ROW_LENGTH</constant> if it is greater than 0,
- the
- <inlineequation><mml:math><mml:mi mathvariant="italic">width</mml:mi></mml:math></inlineequation>
- argument to <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> otherwise),
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- is the number of rows in an image (<constant>GL_UNPACK_IMAGE_HEIGHT</constant> if
- it is greater than 0, the
- <inlineequation><mml:math><mml:mi mathvariant="italic">height</mml:mi></mml:math></inlineequation>
- argument to <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> otherwise),
- <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>
- is the value of <constant>GL_UNPACK_ALIGNMENT</constant>, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- is the size, in bytes, of a single component
- (if
- <inlineequation><mml:math>
- <!-- eqn: a < s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>,
- then it is as if
- <inlineequation><mml:math>
- <!-- eqn: a = s:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>).
- </para>
- <para>
- The word <emphasis>component</emphasis> in this description refers to the nonindex values
- red,
- green,
- blue,
- alpha,
- and depth.
- Storage format <constant>GL_RGB</constant>,
- for example,
- has three components per pixel:
- first red,
- then green,
- and finally blue.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_SKIP_PIXELS</constant> and <constant>GL_UNPACK_SKIP_ROWS</constant></term>
- <listitem>
- <para>
- These values are provided as a convenience to the programmer;
- they provide no functionality that cannot be duplicated by
- incrementing the pointer passed to
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBitmap</refentrytitle></citerefentry>, or
- <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>.
- Setting <constant>GL_UNPACK_SKIP_PIXELS</constant> to
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>
- is equivalent to incrementing
- the pointer by
- <inlineequation><mml:math>
- <!-- eqn: i n:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of components or indices in each pixel.
- Setting <constant>GL_UNPACK_SKIP_ROWS</constant> to
- <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>
- is equivalent to incrementing
- the pointer by
- <inlineequation><mml:math>
- <!-- eqn: j k:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">j</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">k</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- components or indices,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">k</mml:mi></mml:math></inlineequation>
- is the number of components or indices per row,
- as just computed in the <constant>GL_UNPACK_ROW_LENGTH</constant> section.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_UNPACK_ALIGNMENT</constant></term>
- <listitem>
- <para>
- Specifies the alignment requirements for the start of each pixel row in memory.
- The allowable values are
- 1 (byte-alignment),
- 2 (rows aligned to even-numbered bytes),
- 4 (word-alignment), and
- 8 (rows start on double-word boundaries).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The following table gives the type,
- initial value,
- and range of valid values for each storage parameter
- that can be set with <function>glPixelStore</function>.
- </para>
- <para>
- </para>
- <informaltable frame="topbot">
- <tgroup cols="4" align="left">
- <colspec colwidth="2.5*" />
- <colspec colwidth="1*" align="center"/>
- <colspec colwidth="1*" align="center"/>
- <colspec colwidth="2*" align="center"/>
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- <parameter>pname</parameter>
- </emphasis></entry>
- <entry rowsep="1" align="center"><emphasis role="bold">
- Type
- </emphasis></entry>
- <entry rowsep="1" align="center"><emphasis role="bold">
- Initial Value
- </emphasis></entry>
- <entry rowsep="1" align="center"><emphasis role="bold">
- Valid Range
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_PACK_SWAP_BYTES</constant>
- </entry>
- <entry align="center">
- boolean
- </entry>
- <entry align="center">
- false
- </entry>
- <entry align="center">
- true or false
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_LSB_FIRST</constant>
- </entry>
- <entry align="center">
- boolean
- </entry>
- <entry align="center">
- false
- </entry>
- <entry align="center">
- true or false
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_ROW_LENGTH</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_IMAGE_HEIGHT</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0, \(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_SKIP_ROWS</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_SKIP_PIXELS</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_SKIP_IMAGES</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_PACK_ALIGNMENT</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 4
- </entry>
- <entry align="center">
- 1, 2, 4, or 8
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_SWAP_BYTES</constant>
- </entry>
- <entry align="center">
- boolean
- </entry>
- <entry align="center">
- false
- </entry>
- <entry align="center">
- true or false
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_LSB_FIRST</constant>
- </entry>
- <entry align="center">
- boolean
- </entry>
- <entry align="center">
- false
- </entry>
- <entry align="center">
- true or false
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_ROW_LENGTH</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_IMAGE_HEIGHT</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_SKIP_ROWS</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_SKIP_PIXELS</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_SKIP_IMAGES</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 0
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: left [ 0,\(if right ):-->
- <mml:mfenced open="[" close=")">
- <mml:mn>0</mml:mn>
- <mml:infinity/>
- </mml:mfenced>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNPACK_ALIGNMENT</constant>
- </entry>
- <entry align="center">
- integer
- </entry>
- <entry align="center">
- 4
- </entry>
- <entry align="center">
- 1, 2, 4, or 8
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- <function>glPixelStoref</function> can be used to set any pixel store parameter.
- If the parameter type is boolean,
- then if <parameter>param</parameter> is 0,
- the parameter is false;
- otherwise it is set to true.
- If <parameter>pname</parameter> is a integer type parameter,
- <parameter>param</parameter> is rounded to the nearest integer.
- </para>
- <para>
- Likewise, <function>glPixelStorei</function> can also be used to set any of the
- pixel store parameters.
- Boolean parameters are set to false if <parameter>param</parameter> is 0 and true otherwise.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- The pixel storage modes in effect when
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBitmap</refentrytitle></citerefentry>,
- or <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry> is placed in a display list control the interpretation
- of memory data.
- Likewise, if the <code>ARB_imaging</code> extension is supported, the pixel
- storage modes in effect when
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorSubTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>, of
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry> is placed in a display list control the
- interpretation of memory data.
- The pixel storage modes in effect when a display list is executed are
- not significant.
- </para>
- <para>
- Pixel storage modes are client state and must be pushed and restored
- using
- <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPopClientAttrib</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if a negative row length,
- pixel skip,
- or row skip value is specified,
- or if alignment is specified as other than 1, 2, 4, or 8.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glPixelStore</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SWAP_BYTES</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_LSB_FIRST</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_ROW_LENGTH</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_IMAGE_HEIGHT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SKIP_ROWS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SKIP_PIXELS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_SKIP_IMAGES</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PACK_ALIGNMENT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SWAP_BYTES</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_LSB_FIRST</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_ROW_LENGTH</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_IMAGE_HEIGHT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SKIP_ROWS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SKIP_PIXELS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_SKIP_IMAGES</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_UNPACK_ALIGNMENT</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBitmap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorSubTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glHistogram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMinmax</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelZoom</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPushClientAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glPointParameter">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glPointParameter</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glPointParameter</refname>
- <refpurpose>specify point parameters</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPointParameterf</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat <parameter>param</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para></para>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPointParameteri</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint <parameter>param</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies a single-valued point parameter.
- <constant>GL_POINT_SIZE_MIN</constant>,
- <constant>GL_POINT_SIZE_MAX</constant>,
- <constant>GL_POINT_FADE_THRESHOLD_SIZE</constant>, and
- <constant>GL_POINT_SPRITE_COORD_ORIGIN</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>param</parameter></term>
- <listitem>
- <para>
- Specifies the value that <parameter>pname</parameter> will be set to.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPointParameterfv</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>const GLfloat * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para></para>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPointParameteriv</function></funcdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>const GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies a point parameter.
- <constant>GL_POINT_SIZE_MIN</constant>,
- <constant>GL_POINT_SIZE_MAX</constant>,
- <constant>GL_POINT_DISTANCE_ATTENUATION</constant>,
- <constant>GL_POINT_FADE_THRESHOLD_SIZE</constant>, and
- <constant>GL_POINT_SPRITE_COORD_ORIGIN</constant>
- are accepted.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Specifies the value or values to be assigned to <parameter>pname</parameter>.
- <constant>GL_POINT_DISTANCE_ATTENUATION</constant> requires an array of three values.
- All other parameters accept an array containing only a single value.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- The following values are accepted for <parameter>pname</parameter>:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_POINT_SIZE_MIN</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> is a single floating-point value that specifies the minimum point size. The default value is 0.0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SIZE_MAX</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> is a single floating-point value that specifies the maximum point size. The default value is 1.0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_FADE_THRESHOLD_SIZE</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> is a single floating-point value that specifies the threshold value
- to which point sizes are clamped if they exceed the specified value. The
- default value is 1.0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_DISTANCE_ATTENUATION</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> is an array of three floating-point values that specify the
- coefficients used for scaling the computed point size. The default values
- are
- <inlineequation><mml:math>
- <!-- eqn: (1, 0, 0):-->
- <mml:mfenced open="(" close=")">
- <mml:mn>1</mml:mn>
- <mml:mn>0</mml:mn>
- <mml:mn>0</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_POINT_SPRITE_COORD_ORIGIN</constant></term>
- <listitem>
- <para>
- </para>
- <para>
- <parameter>params</parameter> is a single enum specifying the point sprite texture coordinate origin, either <constant>GL_LOWER_LEFT</constant> or <constant>GL_UPPER_LEFT</constant>.
- The default value is <constant>GL_UPPER_LEFT</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glPointParameter</function> is available only if the GL version is 1.4 or greater.
- </para>
- <para>
- <constant>GL_POINT_SPRITE_COORD_ORIGIN</constant> is available only if the GL version is 2.0 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated If the value specified for
- <constant>GL_POINT_SIZE_MIN</constant>, <constant>GL_POINT_SIZE_MAX</constant>, or
- <constant>GL_POINT_FADE_THRESHOLD_SIZE</constant> is less than zero.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated If the value specified for
- <constant>GL_POINT_SPRITE_COORD_ORIGIN</constant> is not <constant>GL_LOWER_LEFT</constant> or <constant>GL_UPPER_LEFT</constant>.
- </para>
- <para>
- If the value for <constant>GL_POINT_SIZE_MIN</constant> is greater than
- <constant>GL_POINT_SIZE_MAX</constant>, the point size after clamping is undefined, but no
- error is generated.
- </para>
- <para>
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_SIZE_MIN</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_SIZE_MAX</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_FADE_THRESHOLD_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_DISTANCE_ATTENUATION</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_SPRITE_COORD_ORIGIN</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glPointSize</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>
+++ /dev/null
-<?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="glPointSize">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glPointSize</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glPointSize</refname>
- <refpurpose>specify the diameter of rasterized points</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPointSize</function></funcdef>
- <paramdef>GLfloat <parameter>size</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>
- Specifies the diameter of rasterized points.
- The initial value is 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glPointSize</function> specifies the rasterized diameter of both aliased and antialiased
- points. Using a point size other than 1 has different effects, depending
- on whether point antialiasing is enabled. To enable and disable point
- antialiasing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_POINT_SMOOTH</constant>. Point antialiasing is initially disabled.
- </para>
- <para>
- The specified point size is multiplied with a distance attenuation factor
- and clamped to the specified point size range, and further clamped to the
- implementation-dependent point size range to produce the derived point size
- using
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: pointSize = clamp left ( size * sqrt { left ( 1 over {a + b * d + c * {d sup 2}} right ) } right ):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">pointSize</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">clamp</mml:mi>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">size</mml:mi>
- <mml:mo>×</mml:mo>
- <mml:msqrt>
- <mml:mfenced open="" close="">
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:mn>1</mml:mn>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">a</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">b</mml:mi>
- <mml:mo>×</mml:mo>
- <mml:mi mathvariant="italic">d</mml:mi>
- </mml:mrow>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mo>×</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msup><mml:mi mathvariant="italic">d</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msup>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:mfenced>
- </mml:mfrac>
- </mml:mfenced>
- </mml:mfenced>
- </mml:msqrt>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
- is the eye-coordinate distance from the eye to the vertex, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">a</mml:mi></mml:math></inlineequation>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>,
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">c</mml:mi></mml:math></inlineequation>
- are the distance attenuation coefficients (see
- <citerefentry><refentrytitle>glPointParameter</refentrytitle></citerefentry>).
- </para>
- <para>
- If multisampling is disabled, the computed point size is used as the
- point's width.
- </para>
- <para>
- If multisampling is enabled, the point may be faded by modifying the point
- alpha value (see <citerefentry><refentrytitle>glSampleCoverage</refentrytitle></citerefentry>) instead of allowing the point width
- to go below a given threshold (see <citerefentry><refentrytitle>glPointParameter</refentrytitle></citerefentry>). In this case,
- the width is further modified in the following manner:
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: pointWidth = left { lpile { pointSize above threshold } lpile { pointSize >= threshold above otherwise }:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">pointWidth</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mi mathvariant="italic">pointSize</mml:mi>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mi mathvariant="italic">threshold</mml:mi>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢</mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">pointSize</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mi mathvariant="italic">threshold</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mi mathvariant="italic">otherwise</mml:mi>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- The point alpha value is modified by computing:
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: pointAlpha = left { lpile { 1 above left ( pointSize over threshold right ) sup 2 } lpile { pointSize >= threshold above otherwise }:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">pointAlpha</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:msup><mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:mi mathvariant="italic">pointSize</mml:mi>
- <mml:mi mathvariant="italic">threshold</mml:mi>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mn>2</mml:mn>
- </mml:msup>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢</mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">pointSize</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mi mathvariant="italic">threshold</mml:mi>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mi mathvariant="italic">otherwise</mml:mi>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- If point antialiasing is disabled, the actual size is determined by
- rounding the supplied size to the nearest integer. (If the rounding
- results in the value 0, it is as if the point size were 1.) If the rounded
- size is odd, then the center point
- (<inlineequation><mml:math>
- <!-- eqn: x:-->
- <mml:mi mathvariant="italic">x</mml:mi>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: y:-->
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:math></inlineequation>)
- of the pixel fragment
- that represents the point is computed as
- </para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: ( \(lf x sub w \(rf + .5 , \(lf y sub w \(rf + .5 ):-->
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mfenced open="⌊" close="⌋">
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- </mml:mfenced>
- <mml:mo>+</mml:mo>
- <mml:mn>.5</mml:mn>
- </mml:mrow>
- <mml:mrow>
- <mml:mfenced open="⌊" close="⌋">
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- </mml:mfenced>
- <mml:mo>+</mml:mo>
- <mml:mn>.5</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>
- </para>
- <para>
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- subscripts indicate window coordinates. All pixels that lie
- within the square grid of the rounded size centered at
- (<inlineequation><mml:math>
- <!-- eqn: x:-->
- <mml:mi mathvariant="italic">x</mml:mi>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: y:-->
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:math></inlineequation>)
- make
- up the fragment. If the size is even, the center point is
- </para>
- <para>
- <inlineequation><mml:math>
- <!-- eqn: ( \(lf x sub w + .5 \(rf , \(lf y sub w + .5 \(rf ):-->
- <mml:mfenced open="(" close=")">
- <mml:mfenced open="⌊" close="⌋">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>.5</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mfenced open="⌊" close="⌋">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>.5</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:mfenced>
- </mml:math></inlineequation>
- </para>
- <para>
- and the rasterized fragment's centers are the half-integer window
- coordinates within the square of the rounded size centered at
- <inlineequation><mml:math>
- <!-- eqn: (x, y):-->
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:mfenced>
- </mml:math></inlineequation>.
- All pixel fragments produced in rasterizing a nonantialiased point are
- assigned the same associated data, that of the vertex corresponding to the
- point.
- </para>
- <para>
- If antialiasing is enabled, then point rasterization produces a fragment
- for each pixel square that intersects the region lying within the circle
- having diameter equal to the current point size and centered at the point's
- <inlineequation><mml:math>
- <!-- eqn: (x sub w, y sub w):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The coverage value for each fragment is the
- window coordinate area of the intersection of the circular region with the
- corresponding pixel square. This value is saved and used in the final
- rasterization step. The data associated with each fragment is the data
- associated with the point being rasterized.
- </para>
- <para>
- Not all sizes are supported when point antialiasing is enabled. If an
- unsupported size is requested, the nearest supported size is used. Only
- size 1 is guaranteed to be supported; others depend on the implementation.
- To query the range of supported sizes and the size difference between
- supported sizes within the range, call <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments
- <constant>GL_SMOOTH_POINT_SIZE_RANGE</constant> and <constant>GL_SMOOTH_POINT_SIZE_GRANULARITY</constant>.
- For aliased points, query the supported ranges and granularity with
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments <constant>GL_ALIASED_POINT_SIZE_RANGE</constant>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- The point size specified by <function>glPointSize</function> is always returned when
- <constant>GL_POINT_SIZE</constant> is queried. Clamping and rounding for aliased and
- antialiased points have no effect on the specified value.
- </para>
- <para>
- A non-antialiased point size may be clamped to an implementation-dependent
- maximum. Although this maximum cannot be queried, it must be no less than
- the maximum value for antialiased points, rounded to the nearest integer
- value.
- </para>
- <para>
- <constant>GL_POINT_SIZE_RANGE</constant> and <constant>GL_POINT_SIZE_GRANULARITY</constant> are
- deprecated in GL versions 1.2 and greater. Their functionality has been
- replaced by <constant>GL_SMOOTH_POINT_SIZE_RANGE</constant> and
- <constant>GL_SMOOTH_POINT_SIZE_GRANULARITY</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>size</parameter> is less than or equal to 0.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glPointSize</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_ALIASED_POINT_SIZE_RANGE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_SIZE_MIN</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_SIZE_MAX</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_FADE_THRESHOLD_SIZE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POINT_DISTANCE_ATTENUATION</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SMOOTH_POINT_SIZE_RANGE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SMOOTH_POINT_SIZE_GRANULARITY</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_POINT_SMOOTH</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPointParameter</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>
+++ /dev/null
-<?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="glPolygonMode">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glPolygonMode</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glPolygonMode</refname>
- <refpurpose>select a polygon rasterization mode</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPolygonMode</function></funcdef>
- <paramdef>GLenum <parameter>face</parameter></paramdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>face</parameter></term>
- <listitem>
- <para>
- Specifies the polygons that <parameter>mode</parameter> applies to.
- Must be
- <constant>GL_FRONT</constant> for front-facing polygons,
- <constant>GL_BACK</constant> for back-facing polygons,
- or <constant>GL_FRONT_AND_BACK</constant> for front- and back-facing polygons.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies how polygons will be rasterized.
- Accepted values are
- <constant>GL_POINT</constant>,
- <constant>GL_LINE</constant>, and
- <constant>GL_FILL</constant>.
- The initial value is <constant>GL_FILL</constant> for both front- and back-facing polygons.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glPolygonMode</function> controls the interpretation of polygons for rasterization.
- <parameter>face</parameter> describes which polygons <parameter>mode</parameter> applies to:
- front-facing polygons (<constant>GL_FRONT</constant>),
- back-facing polygons (<constant>GL_BACK</constant>),
- or both (<constant>GL_FRONT_AND_BACK</constant>).
- The polygon mode affects only the final rasterization of polygons.
- In particular,
- a polygon's vertices are lit and
- the polygon is clipped and possibly culled before these modes are applied.
- </para>
- <para>
- Three modes are defined and can be specified in <parameter>mode</parameter>:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_POINT</constant></term>
- <listitem>
- <para>
- Polygon vertices that are marked as the start of a boundary edge
- are drawn as points.
- Point attributes such as
- <constant>GL_POINT_SIZE</constant> and
- <constant>GL_POINT_SMOOTH</constant> control
- the rasterization of the points.
- Polygon rasterization attributes other than <constant>GL_POLYGON_MODE</constant> have no effect.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINE</constant></term>
- <listitem>
- <para>
- Boundary edges of the polygon are drawn as line segments.
- They are treated as connected line segments for line stippling;
- the line stipple counter and pattern are not reset between segments
- (see <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>).
- Line attributes such as
- <constant>GL_LINE_WIDTH</constant> and
- <constant>GL_LINE_SMOOTH</constant> control
- the rasterization of the lines.
- Polygon rasterization attributes other than <constant>GL_POLYGON_MODE</constant> have no effect.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_FILL</constant></term>
- <listitem>
- <para>
- The interior of the polygon is filled.
- Polygon attributes such as
- <constant>GL_POLYGON_STIPPLE</constant> and
- <constant>GL_POLYGON_SMOOTH</constant> control the rasterization of the polygon.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="examples"><title>Examples</title>
- <para>
- To draw a surface with filled back-facing polygons
- and outlined front-facing polygons,
- call
- <programlisting>
-glPolygonMode(<constant>GL_FRONT</constant>, <constant>GL_LINE</constant>);
- </programlisting>
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Vertices are marked as boundary or nonboundary with an edge flag.
- Edge flags are generated internally by the GL when it decomposes
- polygons; they can be set explicitly using <citerefentry><refentrytitle>glEdgeFlag</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if either <parameter>face</parameter> or <parameter>mode</parameter> is not
- an accepted value.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glPolygonMode</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POLYGON_MODE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlag</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLineStipple</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLineWidth</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPointSize</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPolygonStipple</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>
+++ /dev/null
-<?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="glPolygonOffset">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glPolygonOffset</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glPolygonOffset</refname>
- <refpurpose>set the scale and units used to calculate depth values</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glPolygonOffset</function></funcdef>
- <paramdef>GLfloat <parameter>factor</parameter></paramdef>
- <paramdef>GLfloat <parameter>units</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>factor</parameter></term>
- <listitem>
- <para>
- Specifies a scale factor that is used to create a variable
- depth offset for each polygon. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>units</parameter></term>
- <listitem>
- <para>
- Is multiplied by an implementation-specific value to
- create a constant depth offset. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- When <constant>GL_POLYGON_OFFSET_FILL</constant>, <constant>GL_POLYGON_OFFSET_LINE</constant>, or
- <constant>GL_POLYGON_OFFSET_POINT</constant> is enabled, each
- fragment's <emphasis>depth</emphasis> value will be offset after it is interpolated
- from the <emphasis>depth</emphasis> values of the appropriate vertices.
- The value of the offset is
- <inlineequation><mml:math>
- <!-- eqn: factor * DZ + r * units:-->
- <mml:mrow>
- <mml:mrow>
- <mml:mi mathvariant="italic">factor</mml:mi>
- <mml:mo>×</mml:mo>
- <mml:mi mathvariant="italic">DZ</mml:mi>
- </mml:mrow>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>×</mml:mo>
- <mml:mi mathvariant="italic">units</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math>
- <!-- eqn: DZ:-->
- <mml:mi mathvariant="italic">DZ</mml:mi>
- </mml:math></inlineequation>
- is a measurement of the change in depth relative to the screen
- area of the polygon, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>
- is the smallest value that is guaranteed to
- produce a resolvable offset for a given implementation.
- The offset is added before the depth test is performed and before
- the value is written into the depth buffer.
- </para>
- <para>
- <function>glPolygonOffset</function> is useful for rendering hidden-line images, for applying decals
- to surfaces, and for rendering solids with highlighted edges.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glPolygonOffset</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- <function>glPolygonOffset</function> has no effect on depth coordinates placed in the
- feedback buffer.
- </para>
- <para>
- <function>glPolygonOffset</function> has no effect on selection.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glPolygonOffset</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument
- <constant>GL_POLYGON_OFFSET_FILL</constant>,
- <constant>GL_POLYGON_OFFSET_LINE</constant>,
- or <constant>GL_POLYGON_OFFSET_POINT</constant>.
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_POLYGON_OFFSET_FACTOR</constant> or
- <constant>GL_POLYGON_OFFSET_UNITS</constant>.
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIsEnabled</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>
+++ /dev/null
-<?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="glReadBuffer">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glReadBuffer</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glReadBuffer</refname>
- <refpurpose>select a color buffer source for pixels</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glReadBuffer</function></funcdef>
- <paramdef>GLenum <parameter>mode</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mode</parameter></term>
- <listitem>
- <para>
- Specifies a color buffer.
- Accepted values are
- <constant>GL_FRONT_LEFT</constant>,
- <constant>GL_FRONT_RIGHT</constant>,
- <constant>GL_BACK_LEFT</constant>,
- <constant>GL_BACK_RIGHT</constant>,
- <constant>GL_FRONT</constant>,
- <constant>GL_BACK</constant>,
- <constant>GL_LEFT</constant>,
- <constant>GL_RIGHT</constant>, and
- <constant>GL_AUX</constant><emphasis>i</emphasis>,
- where <emphasis>i</emphasis> is between 0 and the value of <constant>GL_AUX_BUFFERS</constant> minus 1.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glReadBuffer</function> specifies a color buffer as the source for subsequent
- <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry> commands.
- <parameter>mode</parameter> accepts one of twelve or more predefined values.
- (<constant>GL_AUX0</constant> through <constant>GL_AUX3</constant> are always defined.)
- In a fully configured system,
- <constant>GL_FRONT</constant>,
- <constant>GL_LEFT</constant>, and
- <constant>GL_FRONT_LEFT</constant> all name the front left buffer,
- <constant>GL_FRONT_RIGHT</constant> and
- <constant>GL_RIGHT</constant> name the front right buffer, and
- <constant>GL_BACK_LEFT</constant> and
- <constant>GL_BACK</constant> name the back left buffer.
- </para>
- <para>
- Nonstereo double-buffered configurations have only a front left and a
- back left buffer.
- Single-buffered configurations have a front left and a front right
- buffer if stereo, and only a front left buffer if nonstereo.
- It is an error to specify a nonexistent buffer to <function>glReadBuffer</function>.
- </para>
- <para>
- <parameter>mode</parameter> is initially <constant>GL_FRONT</constant> in single-buffered configurations
- and <constant>GL_BACK</constant> in double-buffered configurations.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>mode</parameter> is not one of the twelve
- (or more) accepted values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> specifies a buffer
- that does not exist.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glReadBuffer</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_READ_BUFFER</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadPixels</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>
+++ /dev/null
-<?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="glReadPixels">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glReadPixels</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glReadPixels</refname>
- <refpurpose>read a block of pixels from the frame buffer</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glReadPixels</function></funcdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the window coordinates of the first pixel
- that is read from the frame buffer.
- This location is the lower left corner of a rectangular block of pixels.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specify the dimensions of the pixel rectangle.
- <parameter>width</parameter> and <parameter>height</parameter> of one correspond to a single pixel.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_STENCIL_INDEX</constant>,
- <constant>GL_DEPTH_COMPONENT</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- Must be one of
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Returns the pixel data.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glReadPixels</function> returns pixel data from the frame buffer,
- starting with the pixel whose lower left corner
- is at location (<parameter>x</parameter>, <parameter>y</parameter>),
- into client memory starting at location <parameter>data</parameter>.
- Several parameters control the processing of the pixel data before
- it is placed into client memory.
- These parameters are set with three commands:
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>, and
- <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- This reference page describes the effects on <function>glReadPixels</function> of most,
- but not all of the parameters specified by these three commands.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_PACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a block of pixels is
- requested, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store
- rather than a pointer to client memory.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the pixel data may
- be processed by additional operations including color table lookup,
- color matrix transformations, convolutions, histograms, and minimum and
- maximum pixel value computations.
- </para>
- <para>
- <function>glReadPixels</function> returns values from each pixel with lower left corner at
- <inlineequation><mml:math>
- <!-- eqn: (x + i, y + j):-->
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">x</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">i</mml:mi>
- </mml:mrow>
- <mml:mrow>
- <mml:mi mathvariant="italic">y</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">j</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>
- for
- <inlineequation><mml:math>
- <!-- eqn: 0 <= i < width:-->
- <mml:mrow>
- <mml:mn>0</mml:mn>
- <mml:mo><=</mml:mo>
- <mml:mi mathvariant="italic">i</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- and
- <inlineequation><mml:math>
- <!-- eqn: 0 <= j < height:-->
- <mml:mrow>
- <mml:mn>0</mml:mn>
- <mml:mo><=</mml:mo>
- <mml:mi mathvariant="italic">j</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>.
- This pixel is said to be the
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>th
- pixel in the
- <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>th
- row.
- Pixels are returned in row order from the lowest to the highest row,
- left to right in each row.
- </para>
- <para>
- <parameter>format</parameter> specifies the format for the returned pixel values;
- accepted values are:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_COLOR_INDEX</constant></term>
- <listitem>
- <para>
- Color indices are read from the color buffer
- selected by <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>.
- Each index is converted to fixed point,
- shifted left or right depending on the value and sign of <constant>GL_INDEX_SHIFT</constant>,
- and added to <constant>GL_INDEX_OFFSET</constant>.
- If <constant>GL_MAP_COLOR</constant> is <constant>GL_TRUE</constant>,
- indices are replaced by their mappings in the table <constant>GL_PIXEL_MAP_I_TO_I</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_STENCIL_INDEX</constant></term>
- <listitem>
- <para>
- Stencil values are read from the stencil buffer.
- Each index is converted to fixed point,
- shifted left or right depending on the value and sign of <constant>GL_INDEX_SHIFT</constant>,
- and added to <constant>GL_INDEX_OFFSET</constant>.
- If <constant>GL_MAP_STENCIL</constant> is <constant>GL_TRUE</constant>,
- indices are replaced by their mappings in the table <constant>GL_PIXEL_MAP_S_TO_S</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_COMPONENT</constant></term>
- <listitem>
- <para>
- Depth values are read from the depth buffer.
- Each component is converted to floating point such that the minimum depth
- value maps to 0 and the maximum value maps to 1.
- Each component is then multiplied by <constant>GL_DEPTH_SCALE</constant>,
- added to <constant>GL_DEPTH_BIAS</constant>,
- and finally clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGB</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGR</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGBA</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGRA</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE_ALPHA</constant></term>
- <listitem>
- <para>
- Processing differs depending on whether color buffers store color indices
- or RGBA color components.
- If color indices are stored,
- they are read from the color buffer selected by <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>.
- Each index is converted to fixed point,
- shifted left or right depending on the value and sign of <constant>GL_INDEX_SHIFT</constant>,
- and added to <constant>GL_INDEX_OFFSET</constant>.
- Indices are then replaced by the red,
- green,
- blue,
- and alpha values obtained by indexing the tables
- <constant>GL_PIXEL_MAP_I_TO_R</constant>,
- <constant>GL_PIXEL_MAP_I_TO_G</constant>,
- <constant>GL_PIXEL_MAP_I_TO_B</constant>, and
- <constant>GL_PIXEL_MAP_I_TO_A</constant>.
- Each table must be of size
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n:-->
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- </mml:math></inlineequation>,
- but
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- may be different for
- different tables.
- Before an index is used to look up a value in a table of
- size
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n:-->
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- </mml:math></inlineequation>,
- it must be masked against
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>.
- </para>
- <para>
- If RGBA color components are stored in the color buffers,
- they are read from the color buffer selected by <citerefentry><refentrytitle>glReadBuffer</refentrytitle></citerefentry>.
- Each color component is converted to floating point such that zero intensity
- maps to 0.0 and full intensity maps to 1.0.
- Each component is then multiplied by <constant>GL_c_SCALE</constant> and
- added to <constant>GL_c_BIAS</constant>,
- where <emphasis>c</emphasis> is RED, GREEN, BLUE, or ALPHA.
- Finally,
- if <constant>GL_MAP_COLOR</constant> is <constant>GL_TRUE</constant>,
- each component is clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>,
- scaled to the size of its corresponding table, and is then
- replaced by its mapping in the table
- <constant>GL_PIXEL_MAP_c_TO_c</constant>,
- where <emphasis>c</emphasis> is R, G, B, or A.
- </para>
- <para>
- Unneeded data is then discarded.
- For example,
- <constant>GL_RED</constant> discards the green, blue, and alpha components,
- while <constant>GL_RGB</constant> discards only the alpha component.
- <constant>GL_LUMINANCE</constant> computes a single-component value as the sum of
- the red,
- green,
- and blue components,
- and <constant>GL_LUMINANCE_ALPHA</constant> does the same,
- while keeping alpha as a second value.
- The final values are clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The shift,
- scale,
- bias,
- and lookup factors just described are all specified by
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- The lookup table contents themselves are specified by <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>.
- </para>
- <para>
- Finally, the indices or components
- are converted to the proper format,
- as specified by <parameter>type</parameter>.
- If <parameter>format</parameter> is <constant>GL_COLOR_INDEX</constant> or <constant>GL_STENCIL_INDEX</constant>
- and <parameter>type</parameter> is not <constant>GL_FLOAT</constant>,
- each index is masked with the mask value given in the following table.
- If <parameter>type</parameter> is <constant>GL_FLOAT</constant>, then each integer index is converted to
- single-precision floating-point format.
- </para>
- <para>
- If <parameter>format</parameter> is
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, or
- <constant>GL_LUMINANCE_ALPHA</constant> and <parameter>type</parameter> is not <constant>GL_FLOAT</constant>,
- each component is multiplied by the multiplier shown in the following table.
- If type is <constant>GL_FLOAT</constant>, then each component is passed as is
- (or converted to the client's single-precision floating-point format if
- it is different from the one used by the GL).
- </para>
- <para>
- </para>
- <informaltable frame="topbot">
- <tgroup cols="3" align="left">
- <colspec/>
- <colspec align="center"/>
- <colspec align="center"/>
- <thead>
- <row>
- <entry rowsep="1" align="left">
- <parameter>type</parameter>
- </entry>
- <entry rowsep="1" align="center"><emphasis role="bold">
- Index Mask
- </emphasis></entry>
- <entry rowsep="1" align="center"><emphasis role="bold">
- Component Conversion
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_UNSIGNED_BYTE</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 2 sup 8 - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>8</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: (2 sup 8 - 1) c:-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>8</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_BYTE</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 2 sup 7 - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>7</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: {(2 sup 8 - 1) c - 1} / 2:-->
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>8</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mn>2</mml:mn>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_BITMAP</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 1:-->
- <mml:mn>1</mml:mn>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 1:-->
- <mml:mn>1</mml:mn>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNSIGNED_SHORT</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 2 sup 16 - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>16</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: (2 sup 16 - 1) c:-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>16</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_SHORT</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 2 sup 15 - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>15</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: {(2 sup 16 - 1) c - 1} / 2:-->
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>16</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mn>2</mml:mn>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_UNSIGNED_INT</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 2 sup 32 - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>32</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: (2 sup 32 - 1) c:-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>32</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">c</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_INT</constant>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: 2 sup 31 - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>31</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- </entry>
- <entry align="center">
- <inlineequation><mml:math>
- <!-- eqn: {(2 sup 32 - 1) c - 1} / 2:-->
- <mml:mfrac>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mn>32</mml:mn>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mn>2</mml:mn>
- </mml:mfrac>
- </mml:math></inlineequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_FLOAT</constant>
- </entry>
- <entry align="center">
- none
- </entry>
- <entry align="center">
- <inlineequation><mml:math><mml:mi mathvariant="italic">c</mml:mi></mml:math></inlineequation>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- Return values are placed in memory as follows.
- If <parameter>format</parameter> is
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_STENCIL_INDEX</constant>,
- <constant>GL_DEPTH_COMPONENT</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>, or
- <constant>GL_LUMINANCE</constant>,
- a single value is returned and the data for the
- <inlineequation><mml:math><mml:mi mathvariant="italic">i</mml:mi></mml:math></inlineequation>th
- pixel in the
- <inlineequation><mml:math><mml:mi mathvariant="italic">j</mml:mi></mml:math></inlineequation>th
- row
- is placed in location
- <inlineequation><mml:math>
- <!-- eqn: (j) width + i:-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">j</mml:mi>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">i</mml:mi>
- </mml:mrow>
- </mml:math></inlineequation>.
- <constant>GL_RGB</constant> and <constant>GL_BGR</constant> return three values,
- <constant>GL_RGBA</constant> and <constant>GL_BGRA</constant> return four values,
- and <constant>GL_LUMINANCE_ALPHA</constant> returns two values for each pixel,
- with all values corresponding to a single pixel occupying contiguous space
- in <parameter>data</parameter>.
- Storage parameters set by <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- such as <constant>GL_PACK_LSB_FIRST</constant> and <constant>GL_PACK_SWAP_BYTES</constant>,
- affect the way that data is written into memory.
- See <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> for a description.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Values for pixels that lie outside the window
- connected to the current GL context are undefined.
- </para>
- <para>
- If an error is generated,
- no change is made to the contents of <parameter>data</parameter>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> or <parameter>type</parameter> is not an
- accepted value.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and <parameter>format</parameter> is
- not <constant>GL_COLOR_INDEX</constant> or <constant>GL_STENCIL_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if either <parameter>width</parameter> or <parameter>height</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> is <constant>GL_COLOR_INDEX</constant>
- and the color buffers store RGBA color components.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> is <constant>GL_STENCIL_INDEX</constant>
- and there is no stencil buffer.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> is <constant>GL_DEPTH_COMPONENT</constant>
- and there is no depth buffer.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- The formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and the data would be packed to the buffer
- object such that the memory writes required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_PACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glReadPixels</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_INDEX_MODE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_PACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelMap</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glReadBuffer</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>
+++ /dev/null
-<?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="glSampleCoverage">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glSampleCoverage</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glSampleCoverage</refname>
- <refpurpose>specify multisample coverage parameters</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glSampleCoverage</function></funcdef>
- <paramdef>GLclampf <parameter>value</parameter></paramdef>
- <paramdef>GLboolean <parameter>invert</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>value</parameter></term>
- <listitem>
- <para>
- Specify a single floating-point sample coverage value. The value is
- clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0 ,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- The initial value is 1.0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>invert</parameter></term>
- <listitem>
- <para>
- Specify a single boolean value representing if the coverage masks should be
- inverted. <constant>GL_TRUE</constant> and <constant>GL_FALSE</constant> are accepted. The initial value
- is <constant>GL_FALSE</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Multisampling samples a pixel multiple times at various
- implementation-dependent subpixel locations to generate antialiasing
- effects. Multisampling transparently antialiases points, lines, polygons,
- bitmaps, and images if it is enabled.
- </para>
- <para>
- <parameter>value</parameter> is used in constructing a temporary mask used in determining which
- samples will be used in resolving the final fragment color. This mask is
- bitwise-anded with the coverage mask generated from the multisampling
- computation. If the <parameter>invert</parameter> flag is set, the temporary mask is inverted
- (all bits flipped) and then the bitwise-and is computed.
- </para>
- <para>
- If an implementation does not have any multisample buffers available, or
- multisampling is disabled, rasterization occurs with only a single sample
- computing a pixel's final RGB color.
- </para>
- <para>
- Provided an implementation supports multisample buffers, and multisampling
- is enabled, then a pixel's final color is generated by combining several
- samples per pixel. Each sample contains color, depth, and stencil
- information, allowing those operations to be performed on each sample.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glSampleCoverage</function> is available only if the GL version is 1.3 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glSampleCoverage</function> is executed between the
- execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SAMPLE_COVERAGE_VALUE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SAMPLE_COVERAGE_INVERT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_MULTISAMPLE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_SAMPLE_ALPHA_TO_COVERAGE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_SAMPLE_ALPHA_TO_ONE</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_SAMPLE_COVERAGE</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPushAttrib</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>
+++ /dev/null
-<?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="glScissor">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glScissor</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glScissor</refname>
- <refpurpose>define the scissor box</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glScissor</function></funcdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the lower left corner of the scissor box.
- Initially (0, 0).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specify the width and height of the scissor box.
- When a GL context is first attached to a window,
- <parameter>width</parameter> and <parameter>height</parameter> are set to the dimensions of that
- window.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glScissor</function> defines a rectangle, called the scissor box,
- in window coordinates.
- The first two arguments,
- <parameter>x</parameter> and <parameter>y</parameter>,
- specify the lower left corner of the box.
- <parameter>width</parameter> and <parameter>height</parameter> specify the width and height of the box.
- </para>
- <para>
- To enable and disable the scissor test, call
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_SCISSOR_TEST</constant>. The test is initially disabled.
- While the test is enabled, only pixels that lie within the scissor box
- can be modified by drawing commands.
- Window coordinates have integer values at the shared corners of
- frame buffer pixels.
- <code>glScissor(0,0,1,1)</code> allows modification of only the lower left
- pixel in the window, and <code>glScissor(0,0,0,0)</code> doesn't allow
- modification of any pixels in the window.
- </para>
- <para>
- When the scissor test is disabled,
- it is as though the scissor box includes the entire window.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if either <parameter>width</parameter> or <parameter>height</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glScissor</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SCISSOR_BOX</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_SCISSOR_TEST</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glViewport</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>
+++ /dev/null
-<?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="glShaderSource">
- <refmeta>
- <refentrytitle>glShaderSource</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glShaderSource</refname>
- <refpurpose>Replaces the source code in a shader object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glShaderSource</function></funcdef>
- <paramdef>GLuint <parameter>shader</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLchar **<parameter>string</parameter></paramdef>
- <paramdef>const GLint *<parameter>length</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>shader</parameter></term>
- <listitem>
- <para>Specifies the handle of the shader object
- whose source code is to be replaced.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>Specifies the number of elements in the
- <parameter>string</parameter> and
- <parameter>length</parameter>
- arrays.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>string</parameter></term>
- <listitem>
- <para>Specifies an array of pointers to strings
- containing the source code to be loaded into the
- shader.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>length</parameter></term>
- <listitem>
- <para>Specifies an array of string lengths.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glShaderSource</function> sets the source code
- in <parameter>shader</parameter> to the source code in the array
- of strings specified by <parameter>string</parameter>. Any
- source code previously stored in the shader object is completely
- replaced. The number of strings in the array is specified by
- <parameter>count</parameter>. If <parameter>length</parameter>
- is <constant>NULL</constant>, each string is assumed to be null
- terminated. If <parameter>length</parameter> is a value other
- than <constant>NULL</constant>, it points to an array containing
- a string length for each of the corresponding elements of
- <parameter>string</parameter>. Each element in the
- <parameter>length</parameter> array may contain the length of
- the corresponding string (the null character is not counted as
- part of the string length) or a value less than 0 to indicate
- that the string is null terminated. The source code strings are
- not scanned or parsed at this time; they are simply copied into
- the specified shader object.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glShaderSource</function> is available only if
- the GL version is 2.0 or greater.</para>
-
- <para>OpenGL copies the shader source code strings when
- <function>glShaderSource</function> is called, so an application
- may free its copy of the source code strings immediately after
- the function returns.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>shader</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>shader</parameter> is not a shader object.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>count</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glShaderSource</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetShader</refentrytitle></citerefentry>
- with arguments <parameter>shader</parameter> and
- <constant>GL_SHADER_SOURCE_LENGTH</constant></para>
-
- <para><citerefentry><refentrytitle>glGetShaderSource</refentrytitle></citerefentry>
- with argument <parameter>shader</parameter></para>
-
- <para><citerefentry><refentrytitle>glIsShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteShader</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glStencilFunc">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glStencilFunc</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glStencilFunc</refname>
- <refpurpose>set front and back function and reference value for stencil testing</refpurpose>
- </refnamediv>
- <!-- eqn: ignoring delim $$ -->
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glStencilFunc</function></funcdef>
- <paramdef>GLenum <parameter>func</parameter></paramdef>
- <paramdef>GLint <parameter>ref</parameter></paramdef>
- <paramdef>GLuint <parameter>mask</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>func</parameter></term>
- <listitem>
- <para>
- Specifies the test function.
- Eight symbolic constants are valid:
- <constant>GL_NEVER</constant>,
- <constant>GL_LESS</constant>,
- <constant>GL_LEQUAL</constant>,
- <constant>GL_GREATER</constant>,
- <constant>GL_GEQUAL</constant>,
- <constant>GL_EQUAL</constant>,
- <constant>GL_NOTEQUAL</constant>, and
- <constant>GL_ALWAYS</constant>. The initial value is <constant>GL_ALWAYS</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>ref</parameter></term>
- <listitem>
- <para>
- Specifies the reference value for the stencil test.
- <parameter>ref</parameter> is clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0, 2 sup n - 1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bitplanes in the stencil buffer. The
- initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mask</parameter></term>
- <listitem>
- <para>
- Specifies a mask that is ANDed with both the reference value
- and the stored stencil value when the test is done. The initial value
- is all 1's.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Stenciling,
- like depth-buffering,
- enables and disables drawing on a per-pixel basis.
- Stencil planes are first drawn into using GL drawing primitives, then
- geometry and images are rendered using the stencil planes to mask out
- portions of the screen.
- Stenciling is typically used in multipass rendering algorithms
- to achieve special effects,
- such as decals,
- outlining,
- and constructive solid geometry rendering.
- </para>
- <para>
- The stencil test conditionally eliminates a pixel based on the outcome
- of a comparison between the reference value
- and the value in the stencil buffer.
- To enable and disable the test, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
- with argument <constant>GL_STENCIL_TEST</constant>.
- To specify actions based on the outcome of the stencil test, call
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry> or
- <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- <para>
- There can be two separate sets of <parameter>func</parameter>, <parameter>ref</parameter>, and
- <parameter>mask</parameter> parameters; one affects back-facing polygons, and the other
- affects front-facing polygons as well as other non-polygon primitives.
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> sets both front
- and back stencil state to the same values. Use <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>
- to set front and back stencil state to different values.
- </para>
- <para>
- <parameter>func</parameter> is a symbolic constant that determines the stencil comparison function.
- It accepts one of eight values,
- shown in the following list.
- <parameter>ref</parameter> is an integer reference value that is used in the stencil comparison.
- It is clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0, 2 sup n - 1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bitplanes in the stencil buffer.
- <parameter>mask</parameter> is bitwise ANDed with both the reference value
- and the stored stencil value,
- with the ANDed values participating in the comparison.
- </para>
- <para>
- If <emphasis>stencil</emphasis> represents the value stored in the corresponding
- stencil buffer location,
- the following list shows the effect of each comparison function
- that can be specified by <parameter>func</parameter>.
- Only if the comparison succeeds is the pixel passed through
- to the next stage in the rasterization process
- (see <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>).
- All tests treat <emphasis>stencil</emphasis> values as unsigned integers in the range
- <inlineequation><mml:math>
- <!-- eqn: [0, 2 sup n - 1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bitplanes in the stencil buffer.
- </para>
- <para>
- The following values are accepted by <parameter>func</parameter>:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_NEVER</constant></term>
- <listitem>
- <para>
- Always fails.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LESS</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) < ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LEQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) <= ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREATER</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) > ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GEQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) >= ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) = ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NOTEQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) != ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALWAYS</constant></term>
- <listitem>
- <para>
- Always passes.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Initially, the stencil test is disabled.
- If there is no stencil buffer,
- no stencil modification can occur and it is as if
- the stencil test always passes.
- </para>
- <para>
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> is the same as
- calling <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>
- with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>func</parameter> is not one of the eight
- accepted values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilFunc</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_FUNC</constant>, <constant>GL_STENCIL_VALUE_MASK</constant>,
- <constant>GL_STENCIL_REF</constant>, <constant>GL_STENCIL_BACK_FUNC</constant>,
- <constant>GL_STENCIL_BACK_VALUE_MASK</constant>, <constant>GL_STENCIL_BACK_REF</constant>,
- or <constant>GL_STENCIL_BITS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_TEST</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOpSeparate</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>
+++ /dev/null
-<?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="glStencilFuncSeparate">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glStencilFuncSeparate</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glStencilFuncSeparate</refname>
- <refpurpose>set front and/or back function and reference value for stencil testing</refpurpose>
- </refnamediv>
- <!-- eqn: ignoring delim $$ -->
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glStencilFuncSeparate</function></funcdef>
- <paramdef>GLenum <parameter>face</parameter></paramdef>
- <paramdef>GLenum <parameter>func</parameter></paramdef>
- <paramdef>GLint <parameter>ref</parameter></paramdef>
- <paramdef>GLuint <parameter>mask</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>face</parameter></term>
- <listitem>
- <para>
- Specifies whether front and/or back stencil state is updated.
- Three symbolic constants are valid:
- <constant>GL_FRONT</constant>,
- <constant>GL_BACK</constant>, and
- <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>func</parameter></term>
- <listitem>
- <para>
- Specifies the test function.
- Eight symbolic constants are valid:
- <constant>GL_NEVER</constant>,
- <constant>GL_LESS</constant>,
- <constant>GL_LEQUAL</constant>,
- <constant>GL_GREATER</constant>,
- <constant>GL_GEQUAL</constant>,
- <constant>GL_EQUAL</constant>,
- <constant>GL_NOTEQUAL</constant>, and
- <constant>GL_ALWAYS</constant>. The initial value is <constant>GL_ALWAYS</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>ref</parameter></term>
- <listitem>
- <para>
- Specifies the reference value for the stencil test.
- <parameter>ref</parameter> is clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0, 2 sup n - 1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bitplanes in the stencil buffer. The
- initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mask</parameter></term>
- <listitem>
- <para>
- Specifies a mask that is ANDed with both the reference value
- and the stored stencil value when the test is done. The initial value
- is all 1's.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Stenciling,
- like depth-buffering,
- enables and disables drawing on a per-pixel basis.
- You draw into the stencil planes using GL drawing primitives,
- then render geometry and images,
- using the stencil planes to mask out portions of the screen.
- Stenciling is typically used in multipass rendering algorithms
- to achieve special effects,
- such as decals,
- outlining,
- and constructive solid geometry rendering.
- </para>
- <para>
- The stencil test conditionally eliminates a pixel based on the outcome
- of a comparison between the reference value
- and the value in the stencil buffer.
- To enable and disable the test, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry>
- with argument <constant>GL_STENCIL_TEST</constant>.
- To specify actions based on the outcome of the stencil test, call
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry> or
- <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>.
- </para>
- <para>
- There can be two separate sets of <parameter>func</parameter>, <parameter>ref</parameter>, and
- <parameter>mask</parameter> parameters; one affects back-facing polygons, and the other
- affects front-facing polygons as well as other non-polygon primitives.
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> sets both front
- and back stencil state to the same values, as if
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry> were called
- with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- <para>
- <parameter>func</parameter> is a symbolic constant that determines the stencil comparison function.
- It accepts one of eight values,
- shown in the following list.
- <parameter>ref</parameter> is an integer reference value that is used in the stencil comparison.
- It is clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: [0, 2 sup n - 1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bitplanes in the stencil buffer.
- <parameter>mask</parameter> is bitwise ANDed with both the reference value
- and the stored stencil value,
- with the ANDed values participating in the comparison.
- </para>
- <para>
- If <emphasis>stencil</emphasis> represents the value stored in the corresponding
- stencil buffer location,
- the following list shows the effect of each comparison function
- that can be specified by <parameter>func</parameter>.
- Only if the comparison succeeds is the pixel passed through
- to the next stage in the rasterization process
- (see <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>).
- All tests treat <emphasis>stencil</emphasis> values as unsigned integers in the range
- <inlineequation><mml:math>
- <!-- eqn: [0, 2 sup n - 1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bitplanes in the stencil buffer.
- </para>
- <para>
- The following values are accepted by <parameter>func</parameter>:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_NEVER</constant></term>
- <listitem>
- <para>
- Always fails.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LESS</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) < ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LEQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) <= ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREATER</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) > ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GEQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) >= ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_EQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) = ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NOTEQUAL</constant></term>
- <listitem>
- <para>
- Passes if ( <parameter>ref</parameter> & <parameter>mask</parameter> ) != ( <emphasis>stencil</emphasis> & <parameter>mask</parameter> ).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALWAYS</constant></term>
- <listitem>
- <para>
- Always passes.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glStencilFuncSeparate</function> is available only if
- the GL version is 2.0 or greater.
- </para>
- <para>
- Initially, the stencil test is disabled.
- If there is no stencil buffer,
- no stencil modification can occur and it is as if
- the stencil test always passes.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>func</parameter> is not one of the eight
- accepted values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilFuncSeparate</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_FUNC</constant>, <constant>GL_STENCIL_VALUE_MASK</constant>,
- <constant>GL_STENCIL_REF</constant>, <constant>GL_STENCIL_BACK_FUNC</constant>,
- <constant>GL_STENCIL_BACK_VALUE_MASK</constant>, <constant>GL_STENCIL_BACK_REF</constant>,
- or <constant>GL_STENCIL_BITS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_TEST</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2006 Khronos Group.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glStencilMask">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glStencilMask</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glStencilMask</refname>
- <refpurpose>control the front and back writing of individual bits in the stencil planes</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glStencilMask</function></funcdef>
- <paramdef>GLuint <parameter>mask</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>mask</parameter></term>
- <listitem>
- <para>
- Specifies a bit mask to enable and disable writing of individual bits
- in the stencil planes.
- Initially, the mask is all 1's.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glStencilMask</function> controls the writing of individual bits in the stencil planes.
- The least significant
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- bits of <parameter>mask</parameter>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bits in the stencil buffer,
- specify a mask.
- Where a 1 appears in the mask,
- it's possible to write to the corresponding bit in the stencil buffer.
- Where a 0 appears,
- the corresponding bit is write-protected.
- Initially, all bits are enabled for writing.
- </para>
- <para>
- There can be two separate <parameter>mask</parameter> writemasks; one affects back-facing polygons, and the other
- affects front-facing polygons as well as other non-polygon primitives.
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry> sets both front
- and back stencil writemasks to the same values. Use <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>
- to set front and back stencil writemasks to different values.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry> is the same as
- calling <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>
- with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilMask</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_WRITEMASK</constant>, <constant>GL_STENCIL_BACK_WRITEMASK</constant>,
- or <constant>GL_STENCIL_BITS</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOpSeparate</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>
+++ /dev/null
-<?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="glStencilMaskSeparate">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glStencilMaskSeparate</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glStencilMaskSeparate</refname>
- <refpurpose>control the front and/or back writing of individual bits in the stencil planes</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glStencilMaskSeparate</function></funcdef>
- <paramdef>GLenum <parameter>face</parameter></paramdef>
- <paramdef>GLuint <parameter>mask</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>face</parameter></term>
- <listitem>
- <para>
- Specifies whether the front and/or back stencil writemask is updated.
- Three symbolic constants are valid:
- <constant>GL_FRONT</constant>,
- <constant>GL_BACK</constant>, and
- <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>mask</parameter></term>
- <listitem>
- <para>
- Specifies a bit mask to enable and disable writing of individual bits
- in the stencil planes.
- Initially, the mask is all 1's.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glStencilMaskSeparate</function> controls the writing of individual bits in the stencil planes.
- The least significant
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- bits of <parameter>mask</parameter>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the number of bits in the stencil buffer,
- specify a mask.
- Where a 1 appears in the mask,
- it's possible to write to the corresponding bit in the stencil buffer.
- Where a 0 appears,
- the corresponding bit is write-protected.
- Initially, all bits are enabled for writing.
- </para>
- <para>
- There can be two separate <parameter>mask</parameter> writemasks; one affects back-facing polygons, and the other
- affects front-facing polygons as well as other non-polygon primitives.
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry> sets both front
- and back stencil writemasks to the same values, as if
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry> were called
- with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glStencilMaskSeparate</function> is available only if
- the GL version is 2.0 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilMaskSeparate</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_WRITEMASK</constant>, <constant>GL_STENCIL_BACK_WRITEMASK</constant>,
- or <constant>GL_STENCIL_BITS</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glColorMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glIndexMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2006 Khronos Group.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glStencilOp">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glStencilOp</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glStencilOp</refname>
- <refpurpose>set front and back stencil test actions</refpurpose>
- </refnamediv>
- <!-- eqn: ignoring delim $$ -->
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glStencilOp</function></funcdef>
- <paramdef>GLenum <parameter>sfail</parameter></paramdef>
- <paramdef>GLenum <parameter>dpfail</parameter></paramdef>
- <paramdef>GLenum <parameter>dppass</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>sfail</parameter></term>
- <listitem>
- <para>
- Specifies the action to take when the stencil test fails.
- Eight symbolic constants are accepted:
- <constant>GL_KEEP</constant>,
- <constant>GL_ZERO</constant>,
- <constant>GL_REPLACE</constant>,
- <constant>GL_INCR</constant>,
- <constant>GL_INCR_WRAP</constant>,
- <constant>GL_DECR</constant>,
- <constant>GL_DECR_WRAP</constant>, and
- <constant>GL_INVERT</constant>. The initial value is <constant>GL_KEEP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dpfail</parameter></term>
- <listitem>
- <para>
- Specifies the stencil action when the stencil test passes,
- but the depth test fails.
- <parameter>dpfail</parameter> accepts the same symbolic constants as <parameter>sfail</parameter>. The initial value
- is <constant>GL_KEEP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dppass</parameter></term>
- <listitem>
- <para>
- Specifies the stencil action when both the stencil test and the depth
- test pass, or when the stencil test passes and either there is no
- depth buffer or depth testing is not enabled.
- <parameter>dppass</parameter> accepts the same symbolic constants as <parameter>sfail</parameter>. The initial value
- is <constant>GL_KEEP</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Stenciling,
- like depth-buffering,
- enables and disables drawing on a per-pixel basis.
- You draw into the stencil planes using GL drawing primitives,
- then render geometry and images,
- using the stencil planes to mask out portions of the screen.
- Stenciling is typically used in multipass rendering algorithms
- to achieve special effects,
- such as decals,
- outlining,
- and constructive solid geometry rendering.
- </para>
- <para>
- The stencil test conditionally eliminates a pixel based on the outcome
- of a comparison between the value in the stencil buffer and a
- reference value. To enable and disable the test, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_TEST</constant>; to control it, call
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> or
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- <para>
- There can be two separate sets of <parameter>sfail</parameter>, <parameter>dpfail</parameter>, and
- <parameter>dppass</parameter> parameters; one affects back-facing polygons, and the other
- affects front-facing polygons as well as other non-polygon primitives.
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry> sets both front
- and back stencil state to the same values. Use <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
- to set front and back stencil state to different values.
- </para>
- <para>
- <function>glStencilOp</function> takes three arguments that indicate what happens
- to the stored stencil value while stenciling is enabled.
- If the stencil test fails,
- no change is made to the pixel's color or depth buffers,
- and <parameter>sfail</parameter> specifies what happens to the stencil buffer contents.
- The following eight actions are possible.
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_KEEP</constant></term>
- <listitem>
- <para>
- Keeps the current value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ZERO</constant></term>
- <listitem>
- <para>
- Sets the stencil buffer value to 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_REPLACE</constant></term>
- <listitem>
- <para>
- Sets the stencil buffer value to <emphasis>ref</emphasis>,
- as specified by <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INCR</constant></term>
- <listitem>
- <para>
- Increments the current stencil buffer value.
- Clamps to the maximum representable unsigned value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INCR_WRAP</constant></term>
- <listitem>
- <para>
- Increments the current stencil buffer value.
- Wraps stencil buffer value to zero when incrementing the maximum
- representable unsigned value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DECR</constant></term>
- <listitem>
- <para>
- Decrements the current stencil buffer value.
- Clamps to 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DECR_WRAP</constant></term>
- <listitem>
- <para>
- Decrements the current stencil buffer value.
- Wraps stencil buffer value to the maximum representable unsigned value when
- decrementing a stencil buffer value of zero.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INVERT</constant></term>
- <listitem>
- <para>
- Bitwise inverts the current stencil buffer value.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Stencil buffer values are treated as unsigned integers.
- When incremented and decremented,
- values are clamped to 0 and
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the value returned by querying <constant>GL_STENCIL_BITS</constant>.
- </para>
- <para>
- The other two arguments to <function>glStencilOp</function> specify stencil buffer actions
- that depend on whether subsequent depth buffer tests succeed (<parameter>dppass</parameter>)
- or fail (<parameter>dpfail</parameter>) (see
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>).
- The actions are specified using the same eight symbolic constants as <parameter>sfail</parameter>.
- Note that <parameter>dpfail</parameter> is ignored when there is no depth buffer,
- or when the depth buffer is not enabled.
- In these cases, <parameter>sfail</parameter> and <parameter>dppass</parameter> specify stencil action when the
- stencil test fails and passes,
- respectively.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <constant>GL_DECR_WRAP</constant> and <constant>GL_INCR_WRAP</constant> are available only if the GL
- version is 1.4 or greater.
- </para>
- <para>
- Initially the stencil test is disabled.
- If there is no stencil buffer,
- no stencil modification can occur
- and it is as if the stencil tests always pass,
- regardless of any call to <function>glStencilOp</function>.
- </para>
- <para>
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry> is the same as
- calling <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry>
- with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>sfail</parameter>,
- <parameter>dpfail</parameter>, or <parameter>dppass</parameter> is any value other than the eight defined constant values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilOp</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_FAIL</constant>, <constant>GL_STENCIL_PASS_DEPTH_PASS</constant>,
- <constant>GL_STENCIL_PASS_DEPTH_FAIL</constant>, <constant>GL_STENCIL_BACK_FAIL</constant>,
- <constant>GL_STENCIL_BACK_PASS_DEPTH_PASS</constant>, <constant>GL_STENCIL_BACK_PASS_DEPTH_FAIL</constant>,
- or <constant>GL_STENCIL_BITS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_TEST</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOpSeparate</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>
+++ /dev/null
-<?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="glStencilOpSeparate">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glStencilOpSeparate</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glStencilOpSeparate</refname>
- <refpurpose>set front and/or back stencil test actions</refpurpose>
- </refnamediv>
- <!-- eqn: ignoring delim $$ -->
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glStencilOpSeparate</function></funcdef>
- <paramdef>GLenum <parameter>face</parameter></paramdef>
- <paramdef>GLenum <parameter>sfail</parameter></paramdef>
- <paramdef>GLenum <parameter>dpfail</parameter></paramdef>
- <paramdef>GLenum <parameter>dppass</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>face</parameter></term>
- <listitem>
- <para>
- Specifies whether front and/or back stencil state is updated.
- Three symbolic constants are valid:
- <constant>GL_FRONT</constant>,
- <constant>GL_BACK</constant>, and
- <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>sfail</parameter></term>
- <listitem>
- <para>
- Specifies the action to take when the stencil test fails.
- Eight symbolic constants are accepted:
- <constant>GL_KEEP</constant>,
- <constant>GL_ZERO</constant>,
- <constant>GL_REPLACE</constant>,
- <constant>GL_INCR</constant>,
- <constant>GL_INCR_WRAP</constant>,
- <constant>GL_DECR</constant>,
- <constant>GL_DECR_WRAP</constant>, and
- <constant>GL_INVERT</constant>. The initial value is <constant>GL_KEEP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dpfail</parameter></term>
- <listitem>
- <para>
- Specifies the stencil action when the stencil test passes,
- but the depth test fails.
- <parameter>dpfail</parameter> accepts the same symbolic constants as <parameter>sfail</parameter>. The initial value
- is <constant>GL_KEEP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>dppass</parameter></term>
- <listitem>
- <para>
- Specifies the stencil action when both the stencil test and the depth
- test pass, or when the stencil test passes and either there is no
- depth buffer or depth testing is not enabled.
- <parameter>dppass</parameter> accepts the same symbolic constants as <parameter>sfail</parameter>. The initial value
- is <constant>GL_KEEP</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Stenciling,
- like depth-buffering,
- enables and disables drawing on a per-pixel basis.
- You draw into the stencil planes using GL drawing primitives,
- then render geometry and images,
- using the stencil planes to mask out portions of the screen.
- Stenciling is typically used in multipass rendering algorithms
- to achieve special effects,
- such as decals,
- outlining,
- and constructive solid geometry rendering.
- </para>
- <para>
- The stencil test conditionally eliminates a pixel based on the outcome
- of a comparison between the value in the stencil buffer and a
- reference value. To enable and disable the test, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_TEST</constant>; to control it, call
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry> or
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>.
- </para>
- <para>
- There can be two separate sets of <parameter>sfail</parameter>, <parameter>dpfail</parameter>, and
- <parameter>dppass</parameter> parameters; one affects back-facing polygons, and the other
- affects front-facing polygons as well as other non-polygon primitives.
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry> sets both front
- and back stencil state to the same values, as if
- <citerefentry><refentrytitle>glStencilOpSeparate</refentrytitle></citerefentry> were called
- with <parameter>face</parameter> set to <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- <para>
- <function>glStencilOpSeparate</function> takes three arguments that indicate what happens
- to the stored stencil value while stenciling is enabled.
- If the stencil test fails,
- no change is made to the pixel's color or depth buffers,
- and <parameter>sfail</parameter> specifies what happens to the stencil buffer contents.
- The following eight actions are possible.
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_KEEP</constant></term>
- <listitem>
- <para>
- Keeps the current value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ZERO</constant></term>
- <listitem>
- <para>
- Sets the stencil buffer value to 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_REPLACE</constant></term>
- <listitem>
- <para>
- Sets the stencil buffer value to <emphasis>ref</emphasis>,
- as specified by <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INCR</constant></term>
- <listitem>
- <para>
- Increments the current stencil buffer value.
- Clamps to the maximum representable unsigned value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INCR_WRAP</constant></term>
- <listitem>
- <para>
- Increments the current stencil buffer value.
- Wraps stencil buffer value to zero when incrementing the maximum
- representable unsigned value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DECR</constant></term>
- <listitem>
- <para>
- Decrements the current stencil buffer value.
- Clamps to 0.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DECR_WRAP</constant></term>
- <listitem>
- <para>
- Decrements the current stencil buffer value.
- Wraps stencil buffer value to the maximum representable unsigned value when
- decrementing a stencil buffer value of zero.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INVERT</constant></term>
- <listitem>
- <para>
- Bitwise inverts the current stencil buffer value.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Stencil buffer values are treated as unsigned integers.
- When incremented and decremented,
- values are clamped to 0 and
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n - 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the value returned by querying <constant>GL_STENCIL_BITS</constant>.
- </para>
- <para>
- The other two arguments to <function>glStencilOpSeparate</function> specify stencil buffer actions
- that depend on whether subsequent depth buffer tests succeed (<parameter>dppass</parameter>)
- or fail (<parameter>dpfail</parameter>) (see
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>).
- The actions are specified using the same eight symbolic constants as <parameter>sfail</parameter>.
- Note that <parameter>dpfail</parameter> is ignored when there is no depth buffer,
- or when the depth buffer is not enabled.
- In these cases, <parameter>sfail</parameter> and <parameter>dppass</parameter> specify stencil action when the
- stencil test fails and passes,
- respectively.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glStencilOpSeparate</function> is available only if
- the GL version is 2.0 or greater.
- </para>
- <para>
- Initially the stencil test is disabled.
- If there is no stencil buffer,
- no stencil modification can occur
- and it is as if the stencil test always passes.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>face</parameter> is any value
- other than <constant>GL_FRONT</constant>, <constant>GL_BACK</constant>, or <constant>GL_FRONT_AND_BACK</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>sfail</parameter>,
- <parameter>dpfail</parameter>, or <parameter>dppass</parameter> is any value other than the eight defined constant values.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glStencilOpSeparate</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_STENCIL_FAIL</constant>, <constant>GL_STENCIL_PASS_DEPTH_PASS</constant>,
- <constant>GL_STENCIL_PASS_DEPTH_FAIL</constant>, <constant>GL_STENCIL_BACK_FAIL</constant>,
- <constant>GL_STENCIL_BACK_PASS_DEPTH_PASS</constant>, <constant>GL_STENCIL_BACK_PASS_DEPTH_FAIL</constant>,
- or <constant>GL_STENCIL_BITS</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_STENCIL_TEST</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glAlphaFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBlendFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDepthFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLogicOp</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFunc</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilFuncSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMask</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilMaskSeparate</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glStencilOp</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2006 Khronos Group.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glTexImage1D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexImage1D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexImage1D</refname>
- <refpurpose>specify a one-dimensional texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexImage1D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>internalFormat</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_1D</constant> or <constant>GL_PROXY_TEXTURE_1D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalFormat</parameter></term>
- <listitem>
- <para>
- Specifies the number of color components in the texture.
- Must be 1, 2, 3, or 4, or one of the following symbolic constants:
- <constant>GL_ALPHA</constant>,
- <constant>GL_ALPHA4</constant>,
- <constant>GL_ALPHA8</constant>,
- <constant>GL_ALPHA12</constant>,
- <constant>GL_ALPHA16</constant>,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_DEPTH_COMPONENT</constant>,
- <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>,
- <constant>GL_DEPTH_COMPONENT32</constant>,
- <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE4</constant>,
- <constant>GL_LUMINANCE8</constant>,
- <constant>GL_LUMINANCE12</constant>,
- <constant>GL_LUMINANCE16</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>,
- <constant>GL_LUMINANCE4_ALPHA4</constant>,
- <constant>GL_LUMINANCE6_ALPHA2</constant>,
- <constant>GL_LUMINANCE8_ALPHA8</constant>,
- <constant>GL_LUMINANCE12_ALPHA4</constant>,
- <constant>GL_LUMINANCE12_ALPHA12</constant>,
- <constant>GL_LUMINANCE16_ALPHA16</constant>,
- <constant>GL_INTENSITY</constant>,
- <constant>GL_INTENSITY4</constant>,
- <constant>GL_INTENSITY8</constant>,
- <constant>GL_INTENSITY12</constant>,
- <constant>GL_INTENSITY16</constant>,
- <constant>GL_R3_G3_B2</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_RGB4</constant>,
- <constant>GL_RGB5</constant>,
- <constant>GL_RGB8</constant>,
- <constant>GL_RGB10</constant>,
- <constant>GL_RGB12</constant>,
- <constant>GL_RGB16</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_RGBA2</constant>,
- <constant>GL_RGBA4</constant>,
- <constant>GL_RGB5_A1</constant>,
- <constant>GL_RGBA8</constant>,
- <constant>GL_RGB10_A2</constant>,
- <constant>GL_RGBA12</constant>,
- <constant>GL_RGBA16</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>,
- <constant>GL_SLUMINANCE8_ALPHA8</constant>,
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>, or
- <constant>GL_SRGB8_ALPHA8</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support texture images that are at least 64 texels
- wide. The height of the 1D texture image is 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image
- onto each graphical primitive for which texturing is enabled.
- To enable and disable one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>.
- </para>
- <para>
- Texture images are defined with <function>glTexImage1D</function>.
- The arguments describe the parameters of the texture image,
- such as width,
- width of the border,
- level-of-detail number
- (see <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>),
- and the internal resolution and format used to store the image.
- The last three arguments describe how the image is represented in
- memory; they are identical to the pixel formats used for
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_1D</constant>, no data is read from <parameter>data</parameter>, but
- all of the texture image state is recalculated, checked for
- consistency, and checked against the implementation's capabilities.
- If the implementation cannot handle a texture of the
- requested texture size, it sets all of the image state to 0,
- but does not generate an error (see <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an
- entire mipmap array, use an image array level greater than or equal to
- 1.
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant>,
- data is read from <parameter>data</parameter> as a sequence of signed or unsigned bytes,
- shorts,
- or longs,
- or single-precision floating-point values,
- depending on <parameter>type</parameter>.
- These values are grouped into sets of one,
- two,
- three,
- or four values,
- depending on <parameter>format</parameter>,
- to form elements.
- If <parameter>type</parameter> is <constant>GL_BITMAP</constant>,
- the data is considered as a string of unsigned bytes
- (and <parameter>format</parameter> must be <constant>GL_COLOR_INDEX</constant>).
- Each data byte is treated as eight 1-bit elements,
- with bit ordering determined by <constant>GL_UNPACK_LSB_FIRST</constant>
- (see <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>).
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- <para>
- The first element corresponds to the left end of the texture array.
- Subsequent elements progress left-to-right through the remaining texels
- in the texture array.
- The final element corresponds to the right end of the texture array.
- </para>
- <para>
- <parameter>format</parameter> determines the composition of each element in <parameter>data</parameter>.
- It can assume one of these symbolic values:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_COLOR_INDEX</constant></term>
- <listitem>
- <para>
- Each element is a single value,
- a color index.
- The GL converts it to fixed point
- (with an unspecified number of zero bits to the right of the binary point),
- shifted left or right depending on the value and sign of <constant>GL_INDEX_SHIFT</constant>,
- and added to <constant>GL_INDEX_OFFSET</constant>
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- The resulting index is converted to a set of color components
- using the
- <constant>GL_PIXEL_MAP_I_TO_R</constant>,
- <constant>GL_PIXEL_MAP_I_TO_G</constant>,
- <constant>GL_PIXEL_MAP_I_TO_B</constant>, and
- <constant>GL_PIXEL_MAP_I_TO_A</constant> tables,
- and clamped to the range [0,1].
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED</constant></term>
- <listitem>
- <para>
- Each element is a single red component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for green and blue, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN</constant></term>
- <listitem>
- <para>
- Each element is a single green component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red and blue, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE</constant></term>
- <listitem>
- <para>
- Each element is a single blue component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red and green, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA</constant></term>
- <listitem>
- <para>
- Each element is a single alpha component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red, green, and blue.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INTENSITY</constant></term>
- <listitem>
- <para>
- Each element is a single intensity value.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the intensity value
- three times for red, green, blue, and alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGB</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGR</constant></term>
- <listitem>
- <para>
- Each element is an RGB triple.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGBA</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGRA</constant></term>
- <listitem>
- <para>
- Each element contains all four components.
- Each component is multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE</constant></term>
- <listitem>
- <para>
- Each element is a single luminance value.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the luminance value
- three times for red, green, and blue and attaching 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE_ALPHA</constant></term>
- <listitem>
- <para>
- Each element is a luminance/alpha pair.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the luminance value
- three times for red, green, and blue.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1] (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_COMPONENT</constant></term>
- <listitem>
- <para>
- Each element is a single depth value.
- The GL converts it to floating point, multiplies by the signed scale factor
- <constant>GL_DEPTH_SCALE</constant>, adds the signed bias <constant>GL_DEPTH_BIAS</constant>,
- and clamps to the range [0,1] (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Refer to the <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> reference page for a description of
- the acceptable values for the <parameter>type</parameter> parameter.
- </para>
- <para>
- If an application wants to store the texture at a certain
- resolution or in a certain format, it can request the resolution
- and format with <parameter>internalFormat</parameter>. The GL will choose an internal
- representation that closely approximates that requested by <parameter>internalFormat</parameter>, but
- it may not match exactly.
- (The representations specified by <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>, <constant>GL_RGB</constant>,
- and <constant>GL_RGBA</constant> must match exactly. The numeric values 1, 2, 3, and 4
- may also be used to specify the above representations.)
- </para>
- <para>
- If the <parameter>internalFormat</parameter> parameter is one of the generic compressed formats,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_RGB</constant>, or
- <constant>GL_COMPRESSED_RGBA</constant>, the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
- </para>
- <para>
- If the <parameter>internalFormat</parameter> parameter is
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, or
- <constant>GL_SLUMINANCE8_ALPHA8</constant>, the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- to a linear component
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is:
- </para>
- <para>
- <inlineequation><mml:math>
- <mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mo>{</mml:mo>
-
- <mml:mtable columnalign="left">
- <mml:mtr>
- <mml:mtd columnalign="left">
- <mml:mfrac>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mn>12.92</mml:mn>
- </mml:mfrac>
- </mml:mtd>
- <mml:mtd columnalign="left">
- <mml:mrow>
- <mml:mspace width="1ex"/>
- <mml:mo>if</mml:mo>
- <mml:mspace width="1ex"/>
- </mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>≤</mml:mo>
- <mml:mn>0.04045</mml:mn>
- </mml:mtd>
- </mml:mtr>
- <mml:mtr>
- <mml:mtd columnalign="left">
- <mml:msup>
- <mml:mrow>
- <mml:mo>(</mml:mo>
- <mml:mfrac>
- <mml:mrow>
- <mml:msub>
- <mml:mi>c</mml:mi>
- <mml:mi>s</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>0.055</mml:mn>
- </mml:mrow>
- <mml:mn>1.055</mml:mn>
- </mml:mfrac>
- <mml:mo>)</mml:mo>
- </mml:mrow>
- <mml:mn>2.4</mml:mn>
- </mml:msup>
- </mml:mtd>
- <mml:mtd columnalign="left">
- <mml:mrow>
- <mml:mspace width="1ex"/>
- <mml:mo>if</mml:mo>
- <mml:mspace width="1ex"/>
- </mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>></mml:mo>
- <mml:mn>0.04045</mml:mn>
- </mml:mtd>
- </mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mrow>
- </mml:math>
- </inlineequation>
- </para>
- <para>
- Assume
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is the sRGB component in the range [0,1].
- </para>
- <para>
- Use the <constant>GL_PROXY_TEXTURE_1D</constant> target to try out a resolution and
- format. The implementation will
- update and recompute its best match for the requested storage resolution
- and format. To then query this state, call <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- If the texture cannot be accommodated, texture state is set to 0.
- </para>
- <para>
- A one-component texture image uses only the red component of the RGBA
- color from <parameter>data</parameter>.
- A two-component image uses the R and A values.
- A three-component image uses the R, G, and B values.
- A four-component image uses all of the RGBA components.
- </para>
- <para>
- Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures during texture filtering and application. Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> for details on texture comparison.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- If the <code>ARB_imaging</code> extension is supported, RGBA elements may
- also be processed by the imaging pipeline. The following stages may be
- applied to an RGBA color before color component clamping to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>:
- </para>
- <variablelist>
- <varlistentry>
- <term>1. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>2. One-dimensional convolution filtering, if enabled. See</term>
- <listitem>
- <para>
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>.
- </para>
- <para>
- If a convolution filter changes the <parameter>width</parameter> of the texture (by
- processing with a <constant>GL_CONVOLUTION_BORDER_MODE</constant> of <constant>GL_REDUCE</constant>, for
- example), the <parameter>width</parameter> must
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- for some
- integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>,
- after filtering.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>3. RGBA components may be multiplied by <constant>GL_POST_CONVOLUTION_c_SCALE</constant>,</term>
- <listitem>
- <para>
- and added to <constant>GL_POST_CONVOLUTION_c_BIAS</constant>, if enabled. See
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>4. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>5. Transformation by the color matrix.</term>
- <listitem>
- <para>
- See <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>6. RGBA components may be multiplied by <constant>GL_POST_COLOR_MATRIX_c_SCALE</constant>,</term>
- <listitem>
- <para>
- and added to <constant>GL_POST_COLOR_MATRIX_c_BIAS</constant>, if enabled. See
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>7. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The texture image can be represented by the same data formats
- as the pixels in a <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> command,
- except that <constant>GL_STENCIL_INDEX</constant>
- cannot be used.
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- <constant>GL_PROXY_TEXTURE_1D</constant> may be used only if the GL version is 1.1 or greater.
- </para>
- <para>
- Internal formats other than 1, 2, 3, or 4 may be
- used only if the GL version is 1.1 or greater.
- </para>
- <para>
- In GL version 1.1 or greater,
- <parameter>data</parameter> may be a null pointer. In this case texture memory is
- allocated to accommodate a texture of width <parameter>width</parameter>.
- You can then download subtextures to initialize the
- texture memory. The image is undefined if the program tries to apply
- an uninitialized portion of the texture image to a primitive.
- </para>
- <para>
- Formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- When the <code>ARB_multitexture</code> extension is supported, or the GL version is 1.3 or greater, <function>glTexImage1D</function>
- specifies the one-dimensional texture for the current texture unit,
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- <para>
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, and <constant>GL_DEPTH_COMPONENT32</constant> are available only
- if the GL version is 1.4 or greater.
- </para>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- <para>
- The
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, and
- <constant>GL_SLUMINANCE8_ALPHA8</constant>
- internal formats are only available if the GL version is 2.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_1D</constant>
- or <constant>GL_PROXY_TEXTURE_1D</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted
- format constant. Format constants other than <constant>GL_STENCIL_INDEX</constant>
- are accepted.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and
- <parameter>format</parameter> is not <constant>GL_COLOR_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2 (max):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalFormat</parameter> is not 1, 2, 3, 4, or
- one of the accepted resolution and format symbolic constants.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than 0
- or greater than 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter> cannot be represented as
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2(border):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer value of <emphasis>n</emphasis>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant> and <parameter>internalFormat</parameter> is not
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalFormat</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>, and <parameter>format</parameter> is
- not <constant>GL_DEPTH_COMPONENT</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexImage1D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glTexImage2D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexImage2D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexImage2D</refname>
- <refpurpose>specify a two-dimensional texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexImage2D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>internalFormat</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_2D</constant>, <constant>GL_PROXY_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>, or
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalFormat</parameter></term>
- <listitem>
- <para>
- Specifies the number of color components in the texture.
- Must be 1, 2, 3, or 4, or one of the following symbolic constants:
- <constant>GL_ALPHA</constant>,
- <constant>GL_ALPHA4</constant>,
- <constant>GL_ALPHA8</constant>,
- <constant>GL_ALPHA12</constant>,
- <constant>GL_ALPHA16</constant>,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_DEPTH_COMPONENT</constant>,
- <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>,
- <constant>GL_DEPTH_COMPONENT32</constant>,
- <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE4</constant>,
- <constant>GL_LUMINANCE8</constant>,
- <constant>GL_LUMINANCE12</constant>,
- <constant>GL_LUMINANCE16</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>,
- <constant>GL_LUMINANCE4_ALPHA4</constant>,
- <constant>GL_LUMINANCE6_ALPHA2</constant>,
- <constant>GL_LUMINANCE8_ALPHA8</constant>,
- <constant>GL_LUMINANCE12_ALPHA4</constant>,
- <constant>GL_LUMINANCE12_ALPHA12</constant>,
- <constant>GL_LUMINANCE16_ALPHA16</constant>,
- <constant>GL_INTENSITY</constant>,
- <constant>GL_INTENSITY4</constant>,
- <constant>GL_INTENSITY8</constant>,
- <constant>GL_INTENSITY12</constant>,
- <constant>GL_INTENSITY16</constant>,
- <constant>GL_R3_G3_B2</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_RGB4</constant>,
- <constant>GL_RGB5</constant>,
- <constant>GL_RGB8</constant>,
- <constant>GL_RGB10</constant>,
- <constant>GL_RGB12</constant>,
- <constant>GL_RGB16</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_RGBA2</constant>,
- <constant>GL_RGBA4</constant>,
- <constant>GL_RGB5_A1</constant>,
- <constant>GL_RGBA8</constant>,
- <constant>GL_RGB10_A2</constant>,
- <constant>GL_RGBA12</constant>,
- <constant>GL_RGBA16</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>,
- <constant>GL_SLUMINANCE8_ALPHA8</constant>,
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>, or
- <constant>GL_SRGB8_ALPHA8</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support texture images that are at least 64 texels
- wide.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup m + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>.
- All
- implementations support texture images that are at least 64 texels
- high.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable two-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant>. To enable and disable texturing using cube-mapped texture, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_CUBE_MAP</constant>.
- </para>
- <para>
- To define texture images, call <function>glTexImage2D</function>.
- The arguments describe the parameters of the texture image,
- such as height,
- width,
- width of the border,
- level-of-detail number
- (see <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>),
- and number of color components provided.
- The last three arguments describe how the image is represented in memory;
- they are identical to the pixel formats used for <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_2D</constant> or <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>, no data is read from <parameter>data</parameter>, but
- all of the texture image state is recalculated, checked for
- consistency, and checked
- against the implementation's capabilities. If the implementation cannot
- handle a texture of the requested texture size, it sets
- all of the image state to 0,
- but does not generate an error (see <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an
- entire mipmap array, use an image array level greater than or equal to
- 1.
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_TEXTURE_2D</constant>, or one of the <constant>GL_TEXTURE_CUBE_MAP</constant>
- targets, data is read from <parameter>data</parameter> as a sequence of signed or unsigned
- bytes, shorts, or longs, or single-precision floating-point values,
- depending on <parameter>type</parameter>. These values are grouped into sets of one, two,
- three, or four values, depending on <parameter>format</parameter>, to form elements. If <parameter>type</parameter>
- is <constant>GL_BITMAP</constant>, the data is considered as a string of unsigned bytes
- (and <parameter>format</parameter> must be <constant>GL_COLOR_INDEX</constant>).
- Each data byte is treated as eight 1-bit elements,
- with bit ordering determined by <constant>GL_UNPACK_LSB_FIRST</constant>
- (see <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>).
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- <para>
- The first element corresponds to the lower left corner of the texture
- image.
- Subsequent elements progress left-to-right through the remaining texels
- in the lowest row of the texture image, and then in successively higher
- rows of the texture image.
- The final element corresponds to the upper right corner of the texture
- image.
- </para>
- <para>
- <parameter>format</parameter> determines the composition of each element in <parameter>data</parameter>.
- It can assume one of these symbolic values:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_COLOR_INDEX</constant></term>
- <listitem>
- <para>
- Each element is a single value,
- a color index.
- The GL converts it to fixed point
- (with an unspecified number of zero bits to the right of the binary point),
- shifted left or right depending on the value and sign of <constant>GL_INDEX_SHIFT</constant>,
- and added to <constant>GL_INDEX_OFFSET</constant>
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- The resulting index is converted to a set of color components
- using the
- <constant>GL_PIXEL_MAP_I_TO_R</constant>,
- <constant>GL_PIXEL_MAP_I_TO_G</constant>,
- <constant>GL_PIXEL_MAP_I_TO_B</constant>, and
- <constant>GL_PIXEL_MAP_I_TO_A</constant> tables,
- and clamped to the range [0,1].
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED</constant></term>
- <listitem>
- <para>
- Each element is a single red component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for green and blue, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN</constant></term>
- <listitem>
- <para>
- Each element is a single green component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red and blue, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE</constant></term>
- <listitem>
- <para>
- Each element is a single blue component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red and green, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA</constant></term>
- <listitem>
- <para>
- Each element is a single alpha component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red, green, and blue.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INTENSITY</constant></term>
- <listitem>
- <para>
- Each element is a single intensity value.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the intensity value
- three times for red, green, blue, and alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGB</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGR</constant></term>
- <listitem>
- <para>
- Each element is an RGB triple.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGBA</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGRA</constant></term>
- <listitem>
- <para>
- Each element contains all four components.
- Each component is multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE</constant></term>
- <listitem>
- <para>
- Each element is a single luminance value.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the luminance value
- three times for red, green, and blue and attaching 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE_ALPHA</constant></term>
- <listitem>
- <para>
- Each element is a luminance/alpha pair.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the luminance value
- three times for red, green, and blue.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1] (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_COMPONENT</constant></term>
- <listitem>
- <para>
- Each element is a single depth value.
- The GL converts it to floating point, multiplies by the signed scale factor
- <constant>GL_DEPTH_SCALE</constant>, adds the signed bias <constant>GL_DEPTH_BIAS</constant>,
- and clamps to the range [0,1] (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Refer to the <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> reference page for a description of
- the acceptable values for the <parameter>type</parameter> parameter.
- </para>
- <para>
- If an application wants to store the texture at a certain
- resolution or in a certain format, it can request the resolution
- and format with <parameter>internalFormat</parameter>. The GL will choose an internal
- representation that closely approximates that requested by <parameter>internalFormat</parameter>, but
- it may not match exactly.
- (The representations specified by <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>, <constant>GL_RGB</constant>,
- and <constant>GL_RGBA</constant> must match exactly. The numeric values 1, 2, 3, and 4
- may also be used to specify the above representations.)
- </para>
- <para>
- If the <parameter>internalFormat</parameter> parameter is one of the generic compressed formats,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_RGB</constant>, or
- <constant>GL_COMPRESSED_RGBA</constant>, the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
- </para>
- <para>
- If the <parameter>internalFormat</parameter> parameter is
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, or
- <constant>GL_SLUMINANCE8_ALPHA8</constant>, the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- to a linear component
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is:
- </para>
- <para>
- <inlineequation><mml:math>
- <mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mo>{</mml:mo>
-
- <mml:mtable columnalign="left">
- <mml:mtr>
- <mml:mtd columnalign="left">
- <mml:mfrac>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mn>12.92</mml:mn>
- </mml:mfrac>
- </mml:mtd>
- <mml:mtd columnalign="left">
- <mml:mrow>
- <mml:mspace width="1ex"/>
- <mml:mo>if</mml:mo>
- <mml:mspace width="1ex"/>
- </mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>≤</mml:mo>
- <mml:mn>0.04045</mml:mn>
- </mml:mtd>
- </mml:mtr>
- <mml:mtr>
- <mml:mtd columnalign="left">
- <mml:msup>
- <mml:mrow>
- <mml:mo>(</mml:mo>
- <mml:mfrac>
- <mml:mrow>
- <mml:msub>
- <mml:mi>c</mml:mi>
- <mml:mi>s</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>0.055</mml:mn>
- </mml:mrow>
- <mml:mn>1.055</mml:mn>
- </mml:mfrac>
- <mml:mo>)</mml:mo>
- </mml:mrow>
- <mml:mn>2.4</mml:mn>
- </mml:msup>
- </mml:mtd>
- <mml:mtd columnalign="left">
- <mml:mrow>
- <mml:mspace width="1ex"/>
- <mml:mo>if</mml:mo>
- <mml:mspace width="1ex"/>
- </mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>></mml:mo>
- <mml:mn>0.04045</mml:mn>
- </mml:mtd>
- </mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mrow>
- </mml:math>
- </inlineequation>
- </para>
- <para>
- Assume
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is the sRGB component in the range [0,1].
- </para>
- <para>
- Use the <constant>GL_PROXY_TEXTURE_2D</constant> or <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant> target to try out a resolution and
- format. The implementation will
- update and recompute its best match for the requested storage resolution
- and format. To then query this state, call <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- If the texture cannot be accommodated, texture state is set to 0.
- </para>
- <para>
- A one-component texture image uses only the red component of the RGBA
- color extracted from <parameter>data</parameter>.
- A two-component image uses the R and A values.
- A three-component image uses the R, G, and B values.
- A four-component image uses all of the RGBA components.
- </para>
- <para>
- Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA textures during texture filtering and application. Image-based shadowing can be enabled by comparing texture r coordinates to depth texture values to generate a boolean result. See <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> for details on texture comparison.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- If the <code>ARB_imaging</code> extension is supported, RGBA elements may
- also be processed by the imaging pipeline. The following stages may be
- applied to an RGBA color before color component clamping to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>:
- </para>
- <variablelist>
- <varlistentry>
- <term>1. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>2. Two-dimensional Convolution filtering, if enabled.</term>
- <listitem>
- <para>
- See <citerefentry><refentrytitle>glConvolutionFilter1D</refentrytitle></citerefentry>.
- </para>
- <para>
- If a convolution filter changes the <parameter>width</parameter> of the texture (by
- processing with a <constant>GL_CONVOLUTION_BORDER_MODE</constant> of <constant>GL_REDUCE</constant>, for
- example), and the GL does not support non-power-of-two textures, the <parameter>width</parameter> must
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( height ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- for some
- integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>,
- and <parameter>height</parameter> must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup m + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- for some
- integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>,
- after filtering.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>3. RGBA components may be multiplied by <constant>GL_POST_CONVOLUTION_c_SCALE</constant>,</term>
- <listitem>
- <para>
- and added to <constant>GL_POST_CONVOLUTION_c_BIAS</constant>, if enabled. See
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>4. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>5. Transformation by the color matrix.</term>
- <listitem>
- <para>
- See <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>6. RGBA components may be multiplied by <constant>GL_POST_COLOR_MATRIX_c_SCALE</constant>,</term>
- <listitem>
- <para>
- and added to <constant>GL_POST_COLOR_MATRIX_c_BIAS</constant>, if enabled. See
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>7. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- The texture image can be represented by the same data formats
- as the pixels in a <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> command,
- except that <constant>GL_STENCIL_INDEX</constant>
- cannot be used.
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- <function>glTexImage2D</function> and <constant>GL_PROXY_TEXTURE_2D</constant> are available only if the GL
- version is 1.1 or greater.
- </para>
- <para>
- Internal formats other than 1, 2, 3, or 4 may be used only if the GL
- version is 1.1 or greater.
- </para>
- <para>
- In GL version 1.1 or greater, <parameter>data</parameter> may be a null pointer.
- In this case, texture memory is
- allocated to accommodate a texture of width <parameter>width</parameter> and height <parameter>height</parameter>.
- You can then download subtextures to initialize this
- texture memory.
- The image is undefined if the user tries to apply
- an uninitialized portion of the texture image to a primitive.
- </para>
- <para>
- Formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- When the <code>ARB_multitexture</code> extension is supported or the GL version is 1.3 or greater, <function>glTexImage2D</function>
- specifies the two-dimensional texture for the current texture unit,
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- <para>
- <constant>GL_TEXTURE_CUBE_MAP</constant> and <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant> are available only if the GL
- version is 1.3 or greater.
- </para>
- <para>
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, and <constant>GL_DEPTH_COMPONENT32</constant> are available only
- if the GL version is 1.4 or greater.
- </para>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- <para>
- The
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, and
- <constant>GL_SLUMINANCE8_ALPHA8</constant>
- internal formats are only available if the GL version is 2.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_PROXY_TEXTURE_2D</constant>,
- <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is one of the six cube map 2D image targets and the width and height parameters are not equal.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and
- <parameter>format</parameter> is not <constant>GL_COLOR_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>height</parameter> is less than 0
- or greater than 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2 (max):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalFormat</parameter> is not 1, 2, 3, 4, or one of the
- accepted resolution and format symbolic constants.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>height</parameter> is less than 0
- or greater than 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter> or <parameter>height</parameter> cannot be represented as
- <inlineequation><mml:math>
- <!-- eqn: 2 sup k + 2(border):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">k</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some
- integer value of <emphasis>k</emphasis>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is not
- <constant>GL_TEXTURE_2D</constant> or <constant>GL_PROXY_TEXTURE_2D</constant> and <parameter>internalFormat</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant> and <parameter>internalFormat</parameter> is not
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalFormat</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>, and <parameter>format</parameter> is
- not <constant>GL_DEPTH_COMPONENT</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexImage2D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant> or <constant>GL_TEXTURE_CUBE_MAP</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glConvolutionFilter2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glSeparableFilter2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glTexImage3D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexImage3D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexImage3D</refname>
- <refpurpose>specify a three-dimensional texture image</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexImage3D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>internalFormat</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLsizei <parameter>depth</parameter></paramdef>
- <paramdef>GLint <parameter>border</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_3D</constant> or <constant>GL_PROXY_TEXTURE_3D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>
- is the
- <inlineequation><mml:math>
- <!-- eqn: n sup th:-->
- <mml:msup><mml:mi mathvariant="italic">n</mml:mi>
- <mml:mi mathvariant="italic">th</mml:mi>
- </mml:msup>
- </mml:math></inlineequation>
- mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>internalFormat</parameter></term>
- <listitem>
- <para>
- Specifies the number of color components in the texture.
- Must be 1, 2, 3, or 4, or one of the following symbolic constants:
- <constant>GL_ALPHA</constant>,
- <constant>GL_ALPHA4</constant>,
- <constant>GL_ALPHA8</constant>,
- <constant>GL_ALPHA12</constant>,
- <constant>GL_ALPHA16</constant>,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_RGB</constant>,
- <constant>GL_COMPRESSED_RGBA</constant>,
- <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE4</constant>,
- <constant>GL_LUMINANCE8</constant>,
- <constant>GL_LUMINANCE12</constant>,
- <constant>GL_LUMINANCE16</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>,
- <constant>GL_LUMINANCE4_ALPHA4</constant>,
- <constant>GL_LUMINANCE6_ALPHA2</constant>,
- <constant>GL_LUMINANCE8_ALPHA8</constant>,
- <constant>GL_LUMINANCE12_ALPHA4</constant>,
- <constant>GL_LUMINANCE12_ALPHA12</constant>,
- <constant>GL_LUMINANCE16_ALPHA16</constant>,
- <constant>GL_INTENSITY</constant>,
- <constant>GL_INTENSITY4</constant>,
- <constant>GL_INTENSITY8</constant>,
- <constant>GL_INTENSITY12</constant>,
- <constant>GL_INTENSITY16</constant>,
- <constant>GL_R3_G3_B2</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_RGB4</constant>,
- <constant>GL_RGB5</constant>,
- <constant>GL_RGB8</constant>,
- <constant>GL_RGB10</constant>,
- <constant>GL_RGB12</constant>,
- <constant>GL_RGB16</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_RGBA2</constant>,
- <constant>GL_RGBA4</constant>,
- <constant>GL_RGB5_A1</constant>,
- <constant>GL_RGBA8</constant>,
- <constant>GL_RGB10_A2</constant>,
- <constant>GL_RGBA12</constant>,
- <constant>GL_RGBA16</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>,
- <constant>GL_SLUMINANCE8_ALPHA8</constant>,
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>, or
- <constant>GL_SRGB8_ALPHA8</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">n</mml:mi></mml:math></inlineequation>.
- All
- implementations support 3D texture images that are at least 16 texels
- wide.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup m + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">m</mml:mi></mml:math></inlineequation>.
- All
- implementations support 3D texture images that are at least 16 texels
- high.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>depth</parameter></term>
- <listitem>
- <para>
- Specifies the depth of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be
- <inlineequation><mml:math>
- <!-- eqn: 2 sup k + 2 ( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">k</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some integer
- <inlineequation><mml:math><mml:mi mathvariant="italic">k</mml:mi></mml:math></inlineequation>.
- All
- implementations support 3D texture images that are at least 16 texels
- deep.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>border</parameter></term>
- <listitem>
- <para>
- Specifies the width of the border.
- Must be either 0 or 1.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image
- onto each graphical primitive for which texturing is enabled.
- To enable and disable three-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>.
- </para>
- <para>
- To define texture images, call <function>glTexImage3D</function>.
- The arguments describe the parameters of the texture image,
- such as height,
- width, depth,
- width of the border,
- level-of-detail number
- (see <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>),
- and number of color components provided.
- The last three arguments describe how the image is represented in memory;
- they are identical to the pixel formats used for <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_PROXY_TEXTURE_3D</constant>, no data is read from <parameter>data</parameter>, but
- all of the texture image state is recalculated, checked for
- consistency, and checked
- against the implementation's capabilities. If the implementation cannot
- handle a texture of the requested texture size, it sets
- all of the image state to 0,
- but does not generate an error (see <citerefentry><refentrytitle>glGetError</refentrytitle></citerefentry>). To query for an
- entire mipmap array, use an image array level greater than or equal to
- 1.
- </para>
- <para>
- If <parameter>target</parameter> is <constant>GL_TEXTURE_3D</constant>,
- data is read from <parameter>data</parameter> as a sequence of signed or unsigned bytes,
- shorts,
- or longs,
- or single-precision floating-point values,
- depending on <parameter>type</parameter>.
- These values are grouped into sets of one,
- two,
- three,
- or four values,
- depending on <parameter>format</parameter>,
- to form elements.
- If <parameter>type</parameter> is <constant>GL_BITMAP</constant>,
- the data is considered as a string of unsigned bytes (and
- <parameter>format</parameter> must be <constant>GL_COLOR_INDEX</constant>).
- Each data byte is treated as eight 1-bit elements,
- with bit ordering determined by <constant>GL_UNPACK_LSB_FIRST</constant>
- (see <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>).
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- <para>
- The first element corresponds to the lower left corner of the texture
- image.
- Subsequent elements progress left-to-right through the remaining texels
- in the lowest row of the texture image, and then in successively higher
- rows of the texture image.
- The final element corresponds to the upper right corner of the texture
- image.
- </para>
- <para>
- <parameter>format</parameter> determines the composition of each element in <parameter>data</parameter>.
- It can assume one of these symbolic values:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_COLOR_INDEX</constant></term>
- <listitem>
- <para>
- Each element is a single value,
- a color index.
- The GL converts it to fixed point
- (with an unspecified number of zero bits to the right of the binary point),
- shifted left or right depending on the value and sign of <constant>GL_INDEX_SHIFT</constant>,
- and added to <constant>GL_INDEX_OFFSET</constant>
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- The resulting index is converted to a set of color components
- using the
- <constant>GL_PIXEL_MAP_I_TO_R</constant>,
- <constant>GL_PIXEL_MAP_I_TO_G</constant>,
- <constant>GL_PIXEL_MAP_I_TO_B</constant>, and
- <constant>GL_PIXEL_MAP_I_TO_A</constant> tables,
- and clamped to the range [0,1].
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RED</constant></term>
- <listitem>
- <para>
- Each element is a single red component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for green and blue, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GREEN</constant></term>
- <listitem>
- <para>
- Each element is a single green component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red and blue, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BLUE</constant></term>
- <listitem>
- <para>
- Each element is a single blue component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red and green, and 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_ALPHA</constant></term>
- <listitem>
- <para>
- Each element is a single alpha component.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 0 for red, green, and blue.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_INTENSITY</constant></term>
- <listitem>
- <para>
- Each element is a single intensity value.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the intensity value
- three times for red, green, blue, and alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGB</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGR</constant></term>
- <listitem>
- <para>
- Each element is an RGB triple.
- The GL converts it to floating point and assembles it into an RGBA element
- by attaching 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_RGBA</constant></term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_BGRA</constant></term>
- <listitem>
- <para>
- Each element contains all four components.
- Each component is multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE</constant></term>
- <listitem>
- <para>
- Each element is a single luminance value.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the luminance value
- three times for red, green, and blue and attaching 1 for alpha.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1]
- (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LUMINANCE_ALPHA</constant></term>
- <listitem>
- <para>
- Each element is a luminance/alpha pair.
- The GL converts it to floating point,
- then assembles it into an RGBA element by replicating the luminance value
- three times for red, green, and blue.
- Each component is then multiplied by the signed scale factor <constant>GL_c_SCALE</constant>,
- added to the signed bias <constant>GL_c_BIAS</constant>,
- and clamped to the range [0,1] (see <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Refer to the <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> reference page for a description of
- the acceptable values for the <parameter>type</parameter> parameter.
- </para>
- <para>
- If an application wants to store the texture at a certain
- resolution or in a certain format, it can request the resolution
- and format with <parameter>internalFormat</parameter>. The GL will choose an internal
- representation that closely approximates that requested by <parameter>internalFormat</parameter>, but
- it may not match exactly.
- (The representations specified by <constant>GL_LUMINANCE</constant>,
- <constant>GL_LUMINANCE_ALPHA</constant>, <constant>GL_RGB</constant>,
- and <constant>GL_RGBA</constant> must match exactly. The numeric values 1, 2, 3, and 4
- may also be used to specify the above representations.)
- </para>
- <para>
- If the <parameter>internalFormat</parameter> parameter is one of the generic compressed formats,
- <constant>GL_COMPRESSED_ALPHA</constant>,
- <constant>GL_COMPRESSED_INTENSITY</constant>,
- <constant>GL_COMPRESSED_LUMINANCE</constant>,
- <constant>GL_COMPRESSED_LUMINANCE_ALPHA</constant>,
- <constant>GL_COMPRESSED_RGB</constant>, or
- <constant>GL_COMPRESSED_RGBA</constant>, the GL will replace the internal format with the symbolic constant for a specific internal format and compress the texture before storage. If no corresponding internal format is available, or the GL can not compress that image for any reason, the internal format is instead replaced with a corresponding base internal format.
- </para>
- <para>
- If the <parameter>internalFormat</parameter> parameter is
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, or
- <constant>GL_SLUMINANCE8_ALPHA8</constant>, the texture is treated as if the red, green, blue, or luminance components are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion from the sRGB encoded component
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- to a linear component
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is:
- </para>
- <para>
- <inlineequation><mml:math>
- <mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mo>{</mml:mo>
-
- <mml:mtable columnalign="left">
- <mml:mtr>
- <mml:mtd columnalign="left">
- <mml:mfrac>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mn>12.92</mml:mn>
- </mml:mfrac>
- </mml:mtd>
- <mml:mtd columnalign="left">
- <mml:mrow>
- <mml:mspace width="1ex"/>
- <mml:mo>if</mml:mo>
- <mml:mspace width="1ex"/>
- </mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>≤</mml:mo>
- <mml:mn>0.04045</mml:mn>
- </mml:mtd>
- </mml:mtr>
- <mml:mtr>
- <mml:mtd columnalign="left">
- <mml:msup>
- <mml:mrow>
- <mml:mo>(</mml:mo>
- <mml:mfrac>
- <mml:mrow>
- <mml:msub>
- <mml:mi>c</mml:mi>
- <mml:mi>s</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>0.055</mml:mn>
- </mml:mrow>
- <mml:mn>1.055</mml:mn>
- </mml:mfrac>
- <mml:mo>)</mml:mo>
- </mml:mrow>
- <mml:mn>2.4</mml:mn>
- </mml:msup>
- </mml:mtd>
- <mml:mtd columnalign="left">
- <mml:mrow>
- <mml:mspace width="1ex"/>
- <mml:mo>if</mml:mo>
- <mml:mspace width="1ex"/>
- </mml:mrow>
- <mml:msub>
- <mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- <mml:mo>></mml:mo>
- <mml:mn>0.04045</mml:mn>
- </mml:mtd>
- </mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mrow>
- </mml:math>
- </inlineequation>
- </para>
- <para>
- Assume
- <inlineequation><mml:math>
- <mml:msub><mml:mi mathvariant="italic">c</mml:mi>
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is the sRGB component in the range [0,1].
- </para>
- <para>
- Use the <constant>GL_PROXY_TEXTURE_3D</constant> target to try out a resolution and
- format. The implementation will
- update and recompute its best match for the requested storage resolution
- and format. To then query this state, call <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>.
- If the texture cannot be accommodated, texture state is set to 0.
- </para>
- <para>
- A one-component texture image uses only the red component of the RGBA
- color extracted from <parameter>data</parameter>.
- A two-component image uses the R and A values.
- A three-component image uses the R, G, and B values.
- A four-component image uses all of the RGBA components.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- The texture image can be represented by the same data formats
- as the pixels in a <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry> command,
- except that <constant>GL_STENCIL_INDEX</constant> and <constant>GL_DEPTH_COMPONENT</constant>
- cannot be used.
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- <function>glTexImage3D</function> is available only if the GL version is 1.2 or greater.
- </para>
- <para>
- Internal formats other than 1, 2, 3, or 4 may be used only if the GL
- version is 1.1 or greater.
- </para>
- <para>
- <parameter>data</parameter> may be a null pointer.
- In this case texture memory is
- allocated to accommodate a texture of width <parameter>width</parameter>, height <parameter>height</parameter>,
- and depth <parameter>depth</parameter>.
- You can then download subtextures to initialize this
- texture memory.
- The image is undefined if the user tries to apply
- an uninitialized portion of the texture image to a primitive.
- </para>
- <para>
- Formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glTexImage3D</function>
- specifies the three-dimensional texture for the current texture unit,
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- <para>
- If the <code>ARB_imaging</code> extension is supported, RGBA elements may
- also be processed by the imaging pipeline. The following stages may be
- applied to an RGBA color before color component clamping to the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>:
- </para>
- <variablelist>
- <varlistentry>
- <term>1. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>2. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_POST_CONVOLUTION_COLOR_TABLE</constant>, if enabled. See <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>3. Transformation by the color matrix. See <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>.</term>
- <listitem>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>4. RGBA components may be multiplied by <constant>GL_POST_COLOR_MATRIX_c_SCALE</constant>,</term>
- <listitem>
- <para>
- and added to <constant>GL_POST_COLOR_MATRIX_c_BIAS</constant>, if enabled. See
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>5. Color component replacement by the color table specified for</term>
- <listitem>
- <para>
- <constant>GL_POST_COLOR_MATRIX_COLOR_TABLE</constant>, if enabled. See
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- Non-power-of-two textures are supported if the GL version is 2.0 or greater, or if the implementation exports the <constant>GL_ARB_texture_non_power_of_two</constant> extension.
- </para>
- <para>
- The
- <constant>GL_SRGB</constant>,
- <constant>GL_SRGB8</constant>,
- <constant>GL_SRGB_ALPHA</constant>,
- <constant>GL_SRGB8_ALPHA8</constant>,
- <constant>GL_SLUMINANCE</constant>,
- <constant>GL_SLUMINANCE8</constant>,
- <constant>GL_SLUMINANCE_ALPHA</constant>, and
- <constant>GL_SLUMINANCE8_ALPHA8</constant>
- internal formats are only available if the GL version is 2.1 or greater.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_3D</constant>
- or <constant>GL_PROXY_TEXTURE_3D</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted
- format constant. Format constants other than <constant>GL_STENCIL_INDEX</constant> and <constant>GL_DEPTH_COMPONENT</constant>
- are accepted.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and
- <parameter>format</parameter> is not <constant>GL_COLOR_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2 (max):-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">max</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>internalFormat</parameter> is not 1, 2, 3, 4, or one of the
- accepted resolution and format symbolic constants.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter>, <parameter>height</parameter>, or <parameter>depth</parameter> is less than 0 or greater than 2 + <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if non-power-of-two textures are not supported and the <parameter>width</parameter>, <parameter>height</parameter>, or <parameter>depth</parameter> cannot be represented as
- <inlineequation><mml:math>
- <!-- eqn: 2 sup k + 2( border ):-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">k</mml:mi>
- </mml:msup>
- <mml:mo>+</mml:mo>
- <mml:mrow>
- <mml:mn>2</mml:mn>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">border</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>
- for some
- integer value of <emphasis>k</emphasis>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>border</parameter> is not 0 or 1.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>format</parameter> or <parameter>internalFormat</parameter> is
- <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_DEPTH_COMPONENT16</constant>,
- <constant>GL_DEPTH_COMPONENT24</constant>, or <constant>GL_DEPTH_COMPONENT32</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexImage3D</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorTable</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompressedTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glGetCompressedTexImage</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMatrixMode</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glTexParameter">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexParameter</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexParameter</refname>
- <refpurpose>set texture parameters</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexParameterf</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLfloat <parameter>param</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexParameteri</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>GLint <parameter>param</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture,
- which must be either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_3D</constant>, or <constant>GL_TEXTURE_CUBE_MAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of a single-valued texture parameter.
- <parameter>pname</parameter> can be one of the following:
- <constant>GL_TEXTURE_MIN_FILTER</constant>,
- <constant>GL_TEXTURE_MAG_FILTER</constant>,
- <constant>GL_TEXTURE_MIN_LOD</constant>,
- <constant>GL_TEXTURE_MAX_LOD</constant>,
- <constant>GL_TEXTURE_BASE_LEVEL</constant>,
- <constant>GL_TEXTURE_MAX_LEVEL</constant>,
- <constant>GL_TEXTURE_WRAP_S</constant>,
- <constant>GL_TEXTURE_WRAP_T</constant>,
- <constant>GL_TEXTURE_WRAP_R</constant>,
- <constant>GL_TEXTURE_PRIORITY</constant>,
- <constant>GL_TEXTURE_COMPARE_MODE</constant>,
- <constant>GL_TEXTURE_COMPARE_FUNC</constant>,
- <constant>GL_DEPTH_TEXTURE_MODE</constant>, or
- <constant>GL_GENERATE_MIPMAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>param</parameter></term>
- <listitem>
- <para>
- Specifies the value of <parameter>pname</parameter>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexParameterfv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>const GLfloat * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexParameteriv</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLenum <parameter>pname</parameter></paramdef>
- <paramdef>const GLint * <parameter>params</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture,
- which must be either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant> or
- <constant>GL_TEXTURE_3D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pname</parameter></term>
- <listitem>
- <para>
- Specifies the symbolic name of a texture parameter.
- <parameter>pname</parameter> can be one of the following:
- <constant>GL_TEXTURE_MIN_FILTER</constant>,
- <constant>GL_TEXTURE_MAG_FILTER</constant>,
- <constant>GL_TEXTURE_MIN_LOD</constant>,
- <constant>GL_TEXTURE_MAX_LOD</constant>,
- <constant>GL_TEXTURE_BASE_LEVEL</constant>,
- <constant>GL_TEXTURE_MAX_LEVEL</constant>,
- <constant>GL_TEXTURE_WRAP_S</constant>,
- <constant>GL_TEXTURE_WRAP_T</constant>,
- <constant>GL_TEXTURE_WRAP_R</constant>,
- <constant>GL_TEXTURE_BORDER_COLOR</constant>,
- <constant>GL_TEXTURE_PRIORITY</constant>,
- <constant>GL_TEXTURE_COMPARE_MODE</constant>,
- <constant>GL_TEXTURE_COMPARE_FUNC</constant>,
- <constant>GL_DEPTH_TEXTURE_MODE</constant>, or
- <constant>GL_GENERATE_MIPMAP</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>params</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to an array where the value or values of <parameter>pname</parameter>
- are stored.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texture mapping is a technique that applies an image onto an object's surface
- as if the image were a decal or cellophane shrink-wrap.
- The image is created in texture space,
- with an
- (<inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>)
- coordinate system.
- A texture is a one- or two-dimensional image and a set of parameters
- that determine how samples are derived from the image.
- </para>
- <para>
- <function>glTexParameter</function> assigns the value or values in <parameter>params</parameter> to the texture parameter
- specified as <parameter>pname</parameter>.
- <parameter>target</parameter> defines the target texture,
- either <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, or <constant>GL_TEXTURE_3D</constant>.
- The following symbols are accepted in <parameter>pname</parameter>:
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_MIN_FILTER</constant></term>
- <listitem>
- <para>
- The texture minifying function is used whenever the pixel being textured
- maps to an area greater than one texture element.
- There are six defined minifying functions.
- Two of them use the nearest one or nearest four texture elements
- to compute the texture value.
- The other four use mipmaps.
- </para>
- <para>
- A mipmap is an ordered set of arrays representing the same image
- at progressively lower resolutions.
- If the texture has dimensions
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n times 2 sup m:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>×</mml:mo>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- </mml:mrow>
- </mml:math></inlineequation>,
- there are
- <inlineequation><mml:math>
- <!-- eqn: max ( n, m ) + 1:-->
- <mml:mrow>
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- <mml:mo>+</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- mipmaps.
- The first mipmap is the original texture,
- with dimensions
- <inlineequation><mml:math>
- <!-- eqn: 2 sup n times 2 sup m:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">n</mml:mi>
- </mml:msup>
- <mml:mo>×</mml:mo>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:msup>
- </mml:mrow>
- </mml:math></inlineequation>.
- Each subsequent mipmap has dimensions
- <inlineequation><mml:math>
- <!-- eqn: 2 sup { k - 1 } times 2 sup { l - 1 }:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:msup>
- <mml:mo>×</mml:mo>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:msup>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math>
- <!-- eqn: 2 sup k times 2 sup l:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">k</mml:mi>
- </mml:msup>
- <mml:mo>×</mml:mo>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mi mathvariant="italic">l</mml:mi>
- </mml:msup>
- </mml:mrow>
- </mml:math></inlineequation>
- are the dimensions of the previous mipmap,
- until either
- <inlineequation><mml:math>
- <!-- eqn: k = 0:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mn>0</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- or
- <inlineequation><mml:math>
- <!-- eqn: l = 0:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mn>0</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>.
- At that point,
- subsequent mipmaps have dimension
- <inlineequation><mml:math>
- <!-- eqn: 1 times 2 sup { l - 1 }:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>×</mml:mo>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">l</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:msup>
- </mml:mrow>
- </mml:math></inlineequation>
- or
- <inlineequation><mml:math>
- <!-- eqn: 2 sup { k - 1} times 1:-->
- <mml:mrow>
- <mml:msup><mml:mn>2</mml:mn>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mi mathvariant="italic">k</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- </mml:msup>
- <mml:mo>×</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- until the final mipmap,
- which has dimension
- <inlineequation><mml:math>
- <!-- eqn: 1 times 1:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>×</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>.
- To define the mipmaps, call <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>
- with the <emphasis>level</emphasis> argument indicating the order of the mipmaps.
- Level 0 is the original texture;
- level
- <inlineequation><mml:math>
- <!-- eqn: max ( n, m ):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">max</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">n</mml:mi>
- <mml:mi mathvariant="italic">m</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- is the final
- <inlineequation><mml:math>
- <!-- eqn: 1 times 1:-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>×</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>
- mipmap.
- </para>
- <para>
- <parameter>params</parameter> supplies a function for minifying the texture as one of the
- following:
- <variablelist>
- <varlistentry>
- <term><constant>GL_NEAREST</constant></term>
- <listitem>
- <para>
- Returns the value of the texture element that is nearest
- (in Manhattan distance)
- to the center of the pixel being textured.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINEAR</constant></term>
- <listitem>
- <para>
- Returns the weighted average of the four texture elements
- that are closest to the center of the pixel being textured.
- These can include border texture elements,
- depending on the values of <constant>GL_TEXTURE_WRAP_S</constant> and <constant>GL_TEXTURE_WRAP_T</constant>,
- and on the exact mapping.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NEAREST_MIPMAP_NEAREST</constant></term>
- <listitem>
- <para>
- Chooses the mipmap that most closely matches the size of the pixel
- being textured and uses the <constant>GL_NEAREST</constant> criterion
- (the texture element nearest to the center of the pixel)
- to produce a texture value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINEAR_MIPMAP_NEAREST</constant></term>
- <listitem>
- <para>
- Chooses the mipmap that most closely matches the size of the pixel
- being textured and uses the <constant>GL_LINEAR</constant> criterion
- (a weighted average of the four texture elements that are closest
- to the center of the pixel)
- to produce a texture value.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NEAREST_MIPMAP_LINEAR</constant></term>
- <listitem>
- <para>
- Chooses the two mipmaps that most closely match the size of the pixel
- being textured and uses the <constant>GL_NEAREST</constant> criterion
- (the texture element nearest to the center of the pixel)
- to produce a texture value from each mipmap.
- The final texture value is a weighted average of those two values.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINEAR_MIPMAP_LINEAR</constant></term>
- <listitem>
- <para>
- Chooses the two mipmaps that most closely match the size of the pixel
- being textured and uses the <constant>GL_LINEAR</constant> criterion
- (a weighted average of the four texture elements that are closest
- to the center of the pixel)
- to produce a texture value from each mipmap.
- The final texture value is a weighted average of those two values.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- <para>
- As more texture elements are sampled in the minification process,
- fewer aliasing artifacts will be apparent.
- While the <constant>GL_NEAREST</constant> and <constant>GL_LINEAR</constant> minification functions can be
- faster than the other four,
- they sample only one or four texture elements to determine the texture value
- of the pixel being rendered and can produce moire patterns
- or ragged transitions.
- The initial value of <constant>GL_TEXTURE_MIN_FILTER</constant> is
- <constant>GL_NEAREST_MIPMAP_LINEAR</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_MAG_FILTER</constant></term>
- <listitem>
- <para>
- The texture magnification function is used when the pixel being textured
- maps to an area less than or equal to one texture element.
- It sets the texture magnification function to either <constant>GL_NEAREST</constant>
- or <constant>GL_LINEAR</constant> (see below). <constant>GL_NEAREST</constant> is generally faster
- than <constant>GL_LINEAR</constant>,
- but it can produce textured images with sharper edges
- because the transition between texture elements is not as smooth.
- The initial value of <constant>GL_TEXTURE_MAG_FILTER</constant> is <constant>GL_LINEAR</constant>.
- <variablelist>
- <varlistentry>
- <term><constant>GL_NEAREST</constant></term>
- <listitem>
- <para>
- Returns the value of the texture element that is nearest
- (in Manhattan distance)
- to the center of the pixel being textured.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_LINEAR</constant></term>
- <listitem>
- <para>
- Returns the weighted average of the four texture elements
- that are closest to the center of the pixel being textured.
- These can include border texture elements,
- depending on the values of <constant>GL_TEXTURE_WRAP_S</constant> and <constant>GL_TEXTURE_WRAP_T</constant>,
- and on the exact mapping.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_MIN_LOD</constant></term>
- <listitem>
- <para>
- Sets the minimum level-of-detail parameter. This floating-point value
- limits the selection of highest resolution mipmap (lowest mipmap
- level). The initial value is -1000.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_MAX_LOD</constant></term>
- <listitem>
- <para>
- Sets the maximum level-of-detail parameter. This floating-point value
- limits the selection of the lowest resolution mipmap (highest mipmap
- level). The initial value is 1000.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_BASE_LEVEL</constant></term>
- <listitem>
- <para>
- Specifies the index of the lowest defined mipmap level. This is an
- integer value. The initial value is 0.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_MAX_LEVEL</constant></term>
- <listitem>
- <para>
- Sets the index of the highest defined mipmap level. This is an integer
- value. The initial value is 1000.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_WRAP_S</constant></term>
- <listitem>
- <para>
- Sets the wrap parameter for texture coordinate
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- to either <constant>GL_CLAMP</constant>,
- <constant>GL_CLAMP_TO_BORDER</constant>, <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_MIRRORED_REPEAT</constant>, or
- <constant>GL_REPEAT</constant>. <constant>GL_CLAMP</constant> causes
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- coordinates to be clamped to the
- range [0,1] and is useful for preventing wrapping artifacts when mapping a
- single image onto an object. <constant>GL_CLAMP_TO_BORDER</constant> causes the
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- coordinate to be clamped to the range
- <inlineequation><mml:math>
- <!-- eqn: left [ {-1 over 2N}, 1 + {1 over 2N} right ]:-->
- <mml:mfenced open="[" close="]">
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfrac>
- <mml:mn>-1</mml:mn>
- <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>
- </mml:mfrac>
- </mml:mrow>
- </mml:mfenced>
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>+</mml:mo>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfrac>
- <mml:mn>1</mml:mn>
- <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>
- </mml:mfrac>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">N</mml:mi></mml:math></inlineequation>
- is the size of the texture in the direction of
- clamping.<constant>GL_CLAMP_TO_EDGE</constant> causes
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- coordinates to be clamped to the
- range
- <inlineequation><mml:math>
- <!-- eqn: left [ {1 over 2N}, 1 - {1 over 2N} right ]:-->
- <mml:mfenced open="[" close="]">
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfrac>
- <mml:mn>1</mml:mn>
- <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>
- </mml:mfrac>
- </mml:mrow>
- </mml:mfenced>
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mfenced open="" close="">
- <mml:mrow>
- <mml:mfrac>
- <mml:mn>1</mml:mn>
- <mml:mn>2<mml:mi mathvariant="italic">N</mml:mi></mml:mn>
- </mml:mfrac>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:mfenced>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">N</mml:mi></mml:math></inlineequation>
- is the size
- of the texture in the direction of clamping. <constant>GL_REPEAT</constant> causes the
- integer part of the
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- coordinate to be ignored; the GL uses only the
- fractional part, thereby creating a repeating pattern.
- <constant>GL_MIRRORED_REPEAT</constant> causes the
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- coordinate to be set to the
- fractional part of the texture coordinate if the integer part of
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- is
- even; if the integer part of
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- is odd, then the
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>
- texture coordinate is
- set to
- <inlineequation><mml:math>
- <!-- eqn: 1 - frac(s):-->
- <mml:mrow>
- <mml:mn>1</mml:mn>
- <mml:mo>-</mml:mo>
- <mml:mrow>
- <mml:mi mathvariant="italic">frac</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math>
- <!-- eqn: frac(s):-->
- <mml:mrow>
- <mml:mi mathvariant="italic">frac</mml:mi>
- <mml:mo>⁡</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mi mathvariant="italic">s</mml:mi>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>
- represents the fractional part of
- <inlineequation><mml:math><mml:mi mathvariant="italic">s</mml:mi></mml:math></inlineequation>.
- Border texture
- elements are accessed only if wrapping is set to <constant>GL_CLAMP</constant> or <constant>GL_CLAMP_TO_BORDER</constant>. Initially,
- <constant>GL_TEXTURE_WRAP_S</constant> is set to <constant>GL_REPEAT</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
- </para>
- <variablelist>
- <varlistentry>
- <term><constant>GL_TEXTURE_WRAP_T</constant></term>
- <listitem>
- <para>
- Sets the wrap parameter for texture coordinate
- <inlineequation><mml:math><mml:mi mathvariant="italic">t</mml:mi></mml:math></inlineequation>
- to either <constant>GL_CLAMP</constant>,
- <constant>GL_CLAMP_TO_BORDER</constant>, <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_MIRRORED_REPEAT</constant>, or
- <constant>GL_REPEAT</constant>. See the discussion under <constant>GL_TEXTURE_WRAP_S</constant>.
- Initially, <constant>GL_TEXTURE_WRAP_T</constant> is set to <constant>GL_REPEAT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_WRAP_R</constant></term>
- <listitem>
- <para>
- Sets the wrap parameter for texture coordinate
- <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>
- to either <constant>GL_CLAMP</constant>,
- <constant>GL_CLAMP_TO_BORDER</constant>, <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_MIRRORED_REPEAT</constant>, or
- <constant>GL_REPEAT</constant>. See the discussion under <constant>GL_TEXTURE_WRAP_S</constant>.
- Initially, <constant>GL_TEXTURE_WRAP_R</constant> is set to <constant>GL_REPEAT</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_BORDER_COLOR</constant></term>
- <listitem>
- <para>
- Sets a border color. <parameter>params</parameter> contains four values that comprise the RGBA
- color of the texture border. Integer color components are interpreted
- linearly such that the most positive integer maps to 1.0, and the most
- negative integer maps to -1.0. The values are clamped to the range [0,1]
- when they are specified. Initially, the border color is (0, 0, 0, 0).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_PRIORITY</constant></term>
- <listitem>
- <para>
- Specifies the texture residence priority of the currently bound texture.
- Permissible values are in the range
- <inlineequation><mml:math>
- <!-- eqn: [0,1]:-->
- <mml:mfenced open="[" close="]">
- <mml:mn>0</mml:mn>
- <mml:mn>1</mml:mn>
- </mml:mfenced>
- </mml:math></inlineequation>.
- See <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry> for more information.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPARE_MODE</constant></term>
- <listitem>
- <para>
- Specifies the texture comparison mode for currently bound depth textures.
- That is, a texture whose internal format is <constant>GL_DEPTH_COMPONENT_*</constant>; see
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>)
- Permissible values are:
- <variablelist>
- <varlistentry>
- <term><constant>GL_COMPARE_R_TO_TEXTURE</constant></term>
- <listitem>
- <para>
- Specifies that the interpolated and clamped
- <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>
- texture coordinate should
- be compared to the value in the currently bound depth texture. See the
- discussion of <constant>GL_TEXTURE_COMPARE_FUNC</constant> for details of how the comparison
- is evaluated. The result of the comparison is assigned to luminance,
- intensity, or alpha (as specified by <constant>GL_DEPTH_TEXTURE_MODE</constant>).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_NONE</constant></term>
- <listitem>
- <para>
- Specifies that the luminance, intensity, or alpha (as specified by
- <constant>GL_DEPTH_TEXTURE_MODE</constant>) should be assigned the
- appropriate value from the currently bound depth texture.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_TEXTURE_COMPARE_FUNC</constant></term>
- <listitem>
- <para>
- Specifies the comparison operator used when <constant>GL_TEXTURE_COMPARE_MODE</constant> is
- set to <constant>GL_COMPARE_R_TO_TEXTURE</constant>. Permissible values are:
- <informaltable frame="topbot">
- <tgroup cols="2" align="left">
- <colspec/>
- <colspec/>
- <thead>
- <row>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Texture Comparison Function
- </emphasis></entry>
- <entry rowsep="1" align="left"><emphasis role="bold">
- Computed result
- </emphasis></entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry align="left">
- <constant>GL_LEQUAL</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1.0</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mn>0.0</mml:mn>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢ </mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo><=</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>></mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_GEQUAL</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1.0</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mn>0.0</mml:mn>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢ </mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_LESS</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1.0</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mn>0.0</mml:mn>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢ </mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>>=</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_GREATER</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1.0</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mn>0.0</mml:mn>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢ </mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>></mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo><=</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_EQUAL</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1.0</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mn>0.0</mml:mn>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢ </mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>≠</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NOTEQUAL</constant>
- </entry>
- <entry align="left">
- <informalequation><mml:math>
- <!-- eqn: result = left { cpile {1.0 above 0.0} lpile {r <= {D sub t} above r > {D sub t}}:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="{" close="">
- <mml:mrow>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mn>1.0</mml:mn>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mn>0.0</mml:mn>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- <mml:mo>⁢ </mml:mo>
- <mml:mtable>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>≠</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- <mml:mtr><mml:mtd>
- <mml:mrow>
- <mml:mi mathvariant="italic">r</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mfenced open="" close="">
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:mrow>
- </mml:mtd></mml:mtr>
- </mml:mtable>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_ALWAYS</constant>
- </entry>
- <entry align="left">
- <informalequation>
- <mml:math>
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mi>1.0</mml:mi>
- </mml:mrow>
- </mml:math>
- </informalequation>
- </entry>
- </row>
- <row>
- <entry align="left">
- <constant>GL_NEVER</constant>
- </entry>
- <entry align="left">
- <informalequation>
- <mml:math>
- <mml:mrow>
- <mml:mi mathvariant="italic">result</mml:mi>
- <mml:mo>=</mml:mo>
- <mml:mi>0.0</mml:mi>
- </mml:mrow>
- </mml:math>
- </informalequation>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- where <inlineequation><mml:math><mml:mi mathvariant="italic">r</mml:mi></mml:math></inlineequation>
- is the current interpolated texture coordinate, and
- <inlineequation><mml:math>
- <!-- eqn: D sub t:-->
- <mml:msub><mml:mi mathvariant="italic">D</mml:mi>
- <mml:mi mathvariant="italic">t</mml:mi>
- </mml:msub>
- </mml:math></inlineequation>
- is the depth texture value sampled from the currently bound depth texture.
- <inlineequation><mml:math><mml:mi mathvariant="italic">result</mml:mi></mml:math></inlineequation>
- is assigned to the either the luminance, intensity, or alpha (as
- specified by <constant>GL_DEPTH_TEXTURE_MODE</constant>.)
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_DEPTH_TEXTURE_MODE</constant></term>
- <listitem>
- <para>
- Specifies a single symbolic constant indicating how depth values should be
- treated during filtering and texture application. Accepted values are
- <constant>GL_LUMINANCE</constant>, <constant>GL_INTENSITY</constant>, and <constant>GL_ALPHA</constant>. The initial value
- is <constant>GL_LUMINANCE</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><constant>GL_GENERATE_MIPMAP</constant></term>
- <listitem>
- <para>
- Specifies a boolean value that indicates if all levels of a mipmap array
- should be automatically updated when any modification to the base level
- mipmap is done. The initial value is <constant>GL_FALSE</constant>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <constant>GL_TEXTURE_3D</constant>, <constant>GL_TEXTURE_MIN_LOD</constant>, <constant>GL_TEXTURE_MAX_LOD</constant>,
- <constant>GL_CLAMP_TO_EDGE</constant>, <constant>GL_TEXTURE_BASE_LEVEL</constant>, and <constant>GL_TEXTURE_MAX_LEVEL</constant> are
- available only if the GL version is 1.2 or greater.
- </para>
- <para>
- <constant>GL_CLAMP_TO_BORDER</constant> is available only if the GL version is 1.3 or greater.
- </para>
- <para>
- <constant>GL_MIRRORED_REPEAT</constant>, <constant>GL_TEXTURE_COMPARE_MODE</constant>,
- <constant>GL_TEXTURE_COMPARE_FUNC</constant>, <constant>GL_DEPTH_TEXTURE_MODE</constant>, and
- <constant>GL_GENERATE_MIPMAP</constant> are available only if the GL version is 1.4 or
- greater.
- </para>
- <para>
- <constant>GL_TEXTURE_COMPARE_FUNC</constant> allows the following additional comparison modes only
- if the GL version is 1.5 or greater:
- <constant>GL_LESS</constant>, <constant>GL_GREATER</constant>,
- <constant>GL_EQUAL</constant>, <constant>GL_NOTEQUAL</constant>,
- <constant>GL_ALWAYS</constant>, and <constant>GL_NEVER</constant>.
- </para>
- <para>
- Suppose that a program has enabled texturing (by calling <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> with
- argument <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, or <constant>GL_TEXTURE_3D</constant>) and
- has set <constant>GL_TEXTURE_MIN_FILTER</constant> to one of the functions that requires a
- mipmap. If either the dimensions of the texture images currently defined
- (with previous calls to <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>, or <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>) do not
- follow the proper sequence for mipmaps (described above), or there are
- fewer texture images defined than are needed, or the set of texture images
- have differing numbers of texture components, then it is as if texture
- mapping were disabled.
- </para>
- <para>
- Linear filtering accesses the four nearest texture elements only in 2D
- textures. In 1D textures, linear filtering accesses the two nearest
- texture elements.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glTexParameter</function>
- specifies the texture parameters for the active texture unit, specified
- by calling <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>pname</parameter> is not
- one of the accepted defined values.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>params</parameter> should have a defined
- constant value (based on the value of <parameter>pname</parameter>) and does not.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexParameter</function> is executed between the
- execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPrioritizeTextures</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glTexSubImage1D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexSubImage1D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexSubImage1D</refname>
- <refpurpose>specify a one-dimensional texture subimage</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexSubImage1D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_1D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image
- onto each graphical primitive for which texturing is enabled.
- To enable or disable one-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>.
- </para>
- <para>
- <function>glTexSubImage1D</function> redefines a contiguous subregion of an existing one-dimensional
- texture image.
- The texels referenced by <parameter>data</parameter> replace the portion of the
- existing texture array with x indices <parameter>xoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive.
- This region may not include any texels outside the range of the
- texture array 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.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glTexSubImage1D</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- Formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glTexSubImage1D</function>
- specifies a one-dimensional subtexture for the current texture unit,
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components
- specified in <parameter>data</parameter> may be processed by the imaging pipeline. See
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the
- allowable values.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted
- format constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and
- <parameter>format</parameter> is not <constant>GL_COLOR_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>
- <emphasis>max</emphasis>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: xoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or if
- <inlineequation><mml:math>
- <!-- eqn: (xoffset + width) > (w - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">w</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_WIDTH</constant>, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
- is
- the width of the <constant>GL_TEXTURE_BORDER</constant>
- of the texture image being modified.
- Note that
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- includes twice the border width.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not
- been defined by a previous <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> operation.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexSubImage1D</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_1D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</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>
+++ /dev/null
-<?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="glTexSubImage2D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexSubImage2D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexSubImage2D</refname>
- <refpurpose>specify a two-dimensional texture subimage</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexSubImage2D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>yoffset</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>yoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the y direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image
- onto each graphical primitive for which texturing is enabled.
- To enable and disable two-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant>.
- </para>
- <para>
- <function>glTexSubImage2D</function> redefines a contiguous subregion of an existing two-dimensional
- texture image.
- The texels referenced by <parameter>data</parameter> replace the portion of the
- existing texture array with x indices <parameter>xoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive,
- and y indices <parameter>yoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: yoffset + height - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive.
- This region may not include any texels outside the range of the
- texture array as it was originally specified.
- It is not an error to specify a subtexture with zero width or height, but
- such a specification has no effect.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glTexSubImage2D</function> is available only if the GL version is 1.1 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- Formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glTexSubImage2D</function>
- specifies a two-dimensional subtexture for the current texture unit,
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components
- specified in <parameter>data</parameter> may be processed by the imaging pipeline. See
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> for specific details.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_2D</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_X</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y</constant>,
- <constant>GL_TEXTURE_CUBE_MAP_POSITIVE_Z</constant>, or
- <constant>GL_TEXTURE_CUBE_MAP_NEGATIVE_Z</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted
- format constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and
- <parameter>format</parameter> is not <constant>GL_COLOR_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>
- <emphasis>max</emphasis>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: xoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: (xoffset + width) > (w - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">w</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: yoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: (yoffset + height) > (h - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">h</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_WIDTH</constant>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_HEIGHT</constant>, and
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
- is the border width
- of the texture image being modified.
- Note that
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- include twice the border width.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>height</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not
- been defined by a previous <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> operation.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexSubImage2D</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_2D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glTexSubImage3D">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glTexSubImage3D</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glTexSubImage3D</refname>
- <refpurpose>specify a three-dimensional texture subimage</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glTexSubImage3D</function></funcdef>
- <paramdef>GLenum <parameter>target</parameter></paramdef>
- <paramdef>GLint <parameter>level</parameter></paramdef>
- <paramdef>GLint <parameter>xoffset</parameter></paramdef>
- <paramdef>GLint <parameter>yoffset</parameter></paramdef>
- <paramdef>GLint <parameter>zoffset</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- <paramdef>GLsizei <parameter>depth</parameter></paramdef>
- <paramdef>GLenum <parameter>format</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>data</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <para>
- </para>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>target</parameter></term>
- <listitem>
- <para>
- Specifies the target texture.
- Must be <constant>GL_TEXTURE_3D</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>level</parameter></term>
- <listitem>
- <para>
- Specifies the level-of-detail number.
- Level 0 is the base image level.
- Level <emphasis>n</emphasis> is the <emphasis>n</emphasis>th mipmap reduction image.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>xoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the x direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>yoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the y direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>zoffset</parameter></term>
- <listitem>
- <para>
- Specifies a texel offset in the z direction within the texture array.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <listitem>
- <para>
- Specifies the width of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specifies the height of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>depth</parameter></term>
- <listitem>
- <para>
- Specifies the depth of the texture subimage.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>format</parameter></term>
- <listitem>
- <para>
- Specifies the format of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_COLOR_INDEX</constant>,
- <constant>GL_RED</constant>,
- <constant>GL_GREEN</constant>,
- <constant>GL_BLUE</constant>,
- <constant>GL_ALPHA</constant>,
- <constant>GL_RGB</constant>,
- <constant>GL_BGR</constant>,
- <constant>GL_RGBA</constant>,
- <constant>GL_BGRA</constant>,
- <constant>GL_LUMINANCE</constant>, and
- <constant>GL_LUMINANCE_ALPHA</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>
- Specifies the data type of the pixel data.
- The following symbolic values are accepted:
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_BYTE</constant>,
- <constant>GL_BITMAP</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_FLOAT</constant>,
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>data</parameter></term>
- <listitem>
- <para>
- Specifies a pointer to the image data in memory.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- Texturing maps a portion of a specified texture image
- onto each graphical primitive for which texturing is enabled.
- To enable and disable three-dimensional texturing, call <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
- and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>.
- </para>
- <para>
- <function>glTexSubImage3D</function> redefines a contiguous subregion of an existing three-dimensional
- texture image.
- The texels referenced by <parameter>data</parameter> replace the portion of the
- existing texture array with x indices <parameter>xoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: xoffset + width - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive,
- y indices <parameter>yoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: yoffset + height - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive,
- and z indices <parameter>zoffset</parameter> and
- <inlineequation><mml:math>
- <!-- eqn: zoffset + depth - 1:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">zoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">depth</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:math></inlineequation>,
- inclusive.
- This region may not include any texels outside the range of the
- texture array as it was originally specified.
- It is not an error to specify a subtexture with zero width, height, or
- depth but such a specification has no effect.
- </para>
- <para>
- If a non-zero named buffer object is bound to the <constant>GL_PIXEL_UNPACK_BUFFER</constant> target
- (see <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>) while a texture image is
- specified, <parameter>data</parameter> is treated as a byte offset into the buffer object's data store.
- </para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para>
- <function>glTexSubImage3D</function> is available only if the GL version is 1.2 or greater.
- </para>
- <para>
- Texturing has no effect in color index mode.
- </para>
- <para>
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry> modes affect texture images
- in exactly the way they affect <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>.
- </para>
- <para>
- Formats <constant>GL_BGR</constant>, and <constant>GL_BGRA</constant> and types
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, and
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> are available only if the GL version
- is 1.2 or greater.
- </para>
- <para>
- For OpenGL versions 1.3 and greater, or when the <code>ARB_multitexture</code> extension is supported, <function>glTexSubImage3D</function>
- specifies a three-dimensional subtexture for the current texture unit,
- specified with <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>.
- </para>
- <para>
- When the <code>ARB_imaging</code> extension is supported, the RGBA components
- specified in <parameter>data</parameter> may be processed by the imaging pipeline. See
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> for specific details.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if /<parameter>target</parameter> is not <constant>GL_TEXTURE_3D</constant>.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>format</parameter> is not an accepted
- format constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not a type constant.
- </para>
- <para>
- <constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is <constant>GL_BITMAP</constant> and
- <parameter>format</parameter> is not <constant>GL_COLOR_INDEX</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> may be generated if <parameter>level</parameter> is greater
- than
- <inlineequation><mml:math>
- <!-- eqn: log sub 2:-->
- <mml:msub><mml:mi mathvariant="italic">log</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:msub>
- </mml:math></inlineequation>
- <emphasis>max</emphasis>,
- where <emphasis>max</emphasis> is the returned value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if
- <inlineequation><mml:math>
- <!-- eqn: xoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: (xoffset + width) > (w - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">xoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">width</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">w</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- <inlineequation><mml:math>
- <!-- eqn: yoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: (yoffset + height) > (h - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">yoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">height</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">h</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: zoffset < -b:-->
- <mml:mrow>
- <mml:mi mathvariant="italic">zoffset</mml:mi>
- <mml:mo><</mml:mo>
- <mml:mrow>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></inlineequation>,
- or
- <inlineequation><mml:math>
- <!-- eqn: (zoffset + depth) > (d - b):-->
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">zoffset</mml:mi>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">depth</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>></mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:mi mathvariant="italic">d</mml:mi>
- <mml:mo>-</mml:mo>
- <mml:mi mathvariant="italic">b</mml:mi>
- </mml:mrow>
- </mml:mfenced>
- </mml:mrow>
- </mml:math></inlineequation>,
- where
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_WIDTH</constant>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_HEIGHT</constant>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
- is the <constant>GL_TEXTURE_DEPTH</constant>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">b</mml:mi></mml:math></inlineequation>
- is the border width of the texture image being modified.
- Note that
- <inlineequation><mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math></inlineequation>,
- <inlineequation><mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math></inlineequation>,
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math></inlineequation>
- include twice the border width.
- </para>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter>, <parameter>height</parameter>, or <parameter>depth</parameter>
- is less than 0.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if the texture array has not
- been defined by a previous <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> operation.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_BYTE_3_3_2</constant>,
- <constant>GL_UNSIGNED_BYTE_2_3_3_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_6_5</constant>, or
- <constant>GL_UNSIGNED_SHORT_5_6_5_REV</constant>
- and <parameter>format</parameter> is not <constant>GL_RGB</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <parameter>type</parameter> is one of
- <constant>GL_UNSIGNED_SHORT_4_4_4_4</constant>,
- <constant>GL_UNSIGNED_SHORT_4_4_4_4_REV</constant>,
- <constant>GL_UNSIGNED_SHORT_5_5_5_1</constant>,
- <constant>GL_UNSIGNED_SHORT_1_5_5_5_REV</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8</constant>,
- <constant>GL_UNSIGNED_INT_8_8_8_8_REV</constant>,
- <constant>GL_UNSIGNED_INT_10_10_10_2</constant>, or
- <constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant>
- and <parameter>format</parameter> is neither <constant>GL_RGBA</constant> nor <constant>GL_BGRA</constant>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the buffer object's data store is currently mapped.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and the data would be unpacked from the buffer
- object such that the memory reads required would exceed the data store size.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if a non-zero buffer object name is bound to the
- <constant>GL_PIXEL_UNPACK_BUFFER</constant> target and <parameter>data</parameter> is not evenly divisible
- into the number of bytes needed to store in memory a datum indicated by <parameter>type</parameter>.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glTexSubImage3D</function> is executed
- between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding
- execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>
- </para>
- <para>
- <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_3D</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_PIXEL_UNPACK_BUFFER_BINDING</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glActiveTexture</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCopyTexSubImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawPixels</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelStore</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glPixelTransfer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexEnv</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexGen</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage1D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glTexParameter</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>
+++ /dev/null
-<?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="glUniform">
- <refmeta>
- <refentrytitle>glUniform</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refdescriptor>glUniform</refdescriptor>
- <refname>glUniform1f</refname>
- <refname>glUniform2f</refname>
- <refname>glUniform3f</refname>
- <refname>glUniform4f</refname>
- <refname>glUniform1i</refname>
- <refname>glUniform2i</refname>
- <refname>glUniform3i</refname>
- <refname>glUniform4i</refname>
- <refname>glUniform1fv</refname>
- <refname>glUniform2fv</refname>
- <refname>glUniform3fv</refname>
- <refname>glUniform4fv</refname>
- <refname>glUniform1iv</refname>
- <refname>glUniform2iv</refname>
- <refname>glUniform3iv</refname>
- <refname>glUniform4iv</refname>
- <refname>glUniformMatrix2fv</refname>
- <refname>glUniformMatrix3fv</refname>
- <refname>glUniformMatrix4fv</refname>
- <refname>glUniformMatrix2x3fv</refname>
- <refname>glUniformMatrix3x2fv</refname>
- <refname>glUniformMatrix2x4fv</refname>
- <refname>glUniformMatrix4x2fv</refname>
- <refname>glUniformMatrix3x4fv</refname>
- <refname>glUniformMatrix4x3fv</refname>
- <refpurpose>Specify the value of a uniform variable for the current program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glUniform1f</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform2f</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- <paramdef>GLfloat <parameter>v1</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform3f</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- <paramdef>GLfloat <parameter>v1</parameter></paramdef>
- <paramdef>GLfloat <parameter>v2</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform4f</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- <paramdef>GLfloat <parameter>v1</parameter></paramdef>
- <paramdef>GLfloat <parameter>v2</parameter></paramdef>
- <paramdef>GLfloat <parameter>v3</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform1i</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLint <parameter>v0</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform2i</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLint <parameter>v0</parameter></paramdef>
- <paramdef>GLint <parameter>v1</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform3i</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLint <parameter>v0</parameter></paramdef>
- <paramdef>GLint <parameter>v1</parameter></paramdef>
- <paramdef>GLint <parameter>v2</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform4i</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLint <parameter>v0</parameter></paramdef>
- <paramdef>GLint <parameter>v1</parameter></paramdef>
- <paramdef>GLint <parameter>v2</parameter></paramdef>
- <paramdef>GLint <parameter>v3</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>location</parameter></term>
- <listitem>
- <para>Specifies the location of the uniform variable
- to be modified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <parameter>v0</parameter>,
- <parameter>v1</parameter>,
- <parameter>v2</parameter>,
- <parameter>v3</parameter>
- </term>
- <listitem>
- <para>Specifies the new values to be used for the
- specified uniform variable.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glUniform1fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform2fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform3fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform4fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform1iv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLint *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform2iv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLint *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform3iv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLint *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniform4iv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>const GLint *<parameter>value</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>location</parameter></term>
- <listitem>
- <para>Specifies the location of the uniform value to
- be modified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>Specifies the number of elements that are to
- be modified. This should be 1 if the targeted
- uniform variable is not an array, and 1 or more if it is
- an array.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter></term>
- <listitem>
- <para>Specifies a pointer to an array of
- <parameter>count</parameter> values that will be
- used to update the specified uniform
- variable.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix2fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix3fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix4fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix2x3fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix3x2fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix2x4fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix4x2fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix3x4fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glUniformMatrix4x3fv</function></funcdef>
- <paramdef>GLint <parameter>location</parameter></paramdef>
- <paramdef>GLsizei <parameter>count</parameter></paramdef>
- <paramdef>GLboolean <parameter>transpose</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>value</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters3"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>location</parameter></term>
- <listitem>
- <para>Specifies the location of the uniform value to
- be modified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>count</parameter></term>
- <listitem>
- <para>Specifies the number of matrices that are to
- be modified. This should be 1 if the targeted
- uniform variable is not an array of matrices, and 1 or more if it is
- an array of matrices.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>transpose</parameter></term>
- <listitem>
- <para>Specifies whether to transpose the matrix as
- the values are loaded into the uniform
- variable.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>value</parameter></term>
- <listitem>
- <para>Specifies a pointer to an array of
- <parameter>count</parameter> values that will be
- used to update the specified uniform
- variable.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glUniform</function> modifies the value of a
- uniform variable or a uniform variable array. The location of
- the uniform variable to be modified is specified by
- <parameter>location</parameter>, which should be a value
- returned by
- <citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>.
- <function>glUniform</function> operates on the program object
- that was made part of current state by calling
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry>.</para>
-
- <para>The commands <function>glUniform{1|2|3|4}{f|i}</function>
- are used to change the value of the uniform variable specified
- by <parameter>location</parameter> using the values passed as
- arguments. The number specified in the command should match the
- number of components in the data type of the specified uniform
- variable (e.g., <function>1</function> for float, int, bool;
- <function>2</function> for vec2, ivec2, bvec2, etc.). The suffix
- <function>f</function> indicates that floating-point values are
- being passed; the suffix <function>i</function> indicates that
- integer values are being passed, and this type should also match
- the data type of the specified uniform variable. The
- <function>i</function> variants of this function should be used
- to provide values for uniform variables defined as int, ivec2,
- ivec3, ivec4, or arrays of these. The <function>f</function>
- variants should be used to provide values for uniform variables
- of type float, vec2, vec3, vec4, or arrays of these. Either the
- <function>i</function> or the <function>f</function> variants
- may be used to provide values for uniform variables of type
- bool, bvec2, bvec3, bvec4, or arrays of these. The uniform
- variable will be set to false if the input value is 0 or 0.0f,
- and it will be set to true otherwise.</para>
-
- <para>All active uniform variables defined in a program object
- are initialized to 0 when the program object is linked
- successfully. They retain the values assigned to them by a call
- to <function>glUniform </function> until the next successful
- link operation occurs on the program object, when they are once
- again initialized to 0.</para>
-
- <para>The commands <function>glUniform{1|2|3|4}{f|i}v</function>
- can be used to modify a single uniform variable or a uniform
- variable array. These commands pass a count and a pointer to the
- values to be loaded into a uniform variable or a uniform
- variable array. A count of 1 should be used if modifying the
- value of a single uniform variable, and a count of 1 or greater
- can be used to modify an entire array or part of an array. When
- loading <emphasis>n</emphasis> elements starting at an arbitrary
- position <emphasis>m</emphasis> in a uniform variable array,
- elements <emphasis>m</emphasis> + <emphasis>n</emphasis> - 1 in
- the array will be replaced with the new values. If
- <parameter>m</parameter> + <parameter>n</parameter> - 1 is
- larger than the size of the uniform variable array, values for
- all array elements beyond the end of the array will be ignored.
- The number specified in the name of the command indicates the
- number of components for each element in
- <parameter>value</parameter>, and it should match the number of
- components in the data type of the specified uniform variable
- (e.g., <function>1</function> for float, int, bool;
- <function>2</function> for vec2, ivec2, bvec2, etc.). The data
- type specified in the name of the command must match the data
- type for the specified uniform variable as described previously
- for <function>glUniform{1|2|3|4}{f|i}</function>.</para>
-
- <para>For uniform variable arrays, each element of the array is
- considered to be of the type indicated in the name of the
- command (e.g., <function>glUniform3f</function> or
- <function>glUniform3fv</function> can be used to load a uniform
- variable array of type vec3). The number of elements of the
- uniform variable array to be modified is specified by
- <parameter>count</parameter></para>
-
- <para>The commands
- <function>glUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv</function>
- are used to modify a matrix or an array of matrices. The numbers in the
- command name are interpreted as the dimensionality of the matrix.
- The number <function>2</function> indicates a 2 × 2 matrix
- (i.e., 4 values), the number <function>3</function> indicates a
- 3 × 3 matrix (i.e., 9 values), and the number
- <function>4</function> indicates a 4 × 4 matrix (i.e., 16
- values). Non-square matrix dimensionality is explicit, with the first
- number representing the number of columns and the second number
- representing the number of rows. For example,
- <function>2x4</function> indicates a 2 × 4 matrix with 2 columns
- and 4 rows (i.e., 8 values).
- If <parameter>transpose</parameter> is
- <constant>GL_FALSE</constant>, each matrix is assumed to be
- supplied in column major order. If
- <parameter>transpose</parameter> is
- <constant>GL_TRUE</constant>, each matrix is assumed to be
- supplied in row major order. The <parameter>count</parameter>
- argument indicates the number of matrices to be passed. A count
- of 1 should be used if modifying the value of a single matrix,
- and a count greater than 1 can be used to modify an array of
- matrices.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glUniform</function> is available only if the GL
- version is 2.0 or greater.</para>
-
- <para><function>glUniformMatrix{2x3|3x2|2x4|4x2|3x4|4x3}fv</function>
- is available only if the GL version is 2.1 or greater.</para>
-
- <para><function>glUniform1i</function> and
- <function>glUniform1iv</function> are the only two functions
- that may be used to load uniform variables defined as sampler
- types. Loading samplers with any other function will result in a
- <constant>GL_INVALID_OPERATION</constant> error.</para>
-
- <para>If <parameter>count</parameter> is greater than 1 and the
- indicated uniform variable is not an array, a
- <constant>GL_INVALID_OPERATION</constant> error is generated and the
- specified uniform variable will remain unchanged.</para>
-
- <para>Other than the preceding exceptions, if the type and size
- of the uniform variable as defined in the shader do not match
- the type and size specified in the name of the command used to
- load its value, a <constant>GL_INVALID_OPERATION</constant> error will
- be generated and the specified uniform variable will remain
- unchanged.</para>
-
- <para>If <parameter>location</parameter> is a value other than
- -1 and it does not represent a valid uniform variable location
- in the current program object, an error will be generated, and
- no changes will be made to the uniform variable storage of the
- current program object. If <parameter>location</parameter> is
- equal to -1, the data passed in will be silently ignored and the
- specified uniform variable will not be changed.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_OPERATION</constant> is generated if there
- is no current program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if the
- size of the uniform variable declared in the shader does not
- match the size indicated by the <function>glUniform</function>
- command.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if one of
- the integer variants of this function is used to load a uniform
- variable of type float, vec2, vec3, vec4, or an array of these,
- or if one of the floating-point variants of this function is
- used to load a uniform variable of type int, ivec2, ivec3, or
- ivec4, or an array of these.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>location</parameter> is an invalid uniform location
- for the current program object and
- <parameter>location</parameter> is not equal to -1.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>count</parameter> is less than 0.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>count</parameter> is greater than 1 and the indicated
- uniform variable is not an array variable.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if a
- sampler is loaded using a command other than
- <function>glUniform1i</function> and
- <function>glUniform1iv</function>.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glUniform</function> is executed between the execution
- of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
-
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with the handle of a program object and the index of an active uniform variable</para>
-
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- with the handle of a program object and the location of a
- uniform variable</para>
-
- <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- with the handle of a program object and the name of a uniform
- variable</para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glUseProgram">
- <refmeta>
- <refentrytitle>glUseProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glUseProgram</refname>
- <refpurpose>Installs a program object as part of current rendering state</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glUseProgram</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the handle of the program object
- whose executables are to be used as part of current
- rendering state.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glUseProgram</function> installs the program
- object specified by <parameter>program</parameter> as part of
- current rendering state. One or more executables are created in
- a program object by successfully attaching shader objects to it
- with
- <citerefentry><refentrytitle>glAttachShader</refentrytitle></citerefentry>,
- successfully compiling the shader objects with
- <citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- and successfully linking the program object with
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>.
- </para>
-
- <para>A program object will contain an executable that will run
- on the vertex processor if it contains one or more shader
- objects of type <constant>GL_VERTEX_SHADER</constant> that have
- been successfully compiled and linked. Similarly, a program
- object will contain an executable that will run on the fragment
- processor if it contains one or more shader objects of type
- <constant>GL_FRAGMENT_SHADER</constant> that have been
- successfully compiled and linked.</para>
-
- <para>Successfully installing an executable on a programmable
- processor will cause the corresponding fixed functionality of
- OpenGL to be disabled. Specifically, if an executable is
- installed on the vertex processor, the OpenGL fixed
- functionality will be disabled as follows.</para>
-
- <itemizedlist>
- <listitem>
- <para>The modelview matrix is not applied to vertex
- coordinates.</para>
- </listitem>
- <listitem>
- <para>The projection matrix is not applied to vertex
- coordinates.</para>
- </listitem>
- <listitem>
- <para>The texture matrices are not applied to texture
- coordinates.</para>
- </listitem>
- <listitem>
- <para>Normals are not transformed to eye
- coordinates.</para>
- </listitem>
- <listitem>
- <para>Normals are not rescaled or normalized.</para>
- </listitem>
- <listitem>
- <para>Normalization of
- <constant>GL_AUTO_NORMAL</constant> evaluated normals is
- not performed.</para>
- </listitem>
- <listitem>
- <para>Texture coordinates are not generated
- automatically.</para>
- </listitem>
- <listitem>
- <para>Per-vertex lighting is not performed.</para>
- </listitem>
- <listitem>
- <para>Color material computations are not
- performed.</para>
- </listitem>
- <listitem>
- <para>Color index lighting is not performed.</para>
- </listitem>
- <listitem>
- <para>This list also applies when setting the current
- raster position.</para>
- </listitem>
- </itemizedlist>
-
- <para>The executable that is installed on the vertex processor
- is expected to implement any or all of the desired functionality
- from the preceding list. Similarly, if an executable is
- installed on the fragment processor, the OpenGL fixed
- functionality will be disabled as follows.</para>
-
- <itemizedlist>
- <listitem>
- <para>Texture environment and texture functions are not
- applied.</para>
- </listitem>
- <listitem>
- <para>Texture application is not applied.</para>
- </listitem>
- <listitem>
- <para>Color sum is not applied.</para>
- </listitem>
- <listitem>
- <para>Fog is not applied.</para>
- </listitem>
- </itemizedlist>
-
- <para>Again, the fragment shader that is installed is expected
- to implement any or all of the desired functionality from the
- preceding list.</para>
-
- <para>While a program object is in use, applications are free to
- modify attached shader objects, compile attached shader objects,
- attach additional shader objects, and detach or delete shader
- objects. None of these operations will affect the executables
- that are part of the current state. However, relinking the
- program object that is currently in use will install the program
- object as part of the current rendering state if the link
- operation was successful (see
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
- ). If the program object currently in use is relinked
- unsuccessfully, its link status will be set to
- <constant>GL_FALSE</constant>, but the executables and
- associated state will remain part of the current state until a
- subsequent call to <function>glUseProgram</function> removes it
- from use. After it is removed from use, it cannot be made part
- of current state until it has been successfully relinked.</para>
-
- <para>If <parameter>program</parameter> contains shader objects
- of type <constant>GL_VERTEX_SHADER</constant> but it does not
- contain shader objects of type
- <constant>GL_FRAGMENT_SHADER</constant>, an executable will be
- installed on the vertex processor, but fixed functionality will
- be used for fragment processing. Similarly, if
- <parameter>program</parameter> contains shader objects of type
- <constant>GL_FRAGMENT_SHADER</constant> but it does not contain
- shader objects of type <constant>GL_VERTEX_SHADER</constant>, an
- executable will be installed on the fragment processor, but
- fixed functionality will be used for vertex processing. If
- <parameter>program</parameter> is 0, the programmable processors
- will be disabled, and fixed functionality will be used for both
- vertex and fragment processing.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glUseProgram</function> is available only if the
- GL version is 2.0 or greater.</para>
-
- <para>While a program object is in use, the state that controls
- the disabled fixed functionality may also be updated using the
- normal OpenGL calls.</para>
-
- <para>Like display lists and texture objects, the name space for
- program objects may be shared across a set of contexts, as long
- as the server sides of the contexts share the same address
- space. If the name space is shared across contexts, any attached
- objects and the data associated with those attached objects are
- shared as well.</para>
-
- <para>Applications are responsible for providing the
- synchronization across API calls when objects are accessed from
- different execution threads.</para>
-
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is neither 0 nor a value
- generated by OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> could not be made part of current
- state.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glUseProgram</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
-
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with a valid program object and the index of an active attribute
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetActiveUniform</refentrytitle></citerefentry>
- with a valid program object and the index of an active uniform
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetAttachedShaders</refentrytitle></citerefentry>
- with a valid program object</para>
-
- <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
- with a valid program object and the name of an attribute
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with a valid program object and the parameter to be queried</para>
-
- <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
- with a valid program object</para>
-
- <para><citerefentry><refentrytitle>glGetUniform</refentrytitle></citerefentry>
- with a valid program object and the location of a uniform
- variable</para>
-
- <para><citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
- with a valid program object and the name of a uniform
- variable</para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>gllAttachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCompileShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glCreateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDeleteProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDetachShader</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUniform</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glValidateProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttrib</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glValidateProgram">
- <refmeta>
- <refentrytitle>glValidateProgram</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glValidateProgram</refname>
- <refpurpose>Validates a program object</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glValidateProgram</function></funcdef>
- <paramdef>GLuint <parameter>program</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>program</parameter></term>
- <listitem>
- <para>Specifies the handle of the program object to
- be validated.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glValidateProgram</function> checks to see
- whether the executables contained in
- <parameter>program</parameter> can execute given the current
- OpenGL state. The information generated by the validation
- process will be stored in <parameter>program</parameter>'s
- information log. The validation information may consist of an
- empty string, or it may be a string containing information about
- how the current program object interacts with the rest of
- current OpenGL state. This provides a way for OpenGL
- implementers to convey more information about why the current
- program is inefficient, suboptimal, failing to execute, and so
- on.</para>
-
- <para>The status of the validation operation will be stored as
- part of the program object's state. This value will be set to
- <constant>GL_TRUE</constant> if the validation succeeded, and
- <constant>GL_FALSE</constant> otherwise. It can be queried by
- calling
- <citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_VALIDATE_STATUS</constant>. If validation is
- successful, <parameter>program</parameter> is guaranteed to
- execute given the current state. Otherwise,
- <parameter>program</parameter> is guaranteed to not execute.</para>
-
- <para>This function is typically useful only during application
- development. The informational string stored in the information
- log is completely implementation dependent; therefore, an
- application should not expect different OpenGL implementations
- to produce identical information strings.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glValidateProgram</function> is available only
- if the GL version is 2.0 or greater.</para>
-
- <para>This function mimics the validation operation that OpenGL
- implementations must perform when rendering commands are issued
- while programmable shaders are part of current state. The error
- <constant>GL_INVALID_OPERATION</constant> will be generated by
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glRasterPos</refentrytitle></citerefentry>,
- or any command that performs an implicit call to
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- if:</para>
-
- <itemizedlist>
- <listitem>
- <para>any two active samplers in the current program
- object are of different types, but refer to the same
- texture image unit,</para>
- </listitem>
- <listitem>
- <para>any active sampler in the current program object
- refers to a texture image unit where fixed-function
- fragment processing accesses a texture target that does
- not match the sampler type, or</para>
- </listitem>
- <listitem>
- <para>the sum of the number of active samplers in the
- program and the number of texture image units enabled
- for fixed-function fragment processing exceeds the
- combined limit on the total number of texture image
- units allowed.</para>
- </listitem>
- </itemizedlist>
-
- <para>It may be difficult or cause a performance degradation for
- applications to catch these errors when rendering commands are
- issued. Therefore, applications are advised to make calls to
- <function>glValidateProgram</function> to detect these issues
- during application development.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>program</parameter> is not a value generated by
- OpenGL.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <parameter>program</parameter> is not a program object.</para>
-
- <para><constant>GL_INVALID_OPERATION</constant> is generated if
- <function>glValidateProgram</function> is executed between the
- execution of
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>
- with arguments <parameter>program</parameter> and
- <constant>GL_VALIDATE_STATUS</constant></para>
-
- <para><citerefentry><refentrytitle>glGetProgramInfoLog</refentrytitle></citerefentry>
- with argument <parameter>program</parameter></para>
-
- <para><citerefentry><refentrytitle>glIsProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glUseProgram</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glVertexAttrib">
- <refmeta>
- <refentrytitle>glVertexAttrib</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glVertexAttrib</refname>
- <refpurpose>Specifies the value of a generic vertex attribute</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib1f</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib1s</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLshort <parameter>v0</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib1d</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLdouble <parameter>v0</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib2f</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- <paramdef>GLfloat <parameter>v1</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib2s</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLshort <parameter>v0</parameter></paramdef>
- <paramdef>GLshort <parameter>v1</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib2d</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLdouble <parameter>v0</parameter></paramdef>
- <paramdef>GLdouble <parameter>v1</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib3f</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- <paramdef>GLfloat <parameter>v1</parameter></paramdef>
- <paramdef>GLfloat <parameter>v2</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib3s</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLshort <parameter>v0</parameter></paramdef>
- <paramdef>GLshort <parameter>v1</parameter></paramdef>
- <paramdef>GLshort <parameter>v2</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib3d</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLdouble <parameter>v0</parameter></paramdef>
- <paramdef>GLdouble <parameter>v1</parameter></paramdef>
- <paramdef>GLdouble <parameter>v2</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4f</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLfloat <parameter>v0</parameter></paramdef>
- <paramdef>GLfloat <parameter>v1</parameter></paramdef>
- <paramdef>GLfloat <parameter>v2</parameter></paramdef>
- <paramdef>GLfloat <parameter>v3</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4s</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLshort <parameter>v0</parameter></paramdef>
- <paramdef>GLshort <parameter>v1</parameter></paramdef>
- <paramdef>GLshort <parameter>v2</parameter></paramdef>
- <paramdef>GLshort <parameter>v3</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4d</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLdouble <parameter>v0</parameter></paramdef>
- <paramdef>GLdouble <parameter>v1</parameter></paramdef>
- <paramdef>GLdouble <parameter>v2</parameter></paramdef>
- <paramdef>GLdouble <parameter>v3</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Nub</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLubyte <parameter>v0</parameter></paramdef>
- <paramdef>GLubyte <parameter>v1</parameter></paramdef>
- <paramdef>GLubyte <parameter>v2</parameter></paramdef>
- <paramdef>GLubyte <parameter>v3</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the generic vertex
- attribute to be modified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
- <parameter>v0</parameter>,
- <parameter>v1</parameter>,
- <parameter>v2</parameter>,
- <parameter>v3</parameter>
- </term>
- <listitem>
- <para>Specifies the new values to be used for the
- specified vertex attribute.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib1fv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib1sv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLshort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib1dv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib2fv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib2sv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLshort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib2dv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib3fv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib3sv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLshort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib3dv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4fv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLfloat *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4sv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLshort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4dv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLdouble *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4iv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLint *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4bv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLbyte *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4ubv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLubyte *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4usv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLushort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4uiv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLuint *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Nbv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLbyte *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Nsv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLshort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Niv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLint *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Nubv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLubyte *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Nusv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLushort *<parameter>v</parameter></paramdef>
- </funcprototype>
- <funcprototype>
- <funcdef>void <function>glVertexAttrib4Nuiv</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>const GLuint *<parameter>v</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters2"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the generic vertex
- attribute to be modified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>v</parameter></term>
- <listitem>
- <para>Specifies a pointer to an array of values to
- be used for the generic vertex attribute.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>OpenGL defines a number of standard vertex attributes that
- applications can modify with standard API entry points (color,
- normal, texture coordinates, etc.). The
- <function>glVertexAttrib</function> family of entry points
- allows an application to pass generic vertex attributes in
- numbered locations.</para>
-
- <para>Generic attributes are defined as four-component values
- that are organized into an array. The first entry of this array
- is numbered 0, and the size of the array is specified by the
- implementation-dependent constant
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>. Individual elements
- of this array can be modified with a
- <function>glVertexAttrib</function> call that specifies the
- index of the element to be modified and a value for that
- element.</para>
-
- <para>These commands can be used to specify one, two, three, or
- all four components of the generic vertex attribute specified by
- <parameter>index</parameter>. A <function>1</function> in the
- name of the command indicates that only one value is passed, and
- it will be used to modify the first component of the generic
- vertex attribute. The second and third components will be set to
- 0, and the fourth component will be set to 1. Similarly, a
- <function>2</function> in the name of the command indicates that
- values are provided for the first two components, the third
- component will be set to 0, and the fourth component will be set
- to 1. A <function>3</function> in the name of the command
- indicates that values are provided for the first three
- components and the fourth component will be set to 1, whereas a
- <function>4</function> in the name indicates that values are
- provided for all four components.</para>
-
- <para>The letters <function>s</function>,
- <function>f</function>, <function>i</function>,
- <function>d</function>, <function>ub</function>,
- <function>us</function>, and <function>ui</function> indicate
- whether the arguments are of type short, float, int, double,
- unsigned byte, unsigned short, or unsigned int. When
- <function>v</function> is appended to the name, the commands can
- take a pointer to an array of such values. The commands
- containing <function>N</function> indicate that the arguments
- will be passed as fixed-point values that are scaled to a
- normalized range according to the component conversion rules
- defined by the OpenGL specification. Signed values are
- understood to represent fixed-point values in the range [-1,1],
- and unsigned values are understood to represent fixed-point
- values in the range [0,1].</para>
-
- <para>OpenGL Shading Language attribute variables are allowed to
- be of type mat2, mat3, or mat4. Attributes of these types may be
- loaded using the <function>glVertexAttrib</function> entry
- points. Matrices must be loaded into successive generic
- attribute slots in column major order, with one column of the
- matrix in each generic attribute slot.</para>
-
- <para>A user-defined attribute variable declared in a vertex
- shader can be bound to a generic attribute index by calling
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>.
- This allows an application to use more descriptive variable
- names in a vertex shader. A subsequent change to the specified
- generic vertex attribute will be immediately reflected as a
- change to the corresponding attribute variable in the vertex
- shader.</para>
-
- <para>The binding between a generic vertex attribute index and a
- user-defined attribute variable in a vertex shader is part of
- the state of a program object, but the current value of the
- generic vertex attribute is not. The value of each generic
- vertex attribute is part of current state, just like standard
- vertex attributes, and it is maintained even if a different
- program object is used.</para>
-
- <para>An application may freely modify generic vertex attributes
- that are not bound to a named vertex shader attribute variable.
- These values are simply maintained as part of current state and
- will not be accessed by the vertex shader. If a generic vertex
- attribute bound to an attribute variable in a vertex shader is
- not updated while the vertex shader is executing, the vertex
- shader will repeatedly use the current value for the generic
- vertex attribute.</para>
-
- <para>The generic vertex attribute with index 0 is the same as
- the vertex position attribute previously defined by OpenGL. A
- <citerefentry><refentrytitle>glVertex2</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertex3</refentrytitle></citerefentry>,
- or
- <citerefentry><refentrytitle>glVertex4</refentrytitle></citerefentry>
- command is completely equivalent to the corresponding
- <function>glVertexAttrib</function> command with an index
- argument of 0. A vertex shader can access generic vertex
- attribute 0 by using the built-in attribute variable
- <parameter>gl_Vertex</parameter>. There are no current values
- for generic vertex attribute 0. This is the only generic vertex
- attribute with this property; calls to set other standard vertex
- attributes can be freely mixed with calls to set any of the
- other generic vertex attributes.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glVertexAttrib</function> is available only if
- the GL version is 2.0 or greater.</para>
-
- <para>Generic vertex attributes can be updated at any time. In
- particular, <function>glVertexAttrib</function> can be called
- between a call to
- <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding call to
- <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.</para>
-
- <para>It is possible for an application to bind more than one
- attribute name to the same generic vertex attribute index. This
- is referred to as aliasing, and it is allowed only if just one
- of the aliased attribute variables is active in the vertex
- shader, or if no path through the vertex shader consumes more
- than one of the attributes aliased to the same location. OpenGL
- implementations are not required to do error checking to detect
- aliasing, they are allowed to assume that aliasing will not
- occur, and they are allowed to employ optimizations that work
- only in the absence of aliasing.</para>
-
- <para>There is no provision for binding standard vertex
- attributes; therefore, it is not possible to alias generic
- attributes with standard attributes.</para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
- with the argument <constant>GL_CURRENT_PROGRAM</constant></para>
-
- <para><citerefentry><refentrytitle>glGetActiveAttrib</refentrytitle></citerefentry>
- with argument <parameter>program</parameter> and the index of an active
- attribute variable</para>
-
- <para><citerefentry><refentrytitle>glGetAttribLocation</refentrytitle></citerefentry>
- with argument <parameter>program</parameter> and an attribute
- variable name</para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <constant>GL_CURRENT_VERTEX_ATTRIB</constant> and
- <parameter>index</parameter></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertex</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry></para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glVertexAttribPointer">
- <refmeta>
- <refentrytitle>glVertexAttribPointer</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glVertexAttribPointer</refname>
- <refpurpose>define an array of generic vertex attribute data</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glVertexAttribPointer</function></funcdef>
- <paramdef>GLuint <parameter>index</parameter></paramdef>
- <paramdef>GLint <parameter>size</parameter></paramdef>
- <paramdef>GLenum <parameter>type</parameter></paramdef>
- <paramdef>GLboolean <parameter>normalized</parameter></paramdef>
- <paramdef>GLsizei <parameter>stride</parameter></paramdef>
- <paramdef>const GLvoid * <parameter>pointer</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>index</parameter></term>
- <listitem>
- <para>Specifies the index of the generic vertex
- attribute to be modified.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>size</parameter></term>
- <listitem>
- <para>Specifies the number of components per
- generic vertex attribute. Must
- be 1, 2, 3, or 4. The initial value is 4.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>type</parameter></term>
- <listitem>
- <para>Specifies the data type of each component in
- the array. Symbolic constants
- <constant>GL_BYTE</constant>,
- <constant>GL_UNSIGNED_BYTE</constant>,
- <constant>GL_SHORT</constant>,
- <constant>GL_UNSIGNED_SHORT</constant>,
- <constant>GL_INT</constant>,
- <constant>GL_UNSIGNED_INT</constant>,
- <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>normalized</parameter></term>
- <listitem>
- <para>Specifies whether fixed-point data values
- should be normalized (<constant>GL_TRUE</constant>)
- or converted directly as fixed-point values
- (<constant>GL_FALSE</constant>) when they are
- accessed.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>stride</parameter></term>
- <listitem>
- <para>Specifies the byte offset between consecutive
- generic vertex attributes. If <parameter>stride</parameter>
- is 0, the generic vertex attributes are
- understood to be tightly packed in the
- array. The initial value is 0.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>pointer</parameter></term>
- <listitem>
- <para>Specifies a pointer to the first component of
- the first generic vertex attribute in the array. The initial value is 0.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para><function>glVertexAttribPointer</function> specifies the
- location and data format of the array of generic vertex attributes at index <parameter>index</parameter>
- to use when rendering. <parameter>size</parameter>
- specifies the number of components per attribute and must be 1,
- 2, 3, or 4. <parameter>type</parameter> specifies the data type
- of each component, and <parameter>stride</parameter> specifies
- the byte stride from one attribute to the next, allowing vertices and
- attributes to be packed into a single array or
- stored in separate arrays.
- If set to <constant>GL_TRUE</constant>,
- <parameter>normalized</parameter> indicates that values stored
- in an integer format are to be mapped to the range [-1,1] (for
- signed values) or [0,1] (for unsigned values) when they are
- accessed and converted to floating point. Otherwise, values will
- be converted to floats directly without normalization.</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 generic vertex attribute 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 generic vertex attribute array
- client-side state (<constant>GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</constant>) for index <parameter>index</parameter>.</para>
-
- <para>When a generic vertex attribute array is specified,
- <parameter>size</parameter>, <parameter>type</parameter>,
- <parameter>normalized</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 a generic vertex attribute array,
- call
- <citerefentry><refentrytitle>glEnableVertexAttribArray</refentrytitle></citerefentry>
- and
- <citerefentry><refentrytitle>glDisableVertexAttribArray</refentrytitle></citerefentry>
- with <parameter>index</parameter>. If enabled, the generic
- vertex attribute array is used when
- <citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMultiDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glMultiDrawElements</refentrytitle></citerefentry>, or
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>
- is called.</para>
- </refsect1>
- <refsect1 id="notes"><title>Notes</title>
- <para><function>glVertexAttribPointer</function> is available
- only if the GL version is 2.0 or greater.</para>
-
- <para>Each generic vertex attribute 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>glVertexAttribPointer</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>glVertexAttribPointer</function> is typically
- implemented on the client side.</para>
-
- <para>Generic vertex attribute 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_VALUE</constant> is generated if
- <parameter>index</parameter> is greater than or equal to
- <constant>GL_MAX_VERTEX_ATTRIBS</constant>.</para>
-
- <para><constant>GL_INVALID_VALUE</constant> is generated if
- <parameter>size</parameter> is not 1, 2, 3, or 4.</para>
-
- <para><constant>GL_INVALID_ENUM</constant> is generated if
- <parameter>type</parameter> is not an accepted value.</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>glGet</refentrytitle></citerefentry>
- with argument <constant>GL_MAX_VERTEX_ATTRIBS</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and <constant>GL_VERTEX_ATTRIB_ARRAY_ENABLED</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and <constant>GL_VERTEX_ATTRIB_ARRAY_SIZE</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and <constant>GL_VERTEX_ATTRIB_ARRAY_TYPE</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and <constant>GL_VERTEX_ATTRIB_ARRAY_NORMALIZED</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and <constant>GL_VERTEX_ATTRIB_ARRAY_STRIDE</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and <constant>GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</constant></para>
-
- <para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_ARRAY_BUFFER_BINDING</constant></para>
-
- <para><citerefentry><refentrytitle>glGetVertexAttribPointerv</refentrytitle></citerefentry>
- with arguments <parameter>index</parameter> and
- <constant>GL_VERTEX_ATTRIB_ARRAY_POINTER</constant></para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para><citerefentry><refentrytitle>glArrayElement</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindAttribLocation</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glColorPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDisableVertexAttribArray</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEnableVertexAttribArray</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glEdgeFlagPointer</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glFogCoordPointer</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>glVertexAttrib</refentrytitle></citerefentry>,
- <citerefentry><refentrytitle>glVertexPointer</refentrytitle></citerefentry>
- </para>
- </refsect1>
- <refsect1 id="Copyright"><title>Copyright</title>
- <para>
- Copyright <trademark class="copyright"></trademark> 2003-2005 3Dlabs Inc. Ltd.
- This material may be distributed subject to the terms and conditions set forth in
- the Open Publication License, v 1.0, 8 June 1999.
- <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
- </para>
- </refsect1>
-</refentry>
+++ /dev/null
-<?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="glViewport">
- <refmeta>
- <refmetainfo>
- <copyright>
- <year>1991-2006</year>
- <holder>Silicon Graphics, Inc.</holder>
- </copyright>
- </refmetainfo>
- <refentrytitle>glViewport</refentrytitle>
- <manvolnum>3G</manvolnum>
- </refmeta>
- <refnamediv>
- <refname>glViewport</refname>
- <refpurpose>set the viewport</refpurpose>
- </refnamediv>
- <refsynopsisdiv><title>C Specification</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>void <function>glViewport</function></funcdef>
- <paramdef>GLint <parameter>x</parameter></paramdef>
- <paramdef>GLint <parameter>y</parameter></paramdef>
- <paramdef>GLsizei <parameter>width</parameter></paramdef>
- <paramdef>GLsizei <parameter>height</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- </refsynopsisdiv>
- <!-- eqn: ignoring delim $$ -->
- <refsect1 id="parameters"><title>Parameters</title>
- <variablelist>
- <varlistentry>
- <term><parameter>x</parameter></term>
- <term><parameter>y</parameter></term>
- <listitem>
- <para>
- Specify the lower left corner of the viewport rectangle,
- in pixels. The initial value is (0,0).
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>width</parameter></term>
- <term><parameter>height</parameter></term>
- <listitem>
- <para>
- Specify the width and height
- of the viewport.
- When a GL context is first attached to a window,
- <parameter>width</parameter> and <parameter>height</parameter> are set to the dimensions of that
- window.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1 id="description"><title>Description</title>
- <para>
- <function>glViewport</function> specifies the affine transformation of
- <inlineequation><mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math></inlineequation>
- and
- <inlineequation><mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math></inlineequation>
- from
- normalized device coordinates to window coordinates.
- Let
- <inlineequation><mml:math>
- <!-- eqn: (x sub nd, y sub nd):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">nd</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">nd</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- be normalized device coordinates.
- Then the window coordinates
- <inlineequation><mml:math>
- <!-- eqn: (x sub w, y sub w):-->
- <mml:mfenced open="(" close=")">
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- </mml:mfenced>
- </mml:math></inlineequation>
- are computed as follows:
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: x sub w = ( x sub nd + 1 ) left ( width over 2 right ) + x:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">x</mml:mi>
- <mml:mi mathvariant="italic">nd</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:mi mathvariant="italic">width</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">x</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- <informalequation><mml:math>
- <!-- eqn: y sub w = ( y sub nd + 1 ) left ( height over 2 right ) + y:-->
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">w</mml:mi>
- </mml:msub>
- <mml:mo>=</mml:mo>
- <mml:mrow>
- <mml:mfenced open="(" close=")">
- <mml:mrow>
- <mml:msub><mml:mi mathvariant="italic">y</mml:mi>
- <mml:mi mathvariant="italic">nd</mml:mi>
- </mml:msub>
- <mml:mo>+</mml:mo>
- <mml:mn>1</mml:mn>
- </mml:mrow>
- </mml:mfenced>
- <mml:mo>⁢</mml:mo>
- <mml:mfenced open="(" close=")">
- <mml:mfrac>
- <mml:mi mathvariant="italic">height</mml:mi>
- <mml:mn>2</mml:mn>
- </mml:mfrac>
- </mml:mfenced>
- <mml:mo>+</mml:mo>
- <mml:mi mathvariant="italic">y</mml:mi>
- </mml:mrow>
- </mml:mrow>
- </mml:math></informalequation>
- </para>
- <para>
- Viewport width and height are silently clamped
- to a range that depends on the implementation.
- To query this range, call <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument
- <constant>GL_MAX_VIEWPORT_DIMS</constant>.
- </para>
- </refsect1>
- <refsect1 id="errors"><title>Errors</title>
- <para>
- <constant>GL_INVALID_VALUE</constant> is generated if either <parameter>width</parameter> or <parameter>height</parameter> is negative.
- </para>
- <para>
- <constant>GL_INVALID_OPERATION</constant> is generated if <function>glViewport</function>
- is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry>
- and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>.
- </para>
- </refsect1>
- <refsect1 id="associatedgets"><title>Associated Gets</title>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_VIEWPORT</constant>
- </para>
- <para>
- <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_VIEWPORT_DIMS</constant>
- </para>
- </refsect1>
- <refsect1 id="seealso"><title>See Also</title>
- <para>
- <citerefentry><refentrytitle>glDepthRange</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>