mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-24 20:56:57 +00:00
Updated gl4 documentation according to latest manpages
This commit is contained in:
parent
af9d6dd928
commit
8107abeb01
131
Source/Bind/Specifications/Docs/glBindBuffersBase.xml
Normal file
131
Source/Bind/Specifications/Docs/glBindBuffersBase.xml
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?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="glBindBuffersBase">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindBuffersBase</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindBuffersBase</refname>
|
||||
<refpurpose>bind one or more buffer objects to a sequence of indexed buffer targets</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindBufferBase</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>first</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>buffers</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the bind operation. <parameter>target</parameter> must be
|
||||
one of <constant>GL_ATOMIC_COUNTER_BUFFER</constant>,
|
||||
<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, <constant>GL_UNIFORM_BUFFER</constant> or
|
||||
<constant>GL_SHADER_STORAGE_BUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the index of the first binding point within the array specified by <parameter>target</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of contiguous binding points to which to bind buffers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>buffers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A pointer to an array of names of buffer objects to bind to the targets on the specified binding point, or <constant>NULL</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindBuffersBase</function> binds a set of <parameter>count</parameter> buffer objects whose names
|
||||
are given in the array <parameter>buffers</parameter> to the <parameter>count</parameter> consecutive binding
|
||||
points starting from index <parameter>index</parameter> of the array of targets specified
|
||||
by <parameter>target</parameter>. If <parameter>buffers</parameter> is <constant>NULL</constant> then
|
||||
<function>glBindBuffersBase</function> unbinds any buffers that are currently bound to the referenced binding points.
|
||||
Assuming no errors are generated, it is equivalent to the following
|
||||
pseudo-code, which calls <citerefentry><refentrytitle>glBindBufferBase</refentrytitle></citerefentry>:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < count; i++)
|
||||
{
|
||||
if (buffers != NULL)
|
||||
{
|
||||
glBindBufferBase(target, first + i, buffers[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
glBindBufferBase(target, first + i, 0);
|
||||
}
|
||||
}]]></programlisting>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBindBuffersBase</function> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER</constant>,
|
||||
<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, <constant>GL_UNIFORM_BUFFER</constant> or
|
||||
<constant>GL_SHADER_STORAGE_BUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>first</parameter> + <parameter>count</parameter> is greater
|
||||
than the number of target-specific indexed binding points.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any value in <parameter>buffers</parameter> is not
|
||||
zero or the name of an existing buffer object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBufferBase</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBufferRange</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBuffersRange</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> 2013 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>
|
144
Source/Bind/Specifications/Docs/glBindBuffersRange.xml
Normal file
144
Source/Bind/Specifications/Docs/glBindBuffersRange.xml
Normal file
|
@ -0,0 +1,144 @@
|
|||
<?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="glBindBuffersRange">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindBuffersRange</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindBuffersRange</refname>
|
||||
<refpurpose>bind ranges of one or more buffer objects to a sequence of indexed buffer targets</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindBuffersRange</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>first</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>buffers</parameter></paramdef>
|
||||
<paramdef>const GLintptr *<parameter>offsets</parameter></paramdef>
|
||||
<paramdef>const GLintptr *<parameter>sizes</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the bind operation. <parameter>target</parameter> must be
|
||||
one of <constant>GL_ATOMIC_COUNTER_BUFFER</constant>,
|
||||
<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, <constant>GL_UNIFORM_BUFFER</constant> or
|
||||
<constant>GL_SHADER_STORAGE_BUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the index of the first binding point within the array specified by <parameter>target</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of contiguous binding points to which to bind buffers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>buffers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A pointer to an array of names of buffer objects to bind to the targets on the specified binding point, or <constant>NULL</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindBuffersRange</function> binds a set of <parameter>count</parameter> ranges from buffer objects whose names
|
||||
are given in the array <parameter>buffers</parameter> to the <parameter>count</parameter> consecutive binding
|
||||
points starting from index <parameter>index</parameter> of the array of targets specified
|
||||
by <parameter>target</parameter>. <parameter>offsets</parameter> specifies the address of an array containing
|
||||
<parameter>count</parameter> starting offsets within the buffers, and <parameter>sizes</parameter> specifies the
|
||||
adderess of an array of <parameter>count</parameter> sizes of the ranges. If <parameter>buffers</parameter> is <constant>NULL</constant> then
|
||||
<parameter>offsets</parameter> and <parameter>sizes</parameter> are ignored and <function>glBindBuffersRange</function> unbinds any
|
||||
buffers that are currently bound to the referenced binding points. Assuming no errors are generated, it is equivalent to the following
|
||||
pseudo-code, which calls <citerefentry><refentrytitle>glBindBufferRange</refentrytitle></citerefentry>:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < count; i++)
|
||||
{
|
||||
if (buffers != NULL)
|
||||
{
|
||||
glBindBufferRange(target, first + i, buffers[i], offsets[i], sizes[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
glBindBufferBase(target, first + i, 0);
|
||||
}
|
||||
}]]></programlisting>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBindBuffersBase</function> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER</constant>,
|
||||
<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, <constant>GL_UNIFORM_BUFFER</constant> or
|
||||
<constant>GL_SHADER_STORAGE_BUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>first</parameter> + <parameter>count</parameter> is greater
|
||||
than the number of target-specific indexed binding points.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any value in <parameter>buffers</parameter> is not
|
||||
zero or the name of an existing buffer object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated by if any value in <parameter>offsets</parameter> is less than zero or
|
||||
if any value in <parameter>sizes</parameter> is less than zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if any pair of values in <parameter>offsets</parameter>
|
||||
and <parameter>sizes</parameter> does not respectively satisfy the constraints described for those
|
||||
parameters for the specified target.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBufferBase</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBufferRange</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBuffersRange</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> 2013 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>
|
332
Source/Bind/Specifications/Docs/glBindImageTexture.xml
Normal file
332
Source/Bind/Specifications/Docs/glBindImageTexture.xml
Normal file
|
@ -0,0 +1,332 @@
|
|||
<?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="glBindImageTexture">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2010</year>
|
||||
<holder>Khronos Group</holder>>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindImageTexture</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindImageTexture</refname>
|
||||
<refpurpose>bind a level of a texture to an image unit</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindImageTexture</function></funcdef>
|
||||
<paramdef>GLuint <parameter>unit</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>texture</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>level</parameter></paramdef>
|
||||
<paramdef>GLboolean <parameter>layered</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>layer</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>access</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>format</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>unit</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the index of the image unit to which to bind the texture
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>texture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the name of the texture to bind to the image unit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>level</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the level of the texture that is to be bound.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>layered</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether a layered texture binding is to be established.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>layer</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>layered</parameter> is <constant>GL_FALSE</constant>, specifies the layer of <parameter>texture</parameter> to be bound to the image unit. Ignored otherwise.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>access</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a token indicating the type of access that will be performed on the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the format that the elements of the image will be treated as for the purposes of formatted stores.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindImageTexture</function> binds a single level of a texture to an image unit for the purpose of
|
||||
reading and writing it from shaders. <parameter>unit</parameter> specifies the zero-based index of the image
|
||||
unit to which to bind the texture level. <parameter>texture</parameter> specifies the name of an existing texture
|
||||
object to bind to the image unit. If <parameter>texture</parameter> is zero, then any existing binding to
|
||||
the image unit is broken. <parameter>level</parameter> specifies the level of the texture to bind to the image
|
||||
unit.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>texture</parameter> is the name of a one-, two-, or three-dimensional array texture, a cube map
|
||||
or cube map array texture, or a two-dimensional multisample array texture, then it is possible to bind either
|
||||
the entire array, or only a single layer of the array to the image unit. In such cases, if <parameter>layered</parameter>
|
||||
is <constant>GL_TRUE</constant>, the entire array is attached to the image unit and <parameter>layer</parameter>
|
||||
is ignored. However, if <parameter>layered</parameter> is <constant>GL_FALSE</constant> then <parameter>layer</parameter>
|
||||
specifies the layer of the array to attach to the image unit.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>access</parameter> specifies the access types to be performed by shaders and may be set to
|
||||
<constant>GL_READ_ONLY</constant>, <constant>GL_WRITE_ONLY</constant>, or <constant>GL_READ_WRITE</constant>
|
||||
to indicate read-only, write-only or read-write access, respectively. Violation of the access type specified in <parameter>access</parameter>
|
||||
(for example, if a shader writes to an image bound with <parameter>access</parameter> set to <constant>GL_READ_ONLY</constant>)
|
||||
will lead to undefined results, possibly including program termination.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>format</parameter> specifies the format that is to be used when performing formatted stores into the
|
||||
image from shaders. <parameter>format</parameter> must be compatible with the texture's internal format and must
|
||||
be one of the formats listed in the following table.
|
||||
</para>
|
||||
<para>
|
||||
<table frame="topbot"><title>Internal Image Formats</title>
|
||||
<tgroup cols="2" align="left">
|
||||
<colspec align="left"/>
|
||||
<colspec align="left"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Image Unit Format
|
||||
</emphasis></entry>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Format Qualifier
|
||||
</emphasis></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA32F</constant></entry><entry><code>rgba32f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA16F</constant></entry><entry><code>rgba16f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG32F</constant></entry><entry><code>rg32f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG16F</constant></entry><entry><code>rg16f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R11F_G11F_B10F</constant></entry><entry><code>r11f_g11f_b10f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R32F</constant></entry><entry><code>r32f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R16F</constant></entry><entry><code>r16f</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA32UI</constant></entry><entry><code>rgba32ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA16UI</constant></entry><entry><code>rgba16ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGB10_A2UI</constant></entry><entry><code>rgb10_a2ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA8UI</constant></entry><entry><code>rgba8ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG32UI</constant></entry><entry><code>rg32ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG16UI</constant></entry><entry><code>rg16ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG8UI</constant></entry><entry><code>rg8ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R32UI</constant></entry><entry><code>r32ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R16UI</constant></entry><entry><code>r16ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R8UI</constant></entry><entry><code>r8ui</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA32I</constant></entry><entry><code>rgba32i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA16I</constant></entry><entry><code>rgba16i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA8I</constant></entry><entry><code>rgba8i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG32I</constant></entry><entry><code>rg32i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG16I</constant></entry><entry><code>rg16i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG8I</constant></entry><entry><code>rg8i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R32I</constant></entry><entry><code>r32i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R16I</constant></entry><entry><code>r16i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R8I</constant></entry><entry><code>r8i</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA16</constant></entry><entry><code>rgba16</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGB10_A2</constant></entry><entry><code>rgb10_a2</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA8</constant></entry><entry><code>rgba8</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG16</constant></entry><entry><code>rg16</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG8</constant></entry><entry><code>rg8</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R16</constant></entry><entry><code>r16</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R8</constant></entry><entry><code>r8</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA16_SNORM</constant></entry><entry><code>rgba16_snorm</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RGBA8_SNORM</constant></entry><entry><code>rgba8_snorm</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG16_SNORM</constant></entry><entry><code>rg16_snorm</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_RG8_SNORM</constant></entry><entry><code>rg8_snorm</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R16_SNORM</constant></entry><entry><code>r16_snorm</code></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><constant>GL_R8_SNORM</constant></entry><entry><code>r8_snorm</code></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
When a texture is bound to an image unit, the <parameter>format</parameter> parameter for the image
|
||||
unit need not exactly match the texture internal format as long as the formats are
|
||||
considered compatible as defined in the OpenGL Specification. The matching criterion used
|
||||
for a given texture may be determined by calling <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>
|
||||
with <parameter>value</parameter>
|
||||
set to <constant>GL_IMAGE_FORMAT_COMPATIBILITY_TYPE</constant>, with return values of <constant>GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE</constant>
|
||||
and <constant>GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS</constant>, specifying matches by size and class, respectively.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
The <function>glBindImageTexture</function> is available only if the GL version is 4.2 or greater.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>unit</parameter> greater than or equal to the
|
||||
value of <constant>GL_MAX_IMAGE_UNITS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not the name of
|
||||
an existing texture object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> or <parameter>layer</parameter>
|
||||
is less than zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>access</parameter> or <parameter>format</parameter>
|
||||
is not one of the supported tokens.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_IMAGE_BINDING_NAME</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_IMAGE_BINDING_LEVEL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_IMAGE_BINDING_LAYERED</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_IMAGE_BINDING_LAYER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_IMAGE_BINDING_ACCESS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_IMAGE_BINDING_FORMAT</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
160
Source/Bind/Specifications/Docs/glBindImageTextures.xml
Normal file
160
Source/Bind/Specifications/Docs/glBindImageTextures.xml
Normal file
|
@ -0,0 +1,160 @@
|
|||
<?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="glBindImageTextures">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindImageTextures</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindImageTextures</refname>
|
||||
<refpurpose>bind one or more named texture images to a sequence of consecutive image units</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindImageTextures</function></funcdef>
|
||||
<paramdef>GLuint <parameter>first</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>textures</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>first</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the first image unit to which a texture is to be bound.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of textures to bind.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>textures</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of names of existing texture objects.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindImageTextures</function> binds images from an array of existing texture objects to a specified
|
||||
number of consecutive image units. <parameter>count</parameter> specifies the number of texture
|
||||
objects whose names are stored in the array <parameter>textures</parameter>. That number
|
||||
of texture names are read from the array and bound to the <parameter>count</parameter> consecutive
|
||||
texture units starting from <parameter>first</parameter>.
|
||||
|
||||
If the name zero appears in the <parameter>textures</parameter> array, any existing binding
|
||||
to the image unit is reset. Any non-zero entry in <parameter>textures</parameter> must be the
|
||||
name of an existing texture object. When a non-zero entry in <parameter>textures</parameter> is
|
||||
present, the image at level zero is bound, the binding is considered layered, with the first
|
||||
layer set to zero, and the image is bound for read-write access. The image unit format
|
||||
parameter is taken from the internal format of the image at level zero of the texture object.
|
||||
For cube map textures, the internal format of the positive X image of level zero is used.
|
||||
|
||||
|
||||
If <parameter>textures</parameter> is <constant>NULL</constant> then it is as
|
||||
if an appropriately sized array containing only zeros had been specified.
|
||||
</para>
|
||||
<para>
|
||||
<function>glBindImageTextures</function> is equivalent to the following pseudo code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < count; i++) {
|
||||
if (textures == NULL || textures[i] = 0) {
|
||||
glBindImageTexture(first + i, 0, 0, GL_FALSE, 0, GL_READ_ONLY, GL_R8);
|
||||
} else {
|
||||
glBindImageTexture(first + i, textures[i], 0, GL_TRUE, 0, GL_READ_WRITE, lookupInternalFormat(textures[i]));
|
||||
}
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Each entry in <parameter>textures</parameter> will be checked individually and if found
|
||||
to be invalid, the state for that image unit will not be changed and an error will be
|
||||
generated. However, the state for other texture image units referenced by the command will still
|
||||
be updated.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBindImageTextures</function> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
<para>
|
||||
Note that because <function>glBindImageTextures</function> cannot create new textures (even if
|
||||
a name passed has been previously generated by call to <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>),
|
||||
names pased to <function>glBindTextures</function> must have been bound at least once previously
|
||||
via a call to <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>first</parameter> + <parameter>count</parameter> is greater
|
||||
than the number of image units supported by the implementation.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any value in <parameter>textures</parameter> is
|
||||
not zero or the name of an existing texture object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> error is generated if the internal format of the
|
||||
level zero texture image of any texture in textures is not supported.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> error is generated if the width, height, or depth
|
||||
of the level zero texture image of any texture in textures is zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BINDING_1D</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_2D</constant>, <constant>GL_TEXTURE_BINDING_3D</constant>, <constant>GL_TEXTURE_BINDING_1D_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_2D_ARRAY</constant>, <constant>GL_TEXTURE_BINDING_RECTANGLE</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_BUFFER</constant>, <constant>GL_TEXTURE_BINDING_CUBE_MAP</constant>, <constant>GL_TEXTURE_BINDING_CUBE_MAP</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_CUBE_MAP_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_2D_MULTISAMPLE</constant>,
|
||||
or <constant>GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindTextures</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>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2013 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>
|
131
Source/Bind/Specifications/Docs/glBindSamplers.xml
Normal file
131
Source/Bind/Specifications/Docs/glBindSamplers.xml
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?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="glBindSamplers">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindSamplers</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindSamplers</refname>
|
||||
<refpurpose>bind one or more named sampler objects to a sequence of consecutive sampler units</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindSamplers</function></funcdef>
|
||||
<paramdef>GLuint <parameter>first</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>samplers</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>first</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the first sampler unit to which a sampler object is to be bound.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of samplers to bind.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>samplers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of names of existing sampler objects.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindSamplers</function> binds samplers from an array of existing sampler objects to a specified
|
||||
number of consecutive sampler units. <parameter>count</parameter> specifies the number of sampler
|
||||
objects whose names are stored in the array <parameter>samplers</parameter>. That number
|
||||
of sampler names is read from the array and bound to the <parameter>count</parameter> consecutive
|
||||
sampler units starting from <parameter>first</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If the name zero appears in the <parameter>samplers</parameter> array, any existing binding
|
||||
to the sampler unit is reset. Any non-zero entry in <parameter>samplers</parameter> must be the
|
||||
name of an existing sampler object. When a non-zero entry in <parameter>samplers</parameter> is
|
||||
present, that sampler object is bound to the corresponding sampler unit.
|
||||
If <parameter>samplers</parameter> is <constant>NULL</constant> then it is as
|
||||
if an appropriately sized array containing only zeros had been specified.
|
||||
</para>
|
||||
<para>
|
||||
<function>glBindSamplers</function> is equivalent to the following pseudo code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < count; i++) {
|
||||
if (samplers == NULL) {
|
||||
glBindSampler(first + i, 0);
|
||||
} else {
|
||||
glBindSampler(first + i, samplers[i]);
|
||||
}
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Each entry in <parameter>samplers</parameter> will be checked individually and if found
|
||||
to be invalid, the state for that sampler unit will not be changed and an error will be
|
||||
generated. However, the state for other sampler units referenced by the command will still
|
||||
be updated.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBindSamplers</function> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>first</parameter> + <parameter>count</parameter> is greater
|
||||
than the number of sampler units supported by the implementation.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any value in <parameter>samplers</parameter> is
|
||||
not zero or the name of an existing sampler object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SAMPLER_BINDING</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGenSamplers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindSampler</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDeleteSamplers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glSamplerParameter</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetSamplerParameter</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2013 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>
|
156
Source/Bind/Specifications/Docs/glBindTextures.xml
Normal file
156
Source/Bind/Specifications/Docs/glBindTextures.xml
Normal file
|
@ -0,0 +1,156 @@
|
|||
<?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="glBindTextures">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindTextures</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindTextures</refname>
|
||||
<refpurpose>bind one or more named textures to a sequence of consecutive texture units</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindTextures</function></funcdef>
|
||||
<paramdef>GLuint <parameter>first</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>textures</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>first</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the first texture unit to which a texture is to be bound.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of textures to bind.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>textures</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of names of existing texture objects.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindTextures</function> binds an array of existing texture objects to a specified
|
||||
number of consecutive texture units. <parameter>count</parameter> specifies the number of texture
|
||||
objects whose names are stored in the array <parameter>textures</parameter>. That number
|
||||
of texture names are read from the array and bound to the <parameter>count</parameter> consecutive
|
||||
texture units starting from <parameter>first</parameter>. The target, or type of texture is
|
||||
deduced from the texture object and each texture is bound to the corresponding target of the
|
||||
texture unit. If the name zero appears in the <parameter>textures</parameter> array, any existing binding
|
||||
to any target of the texture unit is reset and the default texture for that target is bound in
|
||||
its place. Any non-zero entry in <parameter>textures</parameter> must be the name of an existing
|
||||
texture object. If <parameter>textures</parameter> is <constant>NULL</constant> then it is as
|
||||
if an appropriately sized array containing only zeros had been specified.
|
||||
</para>
|
||||
<para>
|
||||
With the exception that the active texture selector maintains its current value,
|
||||
<function>glBindTextures</function> is equivalent to the following pseudo code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < count; i++) {
|
||||
GLuint texture;
|
||||
if (textures == NULL) {
|
||||
texture = 0;
|
||||
} else {
|
||||
texture = textures[i];
|
||||
}
|
||||
glActiveTexture(GL_TEXTURE0 + first + i);
|
||||
if (texture != 0) {
|
||||
GLenum target = /* target of textures[i] */;
|
||||
glBindTexture(target, textures[i]);
|
||||
} else {
|
||||
for (target in all supported targets) {
|
||||
glBindTexture(target, 0);
|
||||
}
|
||||
}
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Each entry in <parameter>textures</parameter> will be checked individually and if found
|
||||
to be invalid, the state for that texture unit will not be changed and an error will be
|
||||
generated. However, the state for other texture units referenced by the command will still
|
||||
be updated.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBindTextures</function> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
<para>
|
||||
Note that because <function>glBindTextures</function> cannot create new textures (even if
|
||||
a name passed has been previously generated by call to <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>),
|
||||
names pased to <function>glBindTextures</function> must have been bound at least once previously
|
||||
via a call to <citerefentry><refentrytitle>glBindTexture</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>first</parameter> + <parameter>count</parameter> is greater
|
||||
than the number of texture image units supported by the implementation.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any value in textures is
|
||||
not zero or the name of an existing texture object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BINDING_1D</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_2D</constant>, <constant>GL_TEXTURE_BINDING_3D</constant>, <constant>GL_TEXTURE_BINDING_1D_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_2D_ARRAY</constant>, <constant>GL_TEXTURE_BINDING_RECTANGLE</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_BUFFER</constant>, <constant>GL_TEXTURE_BINDING_CUBE_MAP</constant>, <constant>GL_TEXTURE_BINDING_CUBE_MAP</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_CUBE_MAP_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_BINDING_2D_MULTISAMPLE</constant>,
|
||||
or <constant>GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glBindTexture</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>glTexImage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage2DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage3DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2013 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>
|
116
Source/Bind/Specifications/Docs/glBindVertexBuffer.xml
Normal file
116
Source/Bind/Specifications/Docs/glBindVertexBuffer.xml
Normal file
|
@ -0,0 +1,116 @@
|
|||
<?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="glBindVertexBuffer">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindVertexBuffer</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindVertexBuffer</refname>
|
||||
<refpurpose>bind a buffer to a vertex buffer bind point</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindVertexBuffer</function></funcdef>
|
||||
<paramdef>GLuint <parameter>bindingindex</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>buffer</parameter></paramdef>
|
||||
<paramdef>GLintptr <parameter>offset</parameter></paramdef>
|
||||
<paramdef>GLintptr <parameter>stride</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>bindingindex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index of the vertex buffer binding point to which to bind the buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>buffer</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of an existing buffer to bind to the vertex buffer binding point.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The offset of the first element of the buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>stride</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between elements within the buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindVertexBuffer</function> binds the buffer named <parameter>buffer</parameter>
|
||||
to the vertex buffer binding point whose index is given by <parameter>bindingindex</parameter>.
|
||||
<parameter>offset</parameter> and <parameter>stride</parameter> specify the offset of the first
|
||||
element within the buffer and the distance between elements within the buffer, respectively, and
|
||||
are both measured in basic machine units. <parameter>bindingindex</parameter> must be less than
|
||||
the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>. <parameter>offset</parameter>
|
||||
and <parameter>stride</parameter> must be greater than or equal to zero. If <parameter>buffer</parameter>
|
||||
is zero, then any buffer currently bound to the specified binding point is unbound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>bindingindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or <parameter>stride</parameter>
|
||||
is less than zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>buffer</parameter> is not the name of an
|
||||
existing buffer object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no vertex array object is bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glVertexAttribBinding</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribFormat</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexBindingDivisor</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
151
Source/Bind/Specifications/Docs/glBindVertexBuffers.xml
Normal file
151
Source/Bind/Specifications/Docs/glBindVertexBuffers.xml
Normal file
|
@ -0,0 +1,151 @@
|
|||
<?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="glBindVertexBuffers">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBindVertexBuffers</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBindVertexBuffers</refname>
|
||||
<refpurpose>bind one or more named buffer objects to a sequence of consecutive vertex buffer binding points</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBindVertexBuffers</function></funcdef>
|
||||
<paramdef>GLuint <parameter>first</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>buffers</parameter></paramdef>
|
||||
<paramdef>const GLuintptr *<parameter>offsets</parameter></paramdef>
|
||||
<paramdef>const GLsizei *<parameter>strides</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>first</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the first vertex buffer binding point to which a buffer object is to be bound.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of buffers to bind.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>buffers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of names of existing buffer objects.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offsets</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of offsets to associate with the binding points.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>buffers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of strides to associate with the binding points.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBindVertexBuffers</function> binds storage from an array of existing buffer objects to a specified
|
||||
number of consecutive vertex buffer binding points units. <parameter>count</parameter> specifies the number of buffer
|
||||
objects whose names are stored in the array <parameter>buffers</parameter>. That number
|
||||
of buffer object names is read from the array and their storage bound to the <parameter>count</parameter> consecutive
|
||||
vertex buffer binding points starting from <parameter>first</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If the name zero appears in the <parameter>buffers</parameter> array, any existing binding
|
||||
to the vertex buffer binding point is reset, and the corresponding entries in <parameter>offsets</parameter>
|
||||
and <parameter>strides</parameter> is ignored. Any non-zero entry in <parameter>buffers</parameter> must be the
|
||||
name of an existing buffer object. When a non-zero entry in <parameter>buffers</parameter> is
|
||||
present, that buffer objects data store is bound to the corresponding vertex buffer binding point.
|
||||
If <parameter>buffers</parameter> is <constant>NULL</constant> then it is as
|
||||
if an appropriately sized array containing only zeros had been specified.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>offsets</parameter> and <parameter>strides</parameter> specify the addresses
|
||||
of two arrays containing, respectively, the offset of the first element
|
||||
and stride between elements in each buffer. If an entry in <parameter>buffers</parameter>
|
||||
is zero, then the content of the corresponding entry in each of <parameter>offsets</parameter>
|
||||
and <parameter>strides</parameter> is ignored.
|
||||
</para>
|
||||
<para>
|
||||
<function>glBindVertexBuffers</function> is equivalent to the following pseudo code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < count; i++) {
|
||||
if (buffers == NULL) {
|
||||
glBindVertexBuffer(first + i, 0, 0, 16);
|
||||
} else {
|
||||
glBindVertexBuffer(first + i, buffers[i], offsets[i], strides[i]);
|
||||
}
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Each entry in <parameter>buffers</parameter> will be checked individually and if found
|
||||
to be invalid, the state for that vertex buffer binding point will not be changed and an error will be
|
||||
generated. However, the state for other binding points referenced by the command will still
|
||||
be updated.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBindVertexBuffers</function> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>first</parameter> + <parameter>count</parameter> is greater
|
||||
than the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any value in <constant>buffers</constant> is not
|
||||
zero or the name of an existing buffer object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if any value in <parameter>offsets</parameter> or <parameter>strides</parameter>
|
||||
is negative, or if a value is <parameter>stride</parameter> is greater than the value of <constant>GL_MAX_VERTEX_ATTRIB_STRIDE</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>
|
||||
<citerefentry><refentrytitle>glDeleteTextures</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2013 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>
|
275
Source/Bind/Specifications/Docs/glBufferStorage.xml
Normal file
275
Source/Bind/Specifications/Docs/glBufferStorage.xml
Normal file
|
@ -0,0 +1,275 @@
|
|||
<?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="glBufferStorage">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glBufferStorage</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glBufferStorage</refname>
|
||||
<refpurpose>creates and initializes a buffer object's immutable data store</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glBufferStorage</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
|
||||
<paramdef>const GLvoid * <parameter>data</parameter></paramdef>
|
||||
<paramdef>GLbitfield <parameter>flags</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_ATOMIC_COUNTER_BUFFER</constant>,
|
||||
<constant>GL_COPY_READ_BUFFER</constant>,
|
||||
<constant>GL_COPY_WRITE_BUFFER</constant>,
|
||||
<constant>GL_DRAW_INDIRECT_BUFFER</constant>,
|
||||
<constant>GL_DISPATCH_INDIRECT_BUFFER</constant>,
|
||||
<constant>GL_ELEMENT_ARRAY_BUFFER</constant>,
|
||||
<constant>GL_PIXEL_PACK_BUFFER</constant>,
|
||||
<constant>GL_PIXEL_UNPACK_BUFFER</constant>,
|
||||
<constant>GL_QUERY_BUFFER</constant>,
|
||||
<constant>GL_SHADER_STORAGE_BUFFER</constant>,
|
||||
<constant>GL_TEXTURE_BUFFER</constant>,
|
||||
<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, or
|
||||
<constant>GL_UNIFORM_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>flags</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the intended usage of the buffer's data store. Must be a bitwise combination
|
||||
of the following flags. <constant>GL_DYNAMIC_STORAGE_BIT</constant>, <constant>GL_MAP_READ_BIT</constant>
|
||||
<constant>GL_MAP_WRITE_BIT</constant>, <constant>GL_MAP_PERSISTENT_BIT</constant>, <constant>GL_MAP_COHERENT_BIT</constant>,
|
||||
and <constant>GL_CLIENT_STORAGE_BIT</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glBufferStorage</function> creates a new immutable data store for the buffer object currently bound to
|
||||
<parameter>target</parameter>. The size of the data store is specified by <parameter>size</parameter>. If
|
||||
an initial data is available, its address may be supplied in <parameter>data</parameter>. Otherwise, to
|
||||
create an uninitialized data store, <parameter>data</parameter> should be <constant>NULL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
The <parameter>flags</parameter> parameters specifies the intended usage of the buffer's data store.
|
||||
It must be a bitwise combination of a subset of the following flags:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_DYNAMIC_STORAGE_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The contents of the data store may be
|
||||
updated after creation through calls to <citerefentry><refentrytitle>glBufferSubData</refentrytitle></citerefentry>.
|
||||
If this bit is not set, the buffer content may not be directly updated by the client. The data argument
|
||||
may be used to specify the initial content of the buffer's data store regardless of the presence of
|
||||
the <constant>GL_DYNAMIC_STORAGE_BIT</constant>. Regardless of the presence of this bit,
|
||||
buffers may always be updated with server-side calls such as
|
||||
<citerefentry><refentrytitle>glCopyBufferSubData</refentrytitle></citerefentry> and
|
||||
<citerefentry><refentrytitle>glClearBufferSubData</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_MAP_READ_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data store may be mapped by the client for
|
||||
read access and a pointer in the client's address space obtained that may be read from.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_MAP_WRITE_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data store may be mapped by the client for
|
||||
write access and a pointer in the client's address space obtained that may be written through.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_MAP_PERSISTENT_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The client may request that the server read
|
||||
from or write to the buffer while it is mapped. The client's pointer to the data store remains
|
||||
valid so long as the data store is mapped, even during execution of drawing or dispatch commands.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_MAP_COHERENT_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Shared access to buffers that are simultaneously
|
||||
mapped for client access and are used by the server will be coherent, so long as that
|
||||
mapping is performed using <citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry>.
|
||||
That is, data written to the store by either the client or server will be immediately visible to
|
||||
the other with no further action taken by the application. In particular,
|
||||
</para>
|
||||
</listitem>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
If <constant>GL_MAP_COHERENT_BIT</constant> is not set and the client performs a write
|
||||
followed by a call to the <citerefentry><refentrytitle>glMemoryBarrier</refentrytitle></citerefentry>
|
||||
command with the <constant>GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT</constant> set, then in subsequent
|
||||
commands the server will see the writes.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If <constant>GL_MAP_COHERENT_BIT</constant> is set and the client performs a write, then in
|
||||
subsequent commands the server will see the writes.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If <constant>GL_MAP_COHERENT_BIT</constant> is not set and the server performs a write, the
|
||||
application must call <citerefentry><refentrytitle>glMemoryBarrier</refentrytitle></citerefentry>
|
||||
with the <constant>GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT</constant> set and then call
|
||||
<citerefentry><refentrytitle>glFenceSync</refentrytitle></citerefentry> with
|
||||
<constant>GL_SYNC_GPU_COMMANDS_COMPLETE</constant> (or <constant>glFinish</constant>).
|
||||
Then the CPU will see the writes after the sync is complete.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If <constant>GL_MAP_COHERENT_BIT</constant> is set and the server does a write, the app must
|
||||
call FenceSync with <constant>GL_SYNC_GPU_COMMANDS_COMPLETE</constant> (or <citerefentry><refentrytitle>glFinish</refentrytitle></citerefentry>).
|
||||
Then the CPU will see the writes after the sync is complete.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_CLIENT_STORAGE_BIT</constant></term> When all other criteria for the buffer storage allocation
|
||||
are met, this bit may be used by an implementation to determine whether to use storage that is local to the
|
||||
server or to the client to serve as the backing store for the buffer.
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
The allowed combinations of flags are subject to certain restrictions. They are as follows:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>flags</parameter> contains <constant>GL_MAP_PERSISTENT_BIT</constant>, it
|
||||
must also contain at least one of <constant>GL_MAP_READ_BIT</constant> or <constant>GL_MAP_WRITE_BIT</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
If <parameter>flags</parameter> contains <constant>GL_MAP_COHERENT_BIT</constant>, it must
|
||||
also contain <constant>GL_MAP_PERSISTENT_BIT</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glBufferStorage</function> is available only if the GL version is 4.4 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>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
one of the accepted buffer targets.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>size</parameter> is less than or equal to zero.
|
||||
</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 properties requested in <parameter>flags</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if flags has any bits set other than
|
||||
those defined above.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> error is generated if <parameter>flags</parameter> contains <constant>GL_MAP_PERSISTENT_BIT</constant>
|
||||
but does not contain at least one of <constant>GL_MAP_READ_BIT</constant> or <constant>GL_MAP_WRITE_BIT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>flags</parameter> contains <constant>GL_MAP_COHERENT_BIT</constant>, but
|
||||
does not also contain <constant>GL_MAP_PERSISTENT_BIT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the <constant>GL_BUFFER_IMMUTABLE_STORAGE</constant> flag of the buffer
|
||||
bound to <parameter>target</parameter> is <constant>GL_TRUE</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetBufferSubData</refentrytitle></citerefentry>
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetBufferParameter</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> 2013 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>
|
128
Source/Bind/Specifications/Docs/glClearBufferData.xml
Normal file
128
Source/Bind/Specifications/Docs/glClearBufferData.xml
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?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="glClearBufferData">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glClearBufferData</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glClearBufferData</refname>
|
||||
<refpurpose>fill a buffer object's data store with a fixed value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glClearBufferData</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>format</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>const void * <parameter>data</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
one of the global buffer binding targets.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The internal format with which the data will be stored in the buffer object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size, in basic machine units of the range of the data store to fill.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The format of the data in memory addressed by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the data in memory addressed by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a memory location storing the data to be replicated into the
|
||||
buffer's data store.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glClearBufferData</function> fills the entirety of a buffer object's
|
||||
data store with data from client memory. Data, initially supplied in a format
|
||||
specified by <parameter>format</parameter> in data type <parameter>type</parameter> is
|
||||
read from the memory address given by <parameter>data</parameter> and converted into
|
||||
the internal representation given by <parameter>internalforamt</parameter>.
|
||||
This converted data is then replicated throughout the buffer object's
|
||||
data store.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>data</parameter> is NULL, then the buffer's data store
|
||||
is filled with zeros.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> not one of the generic buffer binding targets.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if no buffer is bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a sized internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any part of the buffer's data store is
|
||||
mapped with <citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glMapBuffer.</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glClearBufferSubData</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011-2012 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>
|
149
Source/Bind/Specifications/Docs/glClearBufferSubData.xml
Normal file
149
Source/Bind/Specifications/Docs/glClearBufferSubData.xml
Normal file
|
@ -0,0 +1,149 @@
|
|||
<?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="glClearBufferSubData">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glClearBufferSubData</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glClearBufferSubData</refname>
|
||||
<refpurpose>fill all or part of buffer object's data store with a fixed value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glClearBufferSubData</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLintptr <parameter>offset</parameter></paramdef>
|
||||
<paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>format</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>const void * <parameter>data</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
one of the global buffer binding targets.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The internal format with which the data will be stored in the buffer object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The offset, in basic machine units into the buffer object's data store at which to start filling.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size, in basic machine units of the range of the data store to fill.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The format of the data in memory addressed by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the data in memory addressed by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a memory location storing the data to be replicated into the
|
||||
buffer's data store.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glClearBufferSubData</function> fills a specified region of a buffer object's
|
||||
data store with data from client memory. <parameter>offset</parameter> and <parameter>size</parameter>
|
||||
demark the extent of the region within the data store of the buffer object bound to
|
||||
<parameter>target</parameter> to fill with data. Data, initially supplied in a format
|
||||
specified by <parameter>format</parameter> in data type <parameter>type</parameter> is
|
||||
read from the memory address given by <parameter>data</parameter> and converted into
|
||||
the internal representation given by <parameter>internalforamt</parameter>.
|
||||
This converted data is then replicated throughout the specified region of the buffer object's
|
||||
data store.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>data</parameter> is NULL, then the subrange of the buffer's data store
|
||||
is filled with zeros.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> not one of the generic buffer binding targets.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if no buffer is bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a sized internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or <parameter>range</parameter> are not multiples of
|
||||
the number of basic machine units per-element for the internal format specified by
|
||||
<parameter>internalformat</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or <parameter>size</parameter> is less than zero, or if
|
||||
<parameter>offset</parameter> + <parameter>size</parameter> is greater than the value of <constant>GL_BUFFER_SIZE</constant> for the buffer bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any part of the specified buffer range is
|
||||
mapped with <citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glClearBufferData</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
172
Source/Bind/Specifications/Docs/glClearTexImage.xml
Normal file
172
Source/Bind/Specifications/Docs/glClearTexImage.xml
Normal file
|
@ -0,0 +1,172 @@
|
|||
<?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="glClearTexImage">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glClearTexImage</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glClearTexImage</refname>
|
||||
<refpurpose>fills all a texture image with a constant value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glClearTexImage</function></funcdef>
|
||||
<paramdef>GLuint <parameter>texture</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>level</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>format</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>const void * <parameter>data</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<!-- eqn: ignoring delim $$ -->
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>texture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of an existing texture object containing the image to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>level</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The level of <parameter>texture</parameter> containing the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The format of the data whose address in memory is given by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the data whose address in memory is given by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address in memory of the data to be used to clear the specified region.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glClearTexImage</function> fills all an image contained in a
|
||||
texture with an application supplied value. <parameter>texture</parameter> must be
|
||||
the name of an existing texture. Further, <parameter>texture</parameter> may not be
|
||||
the name of a buffer texture, nor may its internal format be compressed.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>format</parameter> and <parameter>type</parameter> specify the format and type of the
|
||||
source data and are interpreted as they are for <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>.
|
||||
Textures with a base internal format of <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_STENCIL_INDEX</constant>, or <constant>GL_DEPTH_STENCIL</constant>
|
||||
require depth component, stencil, or depth-stencil component data respectively.
|
||||
Textures with other base internal formats require RGBA formats. Textures with integer
|
||||
internal formats require integer data.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>data</parameter> is a pointer to an array of between one and four components of texel
|
||||
data that will be used as the source for the constant fill value. The elements of
|
||||
data are converted by the GL into the internal format of the texture image (that
|
||||
was specified when the level was defined by any of the <function>glTexImage*</function>, <function>glTexStorage*</function>
|
||||
or <function>glCopyTexImage*</function> commands), and then
|
||||
used to fill the specified range of the destination texture level. If <parameter>data</parameter> is <constant>NULL</constant>, then
|
||||
the pointer is ignored and the sub-range of the texture image is filled with zeros. If
|
||||
texture is a multisample texture, all the samples in a texel are cleared to the value
|
||||
specified by data.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glClearTexImage</function> is available only if the GL version is 4.4 or greater.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> is zero or not the
|
||||
name of an existing texture object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> is a buffer texture.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> has a compressed
|
||||
internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_DEPTH_COMPONENT</constant> and <parameter>format</parameter> is not <constant>GL_DEPTH_COMPONENT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_DEPTH_STENCIL</constant> and <parameter>format</parameter> is not <constant>GL_DEPTH_STENCIL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_STENCIL_INDEX</constant> and <parameter>format</parameter> is not <constant>GL_STENCIL_INDEX</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_RGBA</constant> and <parameter>format</parameter> is <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_STENCIL_INDEX</constant>, or <constant>GL_DEPTH_STENCIL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the internal format is integer and <parameter>format</parameter> does not specify integer data.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the internal format is not
|
||||
integer and <parameter>format</parameter> specifies integer data.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the image array identified by <parameter>level</parameter>
|
||||
has not previously been defined by a call to <function>glTexImage*</function> or <function>glTexStorage*</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glGetInternalformat</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glClearTexSubImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</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> 2013 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>
|
382
Source/Bind/Specifications/Docs/glClearTexSubImage.xml
Normal file
382
Source/Bind/Specifications/Docs/glClearTexSubImage.xml
Normal file
|
@ -0,0 +1,382 @@
|
|||
<?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="glClearTexSubImage">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2013</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glClearTexSubImage</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glClearTexSubImage</refname>
|
||||
<refpurpose>fills all or part of a texture image with a constant value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glClearTexSubImage</function></funcdef>
|
||||
<paramdef>GLuint <parameter>texture</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 void * <parameter>data</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<!-- eqn: ignoring delim $$ -->
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>texture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of an existing texture object containing the image to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>level</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The level of <parameter>texture</parameter> containing the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>xoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The coordinate of the left edge of the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>yoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The coordinate of the lower edge of the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>zoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The coordinate of the front of the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The height of the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>depth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The depth of the region to be cleared.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The format of the data whose address in memory is given by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the data whose address in memory is given by <parameter>data</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address in memory of the data to be used to clear the specified region.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glClearTexSubImage</function> fills all or part of an image contained in a
|
||||
texture with an application supplied value. <parameter>texture</parameter> must be
|
||||
the name of an existing texture. Further, <parameter>texture</parameter> may not be
|
||||
the name of a buffer texture, nor may its internal format be compressed.
|
||||
</para>
|
||||
<para>
|
||||
Arguments <parameter>xoffset</parameter>, <parameter>yoffset</parameter>, and
|
||||
<parameter>zoffset</parameter> specify the lower left texel coordinates of
|
||||
a width-wide by height-high by depth-deep rectangular subregion of the texel array.
|
||||
</para>
|
||||
<para>
|
||||
For one-dimensional array textures, <parameter>yoffset</parameter> is interpreted as the first layer to
|
||||
be cleared and <parameter>height</parameter> is the number of layers to clear. For two-dimensional array
|
||||
textures, <parameter>zoffset</parameter> is interpreted as the first layer to be cleared and <parameter>depth</parameter> is the number
|
||||
of layers to clear. Cube map textures are treated as an array of six slices in the z-dimension,
|
||||
where the value of <parameter>zoffset</parameter> is interpreted as specifying the cube map face
|
||||
for the corresponding layer and <parameter>depth</parameter> is the number of faces to clear.
|
||||
For cube map array textures, <parameter>zoffset</parameter> is the first layer-face to clear,
|
||||
and <parameter>depth</parameter> is the number of layer-faces to clear. Each layer-face is
|
||||
translated into an array layer and a cube map face as described in the OpenGL Specification.
|
||||
</para>
|
||||
<para>
|
||||
Negative values of <parameter>xoffset</parameter>, <parameter>yoffset</parameter>, and <parameter>zoffset</parameter> correspond to the coordinates of
|
||||
border texels. Taking
|
||||
<mml:math><mml:mi mathvariant="italic">ws</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">hs</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">ds</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">wb</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">hb</mml:mi></mml:math>, and
|
||||
<mml:math><mml:mi mathvariant="italic">db</mml:mi></mml:math> to be
|
||||
the specified <parameter>width</parameter>, <parameter>height</parameter>, <parameter>depth</parameter>, and the border width, border height, and border
|
||||
depth of the texel array and taking
|
||||
<mml:math><mml:mi mathvariant="italic">x</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">y</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">z</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">w</mml:mi></mml:math>,
|
||||
<mml:math><mml:mi mathvariant="italic">h</mml:mi></mml:math>, and
|
||||
<mml:math><mml:mi mathvariant="italic">d</mml:mi></mml:math> to be the <parameter>xoffset</parameter>, <parameter>yoffset</parameter>,
|
||||
<parameter>zoffset</parameter>, <parameter>width</parameter>, <parameter>height</parameter>, and <parameter>depth</parameter> argument values,
|
||||
any of the following relationships generates a <constant>GL_INVALID_OPERATION</constant> error:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<informalequation>
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mtext>x</mml:mtext>
|
||||
<mml:mo><</mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext>w</mml:mtext>
|
||||
<mml:mtext>b</mml:mtext>
|
||||
</mml:msub>
|
||||
</mml:mrow>
|
||||
</mml:math>
|
||||
</informalequation>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<informalequation>
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mtext mathvariant="italic">x</mml:mtext>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mtext mathvariant="italic">w</mml:mtext>
|
||||
<mml:mo>></mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">w</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">s</mml:mtext>
|
||||
</mml:msub>
|
||||
<mml:mo>-</mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">w</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">b</mml:mtext>
|
||||
</mml:msub>
|
||||
</mml:mrow>
|
||||
</mml:math>
|
||||
</informalequation>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<informalequation>
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mtext mathvariant="italic">y</mml:mtext>
|
||||
<mml:mo><</mml:mo>
|
||||
<mml:mo>-</mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">h</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">b</mml:mtext>
|
||||
</mml:msub>
|
||||
</mml:mrow>
|
||||
</mml:math>
|
||||
</informalequation>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<informalequation>
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mtext mathvariant="italic">y</mml:mtext>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mtext mathvariant="italic">h</mml:mtext>
|
||||
<mml:mo>></mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">h</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">s</mml:mtext>
|
||||
</mml:msub>
|
||||
<mml:mo>-</mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">h</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">b</mml:mtext>
|
||||
</mml:msub>
|
||||
</mml:mrow>
|
||||
</mml:math>
|
||||
</informalequation>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<informalequation>
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mtext mathvariant="italic">z</mml:mtext>
|
||||
<mml:mo><</mml:mo>
|
||||
<mml:mo>-</mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">d</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">b</mml:mtext>
|
||||
</mml:msub>
|
||||
</mml:mrow>
|
||||
</mml:math>
|
||||
</informalequation>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<informalequation>
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mtext mathvariant="italic">z</mml:mtext>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mtext mathvariant="italic">d</mml:mtext>
|
||||
<mml:mo>></mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">d</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">s</mml:mtext>
|
||||
</mml:msub>
|
||||
<mml:mo>-</mml:mo>
|
||||
<mml:msub>
|
||||
<mml:mtext mathvariant="italic">d</mml:mtext>
|
||||
<mml:mtext mathvariant="italic">b</mml:mtext>
|
||||
</mml:msub>
|
||||
</mml:mrow>
|
||||
</mml:math>
|
||||
</informalequation>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
For texture types that do not have certain dimensions, this command treats those
|
||||
dimensions as having a size of 1. For example, to clear a portion of a two-dimensional
|
||||
texture, use <parameter>zoffset</parameter> equal to zero and <parameter>depth</parameter> equal to one.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>format</parameter> and <parameter>type</parameter> specify the format and type of the
|
||||
source data and are interpreted as they are for <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>.
|
||||
Textures with a base internal format of <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_STENCIL_INDEX</constant>, or <constant>GL_DEPTH_STENCIL</constant>
|
||||
require depth component, stencil, or depth-stencil component data respectively.
|
||||
Textures with other base internal formats require RGBA formats. Textures with integer
|
||||
internal formats require integer data.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>data</parameter> is a pointer to an array of between one and four components of texel
|
||||
data that will be used as the source for the constant fill value. The elements of
|
||||
data are converted by the GL into the internal format of the texture image (that
|
||||
was specified when the level was defined by any of the <function>glTexImage*</function>, <function>glTexStorage*</function>
|
||||
or <function>glCopyTexImage*</function> commands), and then
|
||||
used to fill the specified range of the destination texture level. If <parameter>data</parameter> is <constant>NULL</constant>, then
|
||||
the pointer is ignored and the sub-range of the texture image is filled with zeros. If
|
||||
texture is a multisample texture, all the samples in a texel are cleared to the value
|
||||
specified by data.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glClearTexSubImage</function> is available only if the GL version is 4.4 or greater.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> is zero or not the
|
||||
name of an existing texture object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> is a buffer texture.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> has a compressed
|
||||
internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_DEPTH_COMPONENT</constant> and <parameter>format</parameter> is not <constant>GL_DEPTH_COMPONENT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_DEPTH_STENCIL</constant> and <parameter>format</parameter> is not <constant>GL_DEPTH_STENCIL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_STENCIL_INDEX</constant> and <parameter>format</parameter> is not <constant>GL_STENCIL_INDEX</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the base internal format is
|
||||
<constant>GL_RGBA</constant> and <parameter>format</parameter> is <constant>GL_DEPTH_COMPONENT</constant>, <constant>GL_STENCIL_INDEX</constant>, or <constant>GL_DEPTH_STENCIL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the internal format is integer and <parameter>format</parameter> does not specify integer data.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the internal format is not
|
||||
integer and <parameter>format</parameter> specifies integer data.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> error is generated if the <parameter>xoffset</parameter>, <parameter>yoffset</parameter>, <parameter>zoffset</parameter>,
|
||||
<parameter>width</parameter>, <parameter>height</parameter>, and <parameter>depth</parameter> parameters (or combinations thereof) specify a region that falls outside the
|
||||
defined texture image array (including border, if any).
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry>, <citerefentry><refentrytitle>glGetInternalformat</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glClearTexImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</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> 2013 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>
|
350
Source/Bind/Specifications/Docs/glCopyImageSubData.xml
Normal file
350
Source/Bind/Specifications/Docs/glCopyImageSubData.xml
Normal file
|
@ -0,0 +1,350 @@
|
|||
<?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="glCopyImageSubData">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glCopyImageSubData</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glCopyImageSubData</refname>
|
||||
<refpurpose>perform a raw data copy between two images</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glCopyImageSubData</function></funcdef>
|
||||
<paramdef>GLuint <parameter>srcName</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>srcTarget</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>srcLevel</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>srcX</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>srcY</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>srcZ</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>dstName</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>dstTarget</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>dstLevel</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>dstX</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>dstY</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>dstZ</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>srcWidth</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>srcHeight</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>srcDepth</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>srcName</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a texture or renderbuffer object from which to copy.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcTarget</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The target representing the namespace of the source name <parameter>srcName</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcLevel</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The mipmap level to read from the source.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcX</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The X coordinate of the left edge of the souce region to copy.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcY</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Y coordinate of the top edge of the souce region to copy.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcZ</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Z coordinate of the near edge of the souce region to copy.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dstName</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a texture or renderbuffer object to which to copy.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dstTarget</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The target representing the namespace of the destination name <parameter>dstName</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dstX</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The X coordinate of the left edge of the destination region.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dstY</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Y coordinate of the top edge of the destination region.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dstZ</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Z coordinate of the near edge of the destination region.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcWidth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the region to be copied.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcHeight</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The height of the region to be copied.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>srcDepth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The depth of the region to be copied.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glCopyImageSubData</function> may be used to copy data from
|
||||
one image (i.e. texture or renderbuffer) to another. <function>glCopyImageSubData</function>
|
||||
does not perform general-purpose conversions
|
||||
such as scaling, resizing, blending, color-space, or format
|
||||
conversions. It should be considered to operate in a manner
|
||||
similar to a CPU memcpy. CopyImageSubData can copy between
|
||||
images with different internal formats, provided
|
||||
the formats are compatible.
|
||||
</para>
|
||||
<para>
|
||||
<function>glCopyImageSubData</function> also allows copying between certain
|
||||
types of compressed and uncompressed internal formats. This copy does not perform on-the-fly compression
|
||||
or decompression. When copying from an uncompressed internal format
|
||||
to a compressed internal format, each texel of uncompressed data
|
||||
becomes a single block of compressed data. When copying from a
|
||||
compressed internal format to an uncompressed internal format,
|
||||
a block of compressed data becomes a single texel of uncompressed
|
||||
data. The texel size of the uncompressed format must be the same
|
||||
size the block size of the compressed formats. Thus it is permitted
|
||||
to copy between a 128-bit uncompressed format and a compressed
|
||||
format which uses 8-bit 4x4 blocks, or between a 64-bit uncompressed
|
||||
format and a compressed format which uses 4-bit 4x4 blocks.
|
||||
</para>
|
||||
<para>
|
||||
The source object is identified by <parameter>srcName</parameter> and
|
||||
<parameter>srcTarget</parameter> and the destination object is identified
|
||||
by <parameter>dstName</parameter> and <parameter>dstTarget</parameter>.
|
||||
The interpretation of the name depends on the value
|
||||
of the corresponding <parameter>target</parameter> parameter.
|
||||
If <parameter>target</parameter> is
|
||||
<constant>GL_RENDERBUFFER</constant>, the name is interpreted as the name of a
|
||||
renderbuffer object. If the target parameter is a texture target,
|
||||
the name is interpreted as a texture object. All non-proxy
|
||||
texture targets are accepted, with the exception of <constant>GL_TEXTURE_BUFFER</constant>
|
||||
and the cubemap face selectors.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>srcLevel</parameter> and <parameter>dstLevel</parameter> identify the source and destination
|
||||
level of detail. For textures, this must be a valid level of
|
||||
detail in the texture object. For renderbuffers, this value must
|
||||
be zero.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>srcX</parameter>, <parameter>srcY</parameter>, and <parameter>srcZ</parameter> specify the lower left texel
|
||||
coordinates of a <parameter>srcWidth</parameter>-wide by <parameter>srcHeight</parameter>-high by
|
||||
<parameter>srcDepth</parameter>-deep rectangular subregion of the source texel array.
|
||||
Similarly, <parameter>dstX</parameter>, <parameter>dstY</parameter> and <parameter>dstZ</parameter> specify the coordinates of a subregion of the
|
||||
destination texel array. The source and destination subregions
|
||||
must be contained entirely within the specified level of the
|
||||
corresponding image objects.
|
||||
</para>
|
||||
<para>
|
||||
The dimensions are always specified in texels, even for compressed
|
||||
texture formats. However, it should be noted that if only one of the
|
||||
source and destination textures is compressed then the number of
|
||||
texels touched in the compressed image will be a factor of the
|
||||
block size larger than in the uncompressed image.
|
||||
</para>
|
||||
<para>
|
||||
Slices of a <constant>GL_TEXTURE_1D_ARRAY</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>
|
||||
<constant>GL_TEXTURE_3D</constant> and faces of <constant>GL_TEXTURE_CUBE_MAP</constant> are all compatible provided
|
||||
they share a compatible internal format, and multiple slices or faces
|
||||
may be copied between these objects with a single call by specifying the
|
||||
starting slice with <parameter>srcZ</parameter> and <parameter>dstZ</parameter>, and the number of slices to
|
||||
be copied with <parameter>srcDepth</parameter>. Cubemap textures always have six faces
|
||||
which are selected by a zero-based face index.
|
||||
</para>
|
||||
<para>
|
||||
For the purposes of CopyImageSubData, two internal formats
|
||||
are considered compatible if any of the following conditions are
|
||||
met:
|
||||
* the formats are the same,
|
||||
* the formats are considered compatible according to the
|
||||
compatibility rules used for texture views as defined in
|
||||
section 3.9.X. In particular, if both internal formats are listed
|
||||
in the same entry of Table 3.X.2, they are considered compatible, or
|
||||
* one format is compressed and the other is uncompressed and
|
||||
Table 4.X.1 lists the two formats in the same row.
|
||||
If the formats are not compatible INVALID_OPERATION is generated.
|
||||
</para>
|
||||
<table frame="topbot"><title>Sized Internal Formats</title>
|
||||
<tgroup cols="3" align="left">
|
||||
<colspec align="left"/>
|
||||
<colspec align="left"/>
|
||||
<colspec align="left"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Texel / Block Size
|
||||
</emphasis></entry>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Uncompressed Internal Format
|
||||
</emphasis></entry>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Compressed Internal Format(s)
|
||||
</emphasis></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>64-bit</entry>
|
||||
<entry><constant>GL_RGBA32UI</constant>, <constant>GL_RGBA32I</constant>, <constant>GL_RGBA32F</constant></entry>
|
||||
<entry><constant>GL_COMPRESSED_RGBA_S3TC_DXT3_EXT</constant>,
|
||||
<constant>GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT</constant>,
|
||||
<constant>GL_COMPRESSED_RGBA_S3TC_DXT5_EXT</constant>,
|
||||
<constant>GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT</constant>,
|
||||
<constant>GL_COMPRESSED_RG_RGTC2</constant>,
|
||||
<constant>GL_COMPRESSED_SIGNED_RG_RGTC2</constant>,
|
||||
<constant>GL_COMPRESSED_RGBA_BPTC_UNORM</constant>,
|
||||
<constant>GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM</constant>,
|
||||
<constant>GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT</constant>,
|
||||
<constant>GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>128-bit</entry>
|
||||
<entry><constant>GL_RGBA16UI</constant>,
|
||||
<constant>GL_RGBA16I</constant>,
|
||||
<constant>GL_RGBA16F</constant>,
|
||||
<constant>GL_RG32F</constant>,
|
||||
<constant>GL_RG32UI</constant>,
|
||||
<constant>GL_RG32I</constant>,
|
||||
<constant>GL_RGBA16</constant>,
|
||||
<constant>GL_RGBA16_SNORM</constant></entry>
|
||||
<entry><constant>GL_COMPRESSED_RGB_S3TC_DXT1_EXT</constant>,
|
||||
<constant>COMPRESSED_SRGB_S3TC_DXT1_EXT</constant>,
|
||||
<constant>COMPRESSED_RGBA_S3TC_DXT1_EXT</constant>,
|
||||
<constant>COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT</constant>,
|
||||
<constant>COMPRESSED_RED_RGTC1</constant>,
|
||||
<constant>COMPRESSED_SIGNED_RED_RGTC1</constant></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the texel size of
|
||||
the uncompressed image is not equal to the block size of the
|
||||
compressed image.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if either target parameter is not <constant>GL_RENDERBUFFER</constant>,
|
||||
a valid non-proxy texture target other than <constant>GL_TEXTURE_BUFFER</constant>, or is one
|
||||
of the cubemap face selectors.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> does not match the type of the object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if either object is a texture and the texture is
|
||||
not complete.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the source and
|
||||
destination internal formats are not compatible, or if the number of samples do not match.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if either name does not correspond to a
|
||||
valid renderbuffer or texture object according to the corresponding
|
||||
target parameter.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the specified level of either the source or destination is not
|
||||
a valid level for the corresponding image.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the
|
||||
dimensions of the either subregion exceeds the boundaries of the
|
||||
corresponding image object, or if the image format is compressed
|
||||
and the dimensions of the subregion fail to meet the alignment
|
||||
constraints of the format.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_COMPUTE_WORK_GROUP_COUNT</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDispatchComputeIndirect</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
97
Source/Bind/Specifications/Docs/glDebugMessageCallback.xml
Normal file
97
Source/Bind/Specifications/Docs/glDebugMessageCallback.xml
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?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="glDebugMessageCallback">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDebugMessageCallback</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDebugMessageCallback</refname>
|
||||
<refpurpose>specify a callback to receive debugging messages from the GL</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDebugMessageCallback</function></funcdef>
|
||||
<paramdef>DEBUGPROC <parameter>callback</parameter></paramdef>
|
||||
<paramdef>void * <parameter>userParam</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>callback</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a callback function that will be called when a debug message is generated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>userParam</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A user supplied pointer that will be passed on each invocation of <parameter>callback</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDebugMessageInsert</function> sets the current debug output callback function to
|
||||
the function whose address is given in <parameter>callback</parameter>. The callback function
|
||||
should have the following prototype (in C), or be otherwise compatible with such a prototype:
|
||||
</para>
|
||||
<programlisting><![CDATA[ typedef void (APIENTRY *DEBUGPROC)(GLenum source,
|
||||
GLenum type,
|
||||
GLuint id,
|
||||
GLenum severity,
|
||||
GLsizei length,
|
||||
const GLchar* message,
|
||||
void* userParam);]]></programlisting>
|
||||
<para>
|
||||
This function is defined to have the same calling convention as the GL API functions. In
|
||||
most cases this is defined as <code>APIENTRY</code>, although it will vary depending
|
||||
on platform, language and compiler.
|
||||
</para>
|
||||
<para>
|
||||
Each time a debug message is generated the debug callback function will be invoked
|
||||
with <parameter>source</parameter>, <parameter>type</parameter>, <parameter>id</parameter>, and
|
||||
<parameter>severity</parameter> associated with the message, and <parameter>length</parameter> set to
|
||||
the length of debug message whose character string is in the array pointed to by <parameter>message</parameter>
|
||||
<parameter>userParam</parameter> will be set to the value passed in the
|
||||
<parameter>userParam</parameter> parameter to the most recent call to <function>glDebugMessageInsert</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
When the GL is in use remotely, the server may not be able to call functions in the client's address space.
|
||||
In such cases, the callback function may not be invoked and the user should retrieve debug messages from
|
||||
the context's debug message log by calling <citerefentry><refentrytitle>glGetDebugMessageLog</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDebugMessageControl</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDebugMessageInsert</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetDebugMessageLog</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
167
Source/Bind/Specifications/Docs/glDebugMessageControl.xml
Normal file
167
Source/Bind/Specifications/Docs/glDebugMessageControl.xml
Normal file
|
@ -0,0 +1,167 @@
|
|||
<?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="glDebugMessageControl">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDebugMessageControl</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDebugMessageControl</refname>
|
||||
<refpurpose>control the reporting of debug messages in a debug context</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDebugMessageControl</function></funcdef>
|
||||
<paramdef>GLenum <parameter>source</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>severity</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>ids</parameter></paramdef>
|
||||
<paramdef>GLboolean <parameter>enabled</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>source</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The source of debug messages to enable or disable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of debug messages to enable or disable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>severity</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The severity of debug messages to enable or disable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the array <parameter>ids</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>ids</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of unsigned integers contianing the ids of the messages to enable or disable.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>enabled</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A Boolean flag determining whether the selected messages should be enabled or disabled.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDebugMessageControl</function> controls the reporting of debug messages generated by a debug
|
||||
context. The parameters <parameter>source</parameter>, <parameter>type</parameter> and <parameter>severity</parameter>
|
||||
form a filter to select messages from the pool of potential messages generated by the GL.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>source</parameter> may be <constant>GL_DEBUG_SOURCE_API</constant>, <constant>GL_DEBUG_SOURCE_WINDOW_SYSTEM_</constant>,
|
||||
<constant>GL_DEBUG_SOURCE_SHADER_COMPILER</constant>, <constant>GL_DEBUG_SOURCE_THIRD_PARTY</constant>,
|
||||
<constant>GL_DEBUG_SOURCE_APPLICATION</constant>, <constant>GL_DEBUG_SOURCE_OTHER</constant> to select messages generated by
|
||||
usage of the GL API, the window system, the shader compiler, third party tools or libraries, explicitly by the application
|
||||
or by some other source, respectively. It may also take the value <constant>GL_DONT_CARE</constant>. If <parameter>source</parameter>
|
||||
is not <constant>GL_DONT_CARE</constant> then only messages whose source matches <parameter>source</parameter> will be referenced.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>type</parameter> may be one of <constant>GL_DEBUG_TYPE_ERROR</constant>, <constant>GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR</constant>,
|
||||
<constant>GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR</constant>, <constant>GL_DEBUG_TYPE_PORTABILITY</constant>,
|
||||
<constant>GL_DEBUG_TYPE_PERFORMANCE</constant>, <constant>GL_DEBUG_TYPE_MARKER</constant>, <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>,
|
||||
<constant>GL_DEBUG_TYPE_POP_GROUP</constant>, or <constant>GL_DEBUG_TYPE_OTHER</constant> to indicate the type of messages describing
|
||||
GL errors, attempted use of deprecated features, triggering of undefined behavior, portability issues, performance notifications, markers,
|
||||
group push and pop events, and other
|
||||
types of messages, respectively. It may also take the value <constant>GL_DONT_CARE</constant>. If <parameter>type</parameter> is not <constant>GL_DONT_CARE</constant>
|
||||
then only messages whose type matches <parameter>type</parameter> will be referenced.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>severity</parameter> may be one of <constant>GL_DEBUG_SEVERITY_LOW</constant>, <constant>GL_DEBUG_SEVERITY_MEDIUM</constant>,
|
||||
or <constant>GL_DEBUG_SEVERITY_HIGH</constant> to select messages of low, medium or high severity messages or to
|
||||
<constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant> for notifications. It may also take the
|
||||
value <constant>GL_DONT_CARE</constant>. If <parameter>severity</parameter> is not <constant>GL_DONT_CARE</constant> then only
|
||||
messages whose severity matches <parameter>severity</parameter> will be referenced.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>ids</parameter> contains a list of <parameter>count</parameter> message identifiers to select specific messages from the pool
|
||||
of available messages. If <parameter>count</parameter> is zero then the value of <parameter>ids</parameter> is ignored. Otherwise,
|
||||
only messages appearing in this list are selected. In this case, <parameter>source</parameter> and <parameter>type</parameter>
|
||||
may not be <constant>GL_DONT_CARE</constant> and <parameter>severity</parameter> must be <constant>GL_DONT_CARE</constant>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>enabled</parameter> is <constant>GL_TRUE</constant> then messages that match the filter formed by
|
||||
<parameter>source</parameter>, <parameter>type</parameter>, <parameter>severity</parameter> and <parameter>ids</parameter>
|
||||
are enabled. Otherwise, those messages are disabled.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
Although debug messages may be enabled in a non-debug context, the quantity and detail of such messages may be substantially
|
||||
inferior to those in a debug context. In particular, a valid implementation of the debug message queue in a non-debug context
|
||||
may produce no messages at all.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_DEBUG_TYPE_MARKER</constant>, <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>, <constant>GL_DEBUG_TYPE_POP_GROUP</constant>, and <constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant>
|
||||
are available only if the GL version is 4.3 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> is negative.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if any of <parameter>source</parameter>, <parameter>type</parameter>
|
||||
or <parameter>severity</parameter> is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>count</parameter> is non-zero
|
||||
and either <parameter>source</parameter> or <parameter>type</parameter> is <constant>GL_DONT_CARE</constant>
|
||||
or if <parameter>severity</parameter> is not <constant>GL_DONT_CARE</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDebugMessageInsert</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDebugMessageCallback</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetDebugMessageLog</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
138
Source/Bind/Specifications/Docs/glDebugMessageInsert.xml
Normal file
138
Source/Bind/Specifications/Docs/glDebugMessageInsert.xml
Normal file
|
@ -0,0 +1,138 @@
|
|||
<?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="glDebugMessageInsert">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDebugMessageInsert</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDebugMessageInsert</refname>
|
||||
<refpurpose>inject an application-supplied message into the debug message queue</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDebugMessageInsert</function></funcdef>
|
||||
<paramdef>GLenum <parameter>source</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>id</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>severity</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>length</parameter></paramdef>
|
||||
<paramdef>const char *<parameter>message</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>source</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The source of the debug message to insert.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the debug message insert.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The user-supplied identifier of the message to insert.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>severity</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The severity of the debug messages to insert.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length string contained in the character array whose address is given by <parameter>message</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>message</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a character array containing the message to insert.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDebugMessageInsert</function> inserts a user-supplied message into the
|
||||
debug output queue. <parameter>source</parameter> specifies the source that will be
|
||||
used to classify the message and must be <constant>GL_DEBUG_SOURCE_APPLICATION</constant>
|
||||
or <constant>GL_DEBUG_SOURCE_THIRD_PARTY</constant>. All other sources are reserved for
|
||||
use by the GL implementation. <parameter>type</parameter> indicates the type of the message
|
||||
to be inserted and may be one of <constant>GL_DEBUG_TYPE_ERROR</constant>, <constant>GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR</constant>,
|
||||
<constant>GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR</constant>, <constant>GL_DEBUG_TYPE_PORTABILITY</constant>,
|
||||
<constant>GL_DEBUG_TYPE_PERFORMANCE</constant>, <constant>GL_DEBUG_TYPE_MARKER</constant>, <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>, <constant>GL_DEBUG_TYPE_POP_GROUP</constant>, or <constant>GL_DEBUG_TYPE_OTHER</constant>.
|
||||
<parameter>severity</parameter> indicates the severity of the message and may be <constant>GL_DEBUG_SEVERITY_LOW</constant>,
|
||||
<constant>GL_DEBUG_SEVERITY_MEDIUM</constant>, <constant>GL_DEBUG_SEVERITY_HIGH</constant> or <constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant>.
|
||||
<parameter>id</parameter> is available for application defined use and may be any value. This value
|
||||
will be recorded and used to identify the message.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>length</parameter> contains a count of the characters in the character array
|
||||
whose address is given in <parameter>message</parameter>. If <parameter>length</parameter>
|
||||
is negative then <parameter>message</parameter> is treated as a null-terminated string.
|
||||
The length of the message, whether specified explicitly or implicitly, must be less than
|
||||
or equal to the implementation defined constant <constant>GL_MAX_DEBUG_MESSAGE_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<constant>GL_DEBUG_TYPE_MARKER</constant>, <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>, <constant>GL_DEBUG_TYPE_POP_GROUP</constant>, and <constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant>
|
||||
are available only if the GL version is 4.3 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if any of <parameter>source</parameter>, <parameter>type</parameter>
|
||||
or <parameter>severity</parameter> is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the length of the message is greater than the
|
||||
value of <constant>GL_MAX_DEBUG_MESSAGE_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDebugMessageControl</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDebugMessageCallback</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetDebugMessageLog</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
97
Source/Bind/Specifications/Docs/glDispatchCompute.xml
Normal file
97
Source/Bind/Specifications/Docs/glDispatchCompute.xml
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?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="glDispatchCompute">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDispatchCompute</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDispatchCompute</refname>
|
||||
<refpurpose>launch one or more compute work groups</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDispatchCompute</function></funcdef>
|
||||
<paramdef>GLuint <parameter>num_groups_x</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>num_groups_y</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>num_groups_z</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>num_groups_x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of work groups to be launched in the X dimension.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>num_groups_y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of work groups to be launched in the Y dimension.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>num_groups_z</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of work groups to be launched in the Z dimension.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDispatchCompute</function> launches one or more compute
|
||||
work groups. Each work group is processed by the active program object for the compute
|
||||
shader stage. While the individual shader invocations within a work group are
|
||||
executed as a unit, work groups are executed completely independently and in
|
||||
unspecified order. <parameter>num_groups_x</parameter>, <parameter>num_groups_y</parameter>
|
||||
and <parameter>num_groups_z</parameter> specify the number of local
|
||||
work groups that will be dispatched in the X, Y and Z dimensions, respectively.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if there is no active program
|
||||
for the compute shader stage.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if any of <parameter>num_groups_x</parameter>,
|
||||
<parameter>num_groups_y</parameter>, or <parameter>num_groups_z</parameter> is greater than or
|
||||
equal to the maximum work-group count for the corresponding dimension.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_COMPUTE_WORK_GROUP_COUNT</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDispatchComputeIndirect</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
112
Source/Bind/Specifications/Docs/glDispatchComputeIndirect.xml
Normal file
112
Source/Bind/Specifications/Docs/glDispatchComputeIndirect.xml
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?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="glDispatchComputeIndirect">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDispatchComputeIndirect</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDispatchComputeIndirect</refname>
|
||||
<refpurpose>launch one or more compute work groups using parameters stored in a buffer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDispatchComputeIndirect</function></funcdef>
|
||||
<paramdef>GLintptr <parameter>indirect</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>indirect</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The offset into the buffer object currently bound to the
|
||||
<constant>GL_DISPATCH_INDIRECT_BUFFER</constant> buffer target at
|
||||
which the dispatch parameters are stored.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDispatchComputeIndirect</function> launches one or more compute
|
||||
work groups using parameters stored in the buffer object currently bound
|
||||
to the <constant>GL_DISPATCH_INDIRECT_BUFFER</constant> target.
|
||||
Each work group is processed by the active program object for the compute
|
||||
shader stage. While the individual shader invocations within a work group are
|
||||
executed as a unit, work groups are executed completely independently and in
|
||||
unspecified order. <parameter>indirect</parameter> contains the offset
|
||||
into the data store of the buffer object bound to the <constant>GL_DISPATCH_INDIRECT_BUFFER</constant>
|
||||
target at which the parameters are stored.
|
||||
</para>
|
||||
<para>
|
||||
The parameters addressed by <parameter>indirect</parameter> are packed a structure,
|
||||
which takes the form (in C):
|
||||
<programlisting><![CDATA[ typedef struct {
|
||||
uint num_groups_x;
|
||||
uint num_groups_y;
|
||||
uint num_groups_z;
|
||||
} DispatchIndirectCommand;]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
A call to <function>glDispatchComputeIndirect</function> is equivalent, assuming no
|
||||
errors are generated, to:
|
||||
<programlisting><![CDATA[ cmd = (const DispatchIndirectCommand *)indirect;
|
||||
glDispatchComputeIndirect(cmd->num_groups_x, cmd->num_groups_y, cmd->num_groups_z);
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Unlike <citerefentry><refentrytitle>glDispatchCompute</refentrytitle></citerefentry>,
|
||||
no error is generated if any of the <code>num_groups_x</code>,
|
||||
<code>num_groups_y</code> or <code>num_groups_z</code> members
|
||||
of the <code>DispatchIndirectCommand</code> is larger than the
|
||||
value of <constant>GL_MAX_COMPUTE_WORK_GROUP_COUNT</constant> for the
|
||||
corresponding dimension. In such circumstances, behavior is undefined and
|
||||
may lead to application termination.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if there is no active program
|
||||
for the compute shader stage.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>indirect</parameter> is
|
||||
less than zero or not a multiple of four.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no buffer is bound to the
|
||||
<constant>GL_DISPATCH_INDIRECT_BUFFER</constant> target or if the command would
|
||||
source data beyond the end of the buffer object's data store.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_COMPUTE_WORK_GROUP_COUNT</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDispatchCompute</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
|
@ -0,0 +1,153 @@
|
|||
<?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="glDrawArraysInstancedBaseInstance">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2010</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDrawArraysInstancedBaseInstance</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDrawArraysInstancedBaseInstance</refname>
|
||||
<refpurpose>draw multiple instances of a range of elements with offset applied to instanced attributes</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDrawArraysInstancedBaseInstance</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>
|
||||
<paramdef>GLuint <parameter>baseinstance</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<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_LINES_ADJACENCY</constant>, <constant>GL_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>, <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and <constant>GL_PATCHES</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>
|
||||
<varlistentry>
|
||||
<term><parameter>primcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of instances of the specified range of indices to be rendered.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>baseinstance</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the base instance for use in fetching instanced vertex attributes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDrawArraysInstancedBaseInstance</function> behaves identically to <citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>
|
||||
except that <parameter>primcount</parameter> instances of the range of elements are executed and the value of the internal counter
|
||||
<parameter>instanceID</parameter> advances for each iteration. <parameter>instanceID</parameter> is an internal 32-bit integer counter
|
||||
that may be read by a vertex shader as <constant>gl_InstanceID</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<function>glDrawArraysInstancedBaseInstance</function> has the same effect as:
|
||||
<programlisting><![CDATA[ if ( mode or count is invalid )
|
||||
generate appropriate error
|
||||
else {
|
||||
for (int i = 0; i < primcount ; i++) {
|
||||
instanceID = i;
|
||||
glDrawArrays(mode, first, count);
|
||||
}
|
||||
instanceID = 0;
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Specific vertex attributes may be classified as <emphasis>instanced</emphasis> through the use of
|
||||
<citerefentry><refentrytitle>glVertexAttribDivisor</refentrytitle></citerefentry>. Instanced vertex attributes
|
||||
supply per-instance vertex data to the vertex shader. The index of the vertex fetched from the enabled instanced vertex
|
||||
attribute arrays is calculated as:
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mfrac>
|
||||
<mml:mrow>
|
||||
<mml:mi>gl</mml:mi>
|
||||
<mml:mo>_</mml:mo>
|
||||
<mml:mi>InstanceID</mml:mi>
|
||||
</mml:mrow>
|
||||
<mml:mi>divisor</mml:mi>
|
||||
</mml:mfrac>
|
||||
</mml:mfenced>
|
||||
<mml:mo lspace='2px' rspace='2px'>+</mml:mo>
|
||||
<mml:mi>baseInstance</mml:mi>
|
||||
</mml:mrow>
|
||||
</mml:math>. Note that <parameter>baseinstance</parameter> does not affect the shader-visible value of <constant>gl_InstanceID</constant>.
|
||||
</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 accepted values.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> or <parameter>primcount</parameter> are 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>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElementsInstanced</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
|
@ -0,0 +1,184 @@
|
|||
<?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="glDrawElementsInstancedBaseInstance">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDrawElementsInstancedBaseInstance</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDrawElementsInstancedBaseInstance</refname>
|
||||
<refpurpose>draw multiple instances of a set of elements with offset applied to instanced attributes</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDrawElementsInstancedBaseInstance</function></funcdef>
|
||||
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>const void * <parameter>indices</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>primcount</parameter></paramdef>
|
||||
<paramdef>GLuitn <parameter>baseinstance</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<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_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_LINES_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP</constant>,
|
||||
<constant>GL_TRIANGLE_FAN</constant>,
|
||||
<constant>GL_TRIANGLES</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant> and <constant>GL_PATCHES</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>
|
||||
<varlistentry>
|
||||
<term><parameter>primcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of instances of the specified range of indices to be rendered.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>baseinstance</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the base instance for use in fetching instanced vertex attributes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDrawElementsInstancedBaseInstance</function> behaves identically to <citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>
|
||||
except that <parameter>primcount</parameter> instances of the set of elements are executed and the value of the internal counter
|
||||
<parameter>instanceID</parameter> advances for each iteration. <parameter>instanceID</parameter> is an internal 32-bit integer counter
|
||||
that may be read by a vertex shader as <constant>gl_InstanceID</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<function>glDrawElementsInstancedBaseInstance</function> has the same effect as:
|
||||
<programlisting><![CDATA[ if (mode, count, or type is invalid )
|
||||
generate appropriate error
|
||||
else {
|
||||
for (int i = 0; i < primcount ; i++) {
|
||||
instanceID = i;
|
||||
glDrawElements(mode, count, type, indices);
|
||||
}
|
||||
instanceID = 0;
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Specific vertex attributes may be classified as <emphasis>instanced</emphasis> through the use of
|
||||
<citerefentry><refentrytitle>glVertexAttribDivisor</refentrytitle></citerefentry>. Instanced vertex attributes
|
||||
supply per-instance vertex data to the vertex shader. The index of the vertex fetched from the enabled instanced vertex
|
||||
attribute arrays is calculated as
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mfrac>
|
||||
<mml:mrow>
|
||||
<mml:mi>gl</mml:mi>
|
||||
<mml:mo>_</mml:mo>
|
||||
<mml:mi>InstanceID</mml:mi>
|
||||
</mml:mrow>
|
||||
<mml:mi>divisor</mml:mi>
|
||||
</mml:mfrac>
|
||||
</mml:mfenced>
|
||||
<mml:mo lspace='2px' rspace='2px'>+</mml:mo>
|
||||
<mml:mi>baseInstance</mml:mi>
|
||||
</mml:mrow>
|
||||
</mml:math>. Note that <parameter>baseinstance</parameter> does not affect the shader-visible value of <constant>gl_InstanceID</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glDrawElementsInstancedBaseInstance</function> is available only if the GL version is 4.2 or greater.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_LINES_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>
|
||||
are available only if the GL version is 3.2 or greater.
|
||||
</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_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>, or <constant>GL_TRIANGLES</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> or <parameter>primcount</parameter> are negative.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</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>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
|
@ -0,0 +1,170 @@
|
|||
<?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="glDrawElementsInstancedBaseVertexBaseInstance">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDrawElementsInstancedBaseVertexBaseInstance</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDrawElementsInstancedBaseVertexBaseInstance</refname>
|
||||
<refpurpose>render multiple instances of a set of primitives from array data with a per-element offset</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDrawElementsInstancedBaseVertexBaseInstance</function></funcdef>
|
||||
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>count</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>GLvoid *<parameter>indices</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>primcount</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>basevertex</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>baseinstance</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_LINES_ADJACENCY</constant>, <constant>GL_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>, <constant>GL_TRIANGLE_STRIP_ADJACENCY</constant> and <constant>GL_PATCHES</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 indices. 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 number of instances of the indexed geometry that should be drawn.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>basevertex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a constant that should be added to each element of <parameter>indices</parameter>
|
||||
when chosing elements from the enabled vertex arrays.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>baseinstance</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the base instance for use in fetching instanced vertex attributes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDrawElementsInstancedBaseVertexBaseInstance</function> behaves identically to
|
||||
<citerefentry><refentrytitle>glDrawElementsInstanced</refentrytitle></citerefentry> except that the <emphasis>i</emphasis>th element
|
||||
transferred by the corresponding draw call will be taken from element <parameter>indices</parameter>[i] + <parameter>basevertex</parameter>
|
||||
of each enabled array. If the resulting value is larger than the maximum value representable by <parameter>type</parameter>,
|
||||
it is as if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions).
|
||||
The operation is undefined if the sum would be negative. The <parameter>basevertex</parameter> has no effect on the
|
||||
shader-visible value of <constant>gl_VertexID</constant>.
|
||||
</para>
|
||||
<para>
|
||||
Specific vertex attributes may be classified as <emphasis>instanced</emphasis> through the use of
|
||||
<citerefentry><refentrytitle>glVertexAttribDivisor</refentrytitle></citerefentry>. Instanced vertex attributes
|
||||
supply per-instance vertex data to the vertex shader. The index of the vertex fetched from the enabled instanced vertex
|
||||
attribute arrays is calculated as
|
||||
<mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mfrac>
|
||||
<mml:mrow>
|
||||
<mml:mi>gl</mml:mi>
|
||||
<mml:mo>_</mml:mo>
|
||||
<mml:mi>InstanceID</mml:mi>
|
||||
</mml:mrow>
|
||||
<mml:mi>divisor</mml:mi>
|
||||
</mml:mfrac>
|
||||
</mml:mfenced>
|
||||
<mml:mo lspace='2px' rspace='2px'>+</mml:mo>
|
||||
<mml:mi>baseInstance</mml:mi>
|
||||
</mml:mrow>
|
||||
</mml:math>. Note that <parameter>baseinstance</parameter> does not affect the shader-visible value of <constant>gl_InstanceID</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<function>glDrawElementsInstancedBaseVertex</function> is only supported if the GL version is 3.2 or greater.
|
||||
</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> or <parameter>primcount</parameter> is negative.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</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>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawRangeElementsBaseVertex</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElementsInstanced</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElementsInstancedBaseVertex</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
|
@ -0,0 +1,134 @@
|
|||
<?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="glDrawTransformFeedbackInstanced">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDrawTransformFeedbackInstanced</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDrawTransformFeedbackInstanced</refname>
|
||||
<refpurpose>render multiple instances of primitives using a count derived from a transform feedback object</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDrawTransformFeedbackInstanced</function></funcdef>
|
||||
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>id</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_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_LINES_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP</constant>,
|
||||
<constant>GL_TRIANGLE_FAN</constant>,
|
||||
<constant>GL_TRIANGLES</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>, and
|
||||
<constant>GL_PATCHES</constant>
|
||||
are accepted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the name of a transform feedback object from which to retrieve a primitive count.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>primcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of instances of the geometry to render.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDrawTransformFeedbackInstanced</function> draws multiple copies of a range of primitives of a type specified by <parameter>mode</parameter> using
|
||||
a count retrieved from the transform feedback stream specified by <parameter>stream</parameter> of the transform feedback object
|
||||
specified by <parameter>id</parameter>. Calling <function>glDrawTransformFeedbackInstanced</function>
|
||||
is equivalent to calling <citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry> with <parameter>mode</parameter>
|
||||
and <parameter>primcount</parameter> as specified, <parameter>first</parameter> set to zero, and <parameter>count</parameter> set to the number of vertices captured
|
||||
on vertex stream zero the last time transform feedback was active on the transform feedback object named
|
||||
by <parameter>id</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Calling <citerefentry>glDrawTransformFeedbackInstanced</citerefentry> is equivalent to calling <function>glDrawTransformFeedbackStreamInstanced</function>
|
||||
with <parameter>stream</parameter> set to zero.
|
||||
</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>id</parameter> is not the name of a transform feedback
|
||||
object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>stream</parameter> is greater than or equal to
|
||||
the value of <constant>GL_MAX_VERTEX_STREAMS</constant>.
|
||||
</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 a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> is <constant>GL_PATCHES</constant>
|
||||
and no tessellation control shader is active.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>
|
||||
has never been called while the transform feedback object named by <parameter>id</parameter> was bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawTransformFeedback</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawTransformFeedbackStreamInstanced</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2010-2011 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>
|
|
@ -0,0 +1,143 @@
|
|||
<?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="glDrawTransformFeedbackStreamInstanced">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glDrawTransformFeedbackStreamInstanced</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glDrawTransformFeedbackStreamInstanced</refname>
|
||||
<refpurpose>render multiple instances of primitives using a count derived from a specifed stream of a transform feedback object</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glDrawTransformFeedbackStreamInstanced</function></funcdef>
|
||||
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>id</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>stream</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_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_LINES_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP</constant>,
|
||||
<constant>GL_TRIANGLE_FAN</constant>,
|
||||
<constant>GL_TRIANGLES</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>, and
|
||||
<constant>GL_PATCHES</constant>
|
||||
are accepted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the name of a transform feedback object from which to retrieve a primitive count.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>stream</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the index of the transform feedback stream from which to retrieve a primitive count.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>primcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of instances of the geometry to render.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glDrawTransformFeedbackStreamInstanced</function> draws multiple copies of a range of primitives of a type specified by <parameter>mode</parameter> using
|
||||
a count retrieved from the transform feedback stream specified by <parameter>stream</parameter> of the transform feedback object
|
||||
specified by <parameter>id</parameter>. Calling <function>glDrawTransformFeedbackStreamInstanced</function>
|
||||
is equivalent to calling <citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry> with <parameter>mode</parameter>
|
||||
and <parameter>primcount</parameter> as specified, <parameter>first</parameter> set to zero, and <parameter>count</parameter> set to the number of vertices captured
|
||||
on vertex stream <parameter>stream</parameter> the last time transform feedback was active on the transform feedback object named
|
||||
by <parameter>id</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
Calling <citerefentry><refentrytitle>glDrawTransformFeedbackInstanced</refentrytitle></citerefentry> is equivalent to calling <function>glDrawTransformFeedbackStreamInstanced</function>
|
||||
with <parameter>stream</parameter> set to zero.
|
||||
</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>id</parameter> is not the name of a transform feedback
|
||||
object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>stream</parameter> is greater than or equal to
|
||||
the value of <constant>GL_MAX_VERTEX_STREAMS</constant>.
|
||||
</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 a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> is <constant>GL_PATCHES</constant>
|
||||
and no tessellation control shader is active.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <citerefentry><refentrytitle>glEndTransformFeedback</refentrytitle></citerefentry>
|
||||
has never been called while the transform feedback object named by <parameter>id</parameter> was bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawTransformFeedback</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawTransformFeedbackStream</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2010-2011 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>
|
179
Source/Bind/Specifications/Docs/glFramebufferParameteri.xml
Normal file
179
Source/Bind/Specifications/Docs/glFramebufferParameteri.xml
Normal file
|
@ -0,0 +1,179 @@
|
|||
<?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="glFramebufferParameteri">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glFramebufferParameteri</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glFramebufferParameteri</refname>
|
||||
<refpurpose>set a named parameter of a framebuffer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glFramebufferParameteri</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>pname</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>param</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The target of the operation, which must be <constant>GL_READ_FRAMEBUFFER</constant>,
|
||||
<constant>GL_DRAW_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token indicating the parameter to be modified.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>param</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new value for the parameter named <parameter>pname</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glFramebufferParameteri</function> modifies the current value of the parameter
|
||||
named <parameter>pname</parameter> in the framebuffer bound to <parameter>target</parameter>.
|
||||
<parameter>target</parameter> must be <constant>GL_READ_FRAMEBFUFFER</constant>,
|
||||
<constant>GL_DRAW_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>. The
|
||||
token <constant>GL_FRAMEBUFFER</constant> is treated as <constant>GL_DRAW_FRAMEBUFFER</constant>.
|
||||
A non-default framebuffer must be bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>pname</parameter> specifies the parameter to be modified. The following symbols
|
||||
are accepted in <parameter>pname</parameter>:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_WIDTH</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>param</parameter> specifies the assumed with for a framebuffer object with no attachments. If a
|
||||
framebuffer has attachments then the width of those attachments is used, otherwise
|
||||
the value of <constant>GL_FRAMEBUFFER_DEFAULT_WIDTH</constant> is used for the
|
||||
framebuffer. <parameter>param</parameter> must be greater than or equal to zero and less than
|
||||
or equal to the value of <constant>GL_MAX_FRAMEBUFFER_WIDTH</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_HEIGHT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>param</parameter> specifies the assumed height for a framebuffer object with no attachments. If a
|
||||
framebuffer has attachments then the height of those attachments is used, otherwise
|
||||
the value of <constant>GL_FRAMEBUFFER_DEFAULT_HEIGHT</constant> is used for the
|
||||
framebuffer. <parameter>param</parameter> must be greater than or equal to zero and less than
|
||||
or equal to the value of <constant>GL_MAX_FRAMEBUFFER_HEIGHT</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_LAYERS</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>param</parameter> specifies the assumed number of layers for a framebuffer object with no attachments. If a
|
||||
framebuffer has attachments then the layer count of those attachments is used, otherwise
|
||||
the value of <constant>GL_FRAMEBUFFER_DEFAULT_LAYERS</constant> is used for the
|
||||
framebuffer. <parameter>param</parameter> must be greater than or equal to zero and less than
|
||||
or equal to the value of <constant>GL_MAX_FRAMEBUFFER_LAYERS</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_SAMPLES</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>param</parameter> specifies the assumed number of samples in a framebuffer object with no attachments. If a
|
||||
framebuffer has attachments then the sample count of those attachments is used, otherwise
|
||||
the value of <constant>GL_FRAMEBUFFER_DEFAULT_SAMPLES</constant> is used for the
|
||||
framebuffer. <parameter>param</parameter> must be greater than or equal to zero and less than
|
||||
or equal to the value of <constant>GL_MAX_FRAMEBUFFER_SAMPLE</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<parameter>param</parameter> specifies whether the framebuffer should assume identical sample locations and
|
||||
the same number of samples for all texels in the virtual image. If <parameter>param</parameter> is zero,
|
||||
then the implementation may vary the position or the count of samples within the virtual image from
|
||||
pixel to pixel, otherwise it will use the same sample position and count for all pixels in the virtual image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the accepted
|
||||
framebuffer targets.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_DEFAULT_WIDTH</constant>
|
||||
and <parameter>param</parameter> is less than zero or greater than the value of <constant>GL_MAX_FRAMEBUFFER_WIDTH</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_DEFAULT_HEIGHT</constant>
|
||||
and <parameter>param</parameter> is less than zero or greater than the value of <constant>GL_MAX_FRAMEBUFFER_HEIGHT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_DEFAULT_LAYERS</constant>
|
||||
and <parameter>param</parameter> is less than zero or greater than the value of <constant>GL_MAX_FRAMEBUFFER_LAYERS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_DEFAULT_SAMPLES</constant>
|
||||
and <parameter>param</parameter> is less than zero or greater than the value of <constant>GL_MAX_FRAMEBUFFER_SAMPLES</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the default framebuffer is bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetFramebufferParameteriv</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glVertexAttribBinding</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribFormat</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexBindingDivisor</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
|
@ -0,0 +1,157 @@
|
|||
<?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="glGetActiveAtomicCounterBufferiv">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetActiveAtomicCounterBufferiv</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetActiveAtomicCounterBufferiv</refname>
|
||||
<refpurpose>retrieve information about the set of active atomic counter buffers for a program</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetActiveAtomicCounterBufferiv</function></funcdef>
|
||||
<paramdef>Gluint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>bufferIndex</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>program</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a program object from which to retrieve information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bufferIndex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies index of an active atomic counter buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies which parameter of the atomic counter buffer to retrieve.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of a variable into which to write the retrieved information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetActiveAtomicCounterBufferiv</function> retrieves information about the set of active
|
||||
atomic counter buffers for a program object. <parameter>program</parameter> is the name of a program
|
||||
object for which the command <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry>
|
||||
has been issued in the past. It is not necessary for <parameter>program</parameter> to have been linked
|
||||
successfully. The link may have failed because the number of active atomic counters exceeded the limits.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>bufferIndex</parameter> specifies the index of an active atomic counter buffer and must be in
|
||||
the range zero to the value of <constant>GL_ACTIVE_ATOMIC_COUNTER_BUFFERS</constant> minus one. The value
|
||||
of <constant>GL_ACTIVE_ATOMIC_COUNTER_BUFFERS</constant> for <parameter>program</parameter> indicates the
|
||||
number of active atomic counter buffer and can be queried with
|
||||
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
<para>
|
||||
If no error occurs, the parameter(s) specified by <parameter>pname</parameter> are returned in <parameter>params</parameter>.
|
||||
If an error is generated, the contents of <parameter>params</parameter> are not modified.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_BINDING</constant>, then the index of the
|
||||
counter buffer binding point associated with the active atomic counter buffer <parameter>bufferIndex</parameter>
|
||||
for <parameter>program</parameter> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE</constant>, then the implementation-dependent
|
||||
minimum total buffer object size, in baseic machine units, required to hold all active atomic counters in the
|
||||
atomic counter binding point identified by <parameter>bufferIndex</parameter> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS</constant>, then the number of active
|
||||
atomic counters for the atomic counter buffer identified by <parameter>bufferIndex</parameter> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES</constant>,
|
||||
then a list of the active atomic counter indices for the atomic counter buffer identified by <parameter>bufferIndex</parameter>
|
||||
is returned. The number of elements that will be written into <parameter>params</parameter> is the value of
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS</constant> for <parameter>bufferIndex</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER</constant>,
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER</constant>,
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER</constant>,
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER</constant>,
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER</constant>,
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER</constant> then a boolean value indicating
|
||||
whether the atomic counter buffer identified by <parameter>bufferIndex</parameter> is referenced by the vertex,
|
||||
tessellation control, tessellation evaluation, geometry, fragment or compute processing stages of <parameter>program</parameter>,
|
||||
respectively, is returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glGetActiveAtomicCounterBufferiv</function> is available only if the
|
||||
GL version is 4.2 or higher.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER</constant> is available
|
||||
only of the GL version is 4.3 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter> is not the name of a program
|
||||
object for which <citerefentry><refentrytitle>glLinkProgram</refentrytitle></citerefentry> has been called in the past.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufferIndex</parameter> is greater than or equal to
|
||||
the value of <constant>GL_ACTIVE_ATOMIC_COUNTER_BUFFERS</constant> for <parameter>program</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not one of the accepted tokens.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetProgram</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetActiveSubroutineUniform</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetActiveSubroutineUniformName</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetUniformLocation</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
805
Source/Bind/Specifications/Docs/glGetActiveUniformsiv.xml
Normal file
805
Source/Bind/Specifications/Docs/glGetActiveUniformsiv.xml
Normal file
|
@ -0,0 +1,805 @@
|
|||
<?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="glGetActiveUniformsiv">
|
||||
<refmeta>
|
||||
<refentrytitle>glGetActiveUniformsiv</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetActiveUniformsiv</refname>
|
||||
<refpurpose>Returns information about several active uniform variables for the specified program object</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetActiveUniformsiv</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>uniformCount</parameter></paramdef>
|
||||
<paramdef>const GLuint *<parameter>uniformIndices</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>uniformCount</parameter></term>
|
||||
<listitem>
|
||||
<para>Specifies both the number of elements in the array of indices <parameter>uniformIndices</parameter> and the
|
||||
number of parameters written to <parameter>params</parameter> upon successful return.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>uniformIndices</parameter></term>
|
||||
<listitem>
|
||||
<para>Specifies the address of an array of <parameter>uniformCount</parameter> integers containing the indices of
|
||||
uniforms within <parameter>program</parameter> whose parameter <parameter>pname</parameter> pname.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pname</parameter></term>
|
||||
<listitem>
|
||||
<para>Specifies the property of the each uniform in <parameter>uniformIndices</parameter> that should be
|
||||
written into the corresponding element of <parameter>params</parameter>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>Specifies the address of an array of <parameter>uniformCount</parameter> integers which are to
|
||||
receive the value of <parameter>pname</parameter> for each uniform in <parameter>uniformIndices</parameter>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetActiveUniformsiv</function> queries the value of the parameter named <parameter>pname</parameter>
|
||||
for each of the uniforms within <parameter>program</parameter> whose indices are specified in the array of
|
||||
<parameter>uniformCount</parameter> unsigned integers <parameter>uniformIndices</parameter>. Upon success,
|
||||
the value of the parameter for each uniform is written into the corresponding entry in the array whose
|
||||
address is given in <parameter>params</parameter>. If an error is generated, nothing is written into
|
||||
<parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_TYPE</constant>, then an array identifying the types
|
||||
of uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> is returned. The
|
||||
returned types can be any of the values from the following table:
|
||||
<informaltable frame="topbot">
|
||||
<tgroup cols="2" align="left">
|
||||
<colspec colwidth="1.1*" />
|
||||
<colspec colwidth="1*" />
|
||||
<thead>
|
||||
<row>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Returned Symbolic Contant
|
||||
</emphasis></entry>
|
||||
<entry rowsep="1" align="left"><emphasis role="bold">
|
||||
Shader Uniform Type
|
||||
</emphasis></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>float</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_VEC2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>vec2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_VEC3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>vec3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_VEC4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>vec4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>double</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_VEC2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dvec2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_VEC3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dvec3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_VEC4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dvec4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>int</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_VEC2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>ivec2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_VEC3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>ivec3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_VEC4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>ivec4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>unsigned int</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_VEC2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>uvec2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_VEC3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>uvec3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_VEC4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>uvec4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_BOOL</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>bool</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_BOOL_VEC2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>bvec2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_BOOL_VEC3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>bvec3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_BOOL_VEC4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>bvec4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT2x3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat2x3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT2x4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat2x4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT3x2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat3x2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT3x4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat3x4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT4x2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat4x2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_FLOAT_MAT4x3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>mat4x3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT2x3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat2x3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT2x4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat2x4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT3x2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat3x2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT3x4</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat3x4</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT4x2</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat4x2</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_DOUBLE_MAT4x3</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>dmat4x3</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_1D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler1D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_3D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler3D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_CUBE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>samplerCube</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_1D_SHADOW</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler1DShadow</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_SHADOW</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DShadow</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_1D_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler1DArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_1D_ARRAY_SHADOW</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler1DArrayShadow</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_ARRAY_SHADOW</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DArrayShadow</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_MULTISAMPLE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DMS</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_MULTISAMPLE_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DMSArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_CUBE_SHADOW</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>samplerCubeShadow</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_BUFFER</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>samplerBuffer</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_RECT</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DRect</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_SAMPLER_2D_RECT_SHADOW</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>sampler2DRectShadow</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_1D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler1D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_2D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler2D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_3D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler3D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_CUBE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isamplerCube</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_1D_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler1DArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_2D_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler2DArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_2D_MULTISAMPLE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler2DMS</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler2DMSArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_BUFFER</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isamplerBuffer</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_INT_SAMPLER_2D_RECT</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>isampler2DRect</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_1D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler1D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_2D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler2D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_3D</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler3D</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_CUBE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usamplerCube</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_1D_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler2DArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_2D_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler2DArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler2DMS</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler2DMSArray</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_BUFFER</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usamplerBuffer</constant>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">
|
||||
<constant>GL_UNSIGNED_INT_SAMPLER_2D_RECT</constant>
|
||||
</entry>
|
||||
<entry align="left">
|
||||
<constant>usampler2DRect</constant>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_SIZE</constant>, then an array identifying the
|
||||
size of the uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> is
|
||||
returned. The sizes returned are in units of the type returned by a query of <constant>GL_UNIFORM_TYPE</constant>.
|
||||
For active uniforms that are arrays, the size is the number of active elements in the array;
|
||||
for all other uniforms, the size is one.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_NAME_LENGTH</constant>, then an array identifying the
|
||||
length, including the terminating null character, of the uniform name strings specified by the corresponding
|
||||
array of <parameter>uniformIndices</parameter> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_BLOCK_INDEX</constant>, then an array identifying the
|
||||
the uniform block index of each of the uniforms specified by the corresponding array of <parameter>uniformIndices</parameter>
|
||||
is returned. The uniform block index of a uniform associated with the default uniform block is -1.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_OFFSET</constant>, then an array of uniform buffer
|
||||
offsets is returned. For uniforms in a named uniform block, the returned value will be its offset, in basic
|
||||
machine units, relative to the beginning of the uniform block in the buffer object data store.
|
||||
For atomic counter uniforms, the returned value will be its offset relative to the beginning of its active
|
||||
atomic counter buffer.
|
||||
For all other uniforms, -1 will be returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_ARRAY_STRIDE</constant>, then an array identifying the
|
||||
stride between elements of each of the uniforms specified by the corresponding array of
|
||||
<parameter>uniformIndices</parameter> is returned.
|
||||
For uniforms in named uniform blocks and for uniforms declared as atomic counters, the stride is the difference,
|
||||
in basic machine units, of consecutive elements in an array, or zero for uniforms not declared as an array.
|
||||
For all other uniforms, a stride of -1 will be returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_MATRIX_STRIDE</constant>, then an array identifying the stride
|
||||
between columns of a column-major matrix or rows of a row-major matrix, in basic machine units, of each of the uniforms
|
||||
specified by the corresponding array of <parameter>uniformIndices</parameter> is returned. The matrix stride of a
|
||||
uniform associated with the default uniform block is -1. Note that this information only makes sense for uniforms
|
||||
that are matrices. For uniforms that are not matrices, but are declared in a named uniform block, a matrix stride of
|
||||
zero is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_IS_ROW_MAJOR</constant>, then an array identifying whether each
|
||||
of the uniforms specified by the corresponding array of <parameter>uniformIndices</parameter> is a row-major matrix or not is returned. A
|
||||
value of one indicates a row-major matrix, and a value of zero indicates a column-major matrix, a matrix in the default
|
||||
uniform block, or a non-matrix.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX</constant>, then an array
|
||||
identifying the active atomic counter buffer index of each of the uniforms specified by the corresponding array
|
||||
of <parameter>uniformIndices</parameter> is returned. For uniforms other than atomic counters, the returned buffer
|
||||
index is -1. The returned indices may be passed to <citerefentry><refentrytitle>glGetActiveAtomicCounterBufferiv</refentrytitle></citerefentry>
|
||||
to query the properties of the associated buffer, and not necessarily the binding point specified in the uniform declaration.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
The double types, <constant>GL_DOUBLE</constant>, <constant>GL_DOUBLE_VEC2</constant>,
|
||||
<constant>GL_DOUBLE_VEC3</constant>, <constant>GL_DOUBLE_VEC4</constant>,
|
||||
<constant>GL_DOUBLE_MAT2</constant>, <constant>GL_DOUBLE_MAT3</constant>,
|
||||
<constant>GL_DOUBLE_MAT4</constant>, <constant>GL_DOUBLE_MAT2x3</constant>,
|
||||
<constant>GL_DOUBLE_MAT2x4</constant>, <constant>GL_DOUBLE_MAT3x2</constant>,
|
||||
<constant>GL_DOUBLE_MAT3x4</constant>, <constant>GL_DOUBLE_MAT4x2</constant>,
|
||||
and <constant>GL_DOUBLE_MAT4x3</constant> are only available if the GL
|
||||
version is 4.1 or higher.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX</constant> is only accepted by <parameter>pname</parameter>
|
||||
if the GL version is 4.2 or higher.
|
||||
</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>uniformCount</parameter> is greater than or equal to the
|
||||
value of <constant>GL_ACTIVE_UNIFORMS</constant> for
|
||||
<parameter>program</parameter>.</para>
|
||||
|
||||
<para><constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter>
|
||||
is not an accepted token.</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para><citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
|
||||
with argument <constant>GL_MAX_VERTEX_UNIFORM_COMPONENTS</constant>,
|
||||
<constant>GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS</constant>,
|
||||
<constant>GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS</constant>,
|
||||
<constant>GL_MAX_GEOMETRY_UNIFORM_COMPONENTS</constant>,
|
||||
<constant>GL_MAX_FRAGMENT_UNIFORM_COMPONENTS</constant>, or
|
||||
<constant>GL_MAX_COMBINED_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>glGetActiveUniform</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> 2011 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>
|
171
Source/Bind/Specifications/Docs/glGetDebugMessageLog.xml
Normal file
171
Source/Bind/Specifications/Docs/glGetDebugMessageLog.xml
Normal file
|
@ -0,0 +1,171 @@
|
|||
<?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="glGetDebugMessageLog">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetDebugMessageLog</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetDebugMessageLog</refname>
|
||||
<refpurpose>retrieve messages from the debug message log</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>GLuint <function>glGetDebugMessageLog</function></funcdef>
|
||||
<paramdef>GLuint <parameter>count</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
|
||||
<paramdef>GLenum *<parameter>sources</parameter></paramdef>
|
||||
<paramdef>Glenum *<parameter>types</parameter></paramdef>
|
||||
<paramdef>GLuint *<parameter>ids</parameter></paramdef>
|
||||
<paramdef>GLenum *<parameter>severities</parameter></paramdef>
|
||||
<paramdef>GLsizei *<parameter>lengths</parameter></paramdef>
|
||||
<paramdef>GLchar *<parameter>messageLog</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>count</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of debug messages to retrieve from the log.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bufSize</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of the buffer whose address is given by <parameter>messageLog</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>sources</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of variables to receive the sources of the retrieved messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>types</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of variables to receive the types of the retrieved messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>ids</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of unsigned integers to receive the ids of the retrieved messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>severities</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of variables to receive the severites of the retrieved messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>lengths</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of variables to receive the lengths of the received messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>messageLog</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array of characters that will receive the messages.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetDebugMessageLog</function> retrieves messages from the debug message log. A maximum of
|
||||
<parameter>count</parameter> messages are retrieved from the log. If <parameter>sources</parameter>
|
||||
is not NULL then the source of each message is written into up to <parameter>count</parameter> elements
|
||||
of the array. If <parameter>types</parameter>
|
||||
is not NULL then the type of each message is written into up to <parameter>count</parameter> elements
|
||||
of the array. If <parameter>id</parameter>
|
||||
is not NULL then the identifier of each message is written into up to <parameter>count</parameter> elements
|
||||
of the array. If <parameter>severities</parameter>
|
||||
is not NULL then the severity of each message is written into up to <parameter>count</parameter> elements
|
||||
of the array. If <parameter>lengths</parameter>
|
||||
is not NULL then the length of each message is written into up to <parameter>count</parameter> elements
|
||||
of the array.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>messageLog</parameter> specifies the address of a character array into which the debug messages
|
||||
will be written. Each message will be concatenated onto the array starting at the first element of <parameter>messageLog</parameter>.
|
||||
<parameter>bufSize</parameter> specifies the size of the array <parameter>messageLog</parameter>. If a message will not
|
||||
fit into the remaining space in <parameter>messageLog</parameter> then the function terminates and returns the number
|
||||
of messages written so far, which may be zero.
|
||||
</para>
|
||||
<para>
|
||||
If <function>glGetDebugMessageLog</function> returns zero then no messages are present in the debug log, or there
|
||||
was not enough space in <parameter>messageLog</parameter> to retrieve the first message in the queue. If <parameter>messageLog</parameter>
|
||||
is NULL then no messages are written and the value of <parameter>bufSize</parameter> is ignored.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
Although debug messages may be enabled in a non-debug context, the quantity and detail of such messages may be substantially
|
||||
inferior to those in a debug context. In particular, a valid implementation of the debug message queue in a non-debug context
|
||||
may produce no messages at all.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>count</parameter> or <parameter>bufSize</parameter> is negative.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEBUG_LOGGED_MESSAGES</constant>
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH</constant>
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_DEBUG_MESSAGE_LENGTH</constant>
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_DEBUG_LOGGED_MESSAGES</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDebugMessageInsert</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDebugMessageCallback</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDebugMessageControl</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
156
Source/Bind/Specifications/Docs/glGetFramebufferParameter.xml
Normal file
156
Source/Bind/Specifications/Docs/glGetFramebufferParameter.xml
Normal file
|
@ -0,0 +1,156 @@
|
|||
<?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="glGetFramebufferParameter">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetFramebufferParameter</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetFramebufferParameter</refname>
|
||||
<refpurpose>retrieve a named parameter from a framebuffer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetFramebufferParameteriv</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>
|
||||
The target of the operation, which must be <constant>GL_READ_FRAMEBUFFER</constant>,
|
||||
<constant>GL_DRAW_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token indicating the parameter to be retrieved.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a variable to receive the value of the parameter named <parameter>pname</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetFramebufferParameter</function> retrieves the current value of the parameter
|
||||
named <parameter>pname</parameter> from the framebuffer bound to <parameter>target</parameter>.
|
||||
<parameter>target</parameter> must be <constant>GL_READ_FRAMEBFUFFER</constant>,
|
||||
<constant>GL_DRAW_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>. The
|
||||
token <constant>GL_FRAMEBUFFER</constant> is treated as <constant>GL_DRAW_FRAMEBUFFER</constant>.
|
||||
A non-default framebuffer must be bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>pname</parameter> specifies the parameter to be retrieved. The values retrieved from
|
||||
the framebuffer are written into the variable whose address is given by <parameter>params</parameter>.
|
||||
The following symbols are accepted in <parameter>pname</parameter>:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_WIDTH</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value of <constant>GL_FRAMEBUFFER_DEFAULT_WIDTH</constant> for the framebuffer is written to the
|
||||
single integer variable whose address is given by <parameter>params</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_HEIGHT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value of <constant>GL_FRAMEBUFFER_DEFAULT_HEIGHT</constant> for the framebuffer is written to the
|
||||
single integer variable whose address is given by <parameter>params</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_LAYERS</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value of <constant>GL_FRAMEBUFFER_DEFAULT_LAYERS</constant> for the framebuffer is written to the
|
||||
single integer variable whose address is given by <parameter>params</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_SAMPLES</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value of <constant>GL_FRAMEBUFFER_DEFAULT_SAMPLES</constant> for the framebuffer is written to the
|
||||
single integer variable whose address is given by <parameter>params</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the value of <constant>GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS</constant> for the framebuffer is <constant>GL_TRUE</constant>
|
||||
then the single integer variable whose address is in <parameter>params</parameter> is set to one,
|
||||
otherwise it is set to zero.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of the accepted
|
||||
framebuffer targets.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not one of the accepted
|
||||
parameter names.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the default framebuffer is bound to <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>params</parameter> should be the address of a variable to which the client has write access otherwise
|
||||
undefined behavior, including process termination may occur.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetFramebufferParameteriv</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glFramebufferParameteri</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
453
Source/Bind/Specifications/Docs/glGetInternalformativ.xml
Normal file
453
Source/Bind/Specifications/Docs/glGetInternalformativ.xml
Normal file
|
@ -0,0 +1,453 @@
|
|||
<?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="glGetInternalformativ">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011-2013</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetInternalformativ</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetInternalformativ</refname>
|
||||
<refpurpose>retrieve information about implementation-dependent support for internal formats</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetInternalformativ</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>pname</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
|
||||
<paramdef>GLint *<parameter>params</parameter></paramdef>
|
||||
</funcprototype>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetInternalformati64v</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>pname</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
|
||||
<paramdef>GLint64 *<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>
|
||||
Indicates the usage of the internal format. <parameter>target</parameter> must be <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_1D_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_TEXTURE_3D</constant>,
|
||||
<constant>GL_TEXTURE_CUBE_MAP</constant>, <constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>, <constant>GL_TEXTURE_RECTANGLE</constant>,
|
||||
<constant>GL_TEXTURE_BUFFER</constant>,
|
||||
<constant>GL_RENDERBUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the internal format about which to retrieve information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the type of information to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bufSize</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the maximum number of basic machine units that may be written to <parameter>params</parameter> by the function.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of a variable into which to write the retrieved information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetInternalformativ</function> and <function>glGetInternalformati64v</function> retrieve information about implementation-dependent support for
|
||||
internal formats. <parameter>target</parameter> indicates the target with which the internal format will
|
||||
be used and must be one of <constant>GL_RENDERBUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>,
|
||||
or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>, corresponding to usage as a renderbuffer, two-dimensional
|
||||
multisample texture or two-dimensional multisample array texture, respectively.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>internalformat</parameter> specifies the internal format about which to retrieve information and
|
||||
must be a color-renderable, depth-renderable or stencil-renderable format.
|
||||
</para>
|
||||
<para>
|
||||
The information retrieved will be written to memory addressed by the pointer specified in <parameter>params</parameter>. No
|
||||
more than <parameter>bufSize</parameter> basic machine units will be written to this memory.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_NUM_SAMPLE_COUNTS</constant>, the number of sample counts that would be
|
||||
returned by querying <constant>GL_SAMPLES</constant> will be returned in <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_SAMPLES</constant>, the sample counts supported for <parameter>internalformat</parameter>
|
||||
and <parameter>target</parameter> are written into <parameter>params</parameter> in descending numeric order. Only positive values are returned.
|
||||
Querying <constant>GL_SAMPLES</constant> with <parameter>bufSize</parameter> of one will return just the maximum supported number of
|
||||
samples for this format. The maximum value in <constant>GL_SAMPLES</constant> is guaranteed to be at least the lowest of the following:
|
||||
<itemizedlist>
|
||||
<listitem>The value of <constant>GL_MAX_INTEGER_SAMPLES</constant> if <parameter>internalformat</parameter> is a signed or unsigned integer format.</listitem>
|
||||
<listitem>The value of <constant>GL_MAX_DEPTH_TEXTURE_SAMPLES</constant> if <parameter>internalformat</parameter> is a depth- or stencil-renderable format and
|
||||
<parameter>target</parameter> is <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>.</listitem>
|
||||
<listitem>The value of <constant>GL_MAX_COLOR_TEXTURE_SAMPLES</constant> if <parameter>internalformat</parameter> is a color-renderable format and
|
||||
<parameter>target</parameter> is <constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>.</listitem>
|
||||
<listitem>The value of <constant>GL_MAX_SAMPLES</constant>.</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_SUPPORTED</constant>, <parameter>params</parameter> is set to <constant>GL_TRUE</constant> if <parameter>internalFormat</parameter>
|
||||
is a supported internal format for <parameter>target</parameter> and to <constant>GL_FALSE</constant> otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_PREFERRED</constant>, <parameter>params</parameter> is set to <constant>GL_TRUE</constant> if <parameter>internalFormat</parameter>
|
||||
is an format for <parameter>target</parameter> that is preferred by the implementation and to <constant>GL_FALSE</constant> otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_RED_SIZE</constant>, <constant>GL_INTERNALFORMAT_GREEN_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_BLUE_SIZE</constant>, <constant>GL_INTERNALFORMAT_ALPHA_SIZE</constant>, <constant>GL_INTERNALFORMAT_DEPTH_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_STENCIL_SIZE</constant>, or <constant>GL_INTERNALFORMAT_SHARED_SIZE</constant> then
|
||||
<parameter>params</parameter> is set to the actual resolutions that would be used for storing image array components
|
||||
for the resource for the red, green, blue, alpha, depth, stencil and shared channels respectively. If <parameter>internalFormat</parameter>
|
||||
is a compressed internal format, then <parameter>params</parameter> is set to the component resolution of an uncompressed internal format that produces
|
||||
an image of roughly the same quality as the compressed algorithm. If the internal format is unsupported, or if a particular component is
|
||||
not present in the format, 0 is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_INTERNALFORMAT_RED_TYPE</constant>, <constant>GL_INTERNALFORMAT_GREEN_TYPE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_BLUE_TYPE</constant>, <constant>GL_INTERNALFORMAT_ALPHA_TYPE</constant>, <constant>GL_INTERNALFORMAT_DEPTH_TYPE</constant>,
|
||||
or <constant>GL_INTERNALFORMAT_STENCIL_TYPE</constant> then <parameter>params</parameter> is set to a token identifying the data type used
|
||||
to store the respective component. If the <parameter>internalFormat</parameter> represents a compressed internal format then
|
||||
the types returned specify how components are interpreted after decompression.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_MAX_WIDTH</constant>, <constant>GL_MAX_HEIGHT</constant>, <constant>GL_MAX_DEPTH</constant>,
|
||||
or <constant>GL_MAX_LAYERS</constant> then <parameter>pname</parameter> is filled with the maximum width, height, depth or layer count
|
||||
for textures with internal format <parameter>internalFormat</parameter>, respectively. If <parameter>pname</parameter> is <constant>GL_MAX_COMBINED_DIMENSIONS</constant>
|
||||
then <parameter>pname</parameter> is filled with the maximum combined dimensions of a texture of the specified internal format.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_COLOR_COMPONENTS</constant> then <parameter>params</parameter> is set to the value <constant>GL_TRUE</constant>
|
||||
if the internal format contains any color component (i.e., red, green, blue or alpha) and to <constant>GL_FALSE</constant> otherwise. If
|
||||
<parameter>pname</parameter> is <constant>GL_DEPTH_COMPONENTS</constant> or <constant>GL_STENCIL_COMPONENTS</constant> then <parameter>params</parameter>
|
||||
is set to <constant>GL_TRUE</constant> if the internal format contains a depth or stencil component, respectively, and to <constant>GL_FALSE</constant>
|
||||
otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_COLOR_RENDERABLE</constant>, <constant>GL_DEPTH_RENDERABLE</constant> or <constant>GL_STENCIL_RENDERABLE</constant>
|
||||
then <parameter>params</parameter> is set to <constant>GL_TRUE</constant> if the specified internal format is color, depth or stencil renderable, respectively,
|
||||
and to <constant>GL_FALSE</constant> otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_RENDERABLE</constant> or <constant>GL_FRAMEBUFFER_RENDERABLE_LAYERED</constant>
|
||||
then <parameter>params</parameter> is set to one of <constant>GL_FULL_SUPPORT</constant>,
|
||||
<constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate that framebuffer attachments (layered attachments in the
|
||||
case of <constant>GL_FRAMEBUFFER_RENDERABLE_LAYERED</constant>) with that internal format are either
|
||||
renderable with no restrictions, renderable with some restrictions or not renderable at all.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_FRAMEBUFFER_BLEND</constant>, <parameter>params</parameter> is set to <constant>GL_TRUE</constant>
|
||||
to indicate that the internal format is supported for blending operations when attached to a framebuffer, and to <constant>GL_FALSE</constant> otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_READ_PIXELS</constant> then <parameter>params</parameter> is set to <constant>GL_FULL_SUPPORT</constant>,
|
||||
<constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to that either full support, limited support or no support at all is supplied
|
||||
for reading pixels from framebuffer attachments in the specified internal format.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_READ_PIXELS_FORMAT</constant> or <constant>GL_READ_PIXELS_TYPE</constant> then <parameter>params</parameter>
|
||||
is filled with the format or type, respectively, most recommended to obtain the highest image quality and performance. For
|
||||
<constant>GL_READ_PIXELS_FORMAT</constant>, the value returned in <parameter>params</parameter> is a token that is accepted for
|
||||
the <parameter>format</parameter> argument to <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>. For
|
||||
<constant>GL_READ_PIXELS_TYPE</constant>, the value returned in <parameter>params</parameter> is a token that is accepted for
|
||||
the <parameter>type</parameter> argument to <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_TEXTURE_IMAGE_FORMAT</constant> or <constant>GL_TEXTURE_IMAGE_TYPE</constant> then
|
||||
<parameter>params</parameter> is filled with the implementation-recommended format or type to be used in calls to
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> and other similar functions. For <constant>GL_TEXTURE_IMAGE_FORMAT</constant>,
|
||||
<parameter>params</parameter> is filled with a token suitable for use as the <parameter>format</parameter> argument to
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>. For <constant>GL_TEXTURE_IMAGE_TYPE</constant>,
|
||||
<parameter>params</parameter> is filled with a token suitable for use as the <parameter>type</parameter> argument to
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_GET_TEXTURE_IMAGE_FORMAT</constant> or <constant>GL_GET_TEXTURE_IMAGE_TYPE</constant> then
|
||||
<parameter>params</parameter> is filled with the implementation-recommended format or type to be used in calls to
|
||||
<citerefentry><refentrytitle>glGetTexImage2D</refentrytitle></citerefentry> and other similar functions. For <constant>GL_GET_TEXTURE_IMAGE_FORMAT</constant>,
|
||||
<parameter>params</parameter> is filled with a token suitable for use as the <parameter>format</parameter> argument to
|
||||
<citerefentry><refentrytitle>glGetTexImage2D</refentrytitle></citerefentry>. For <constant>GL_GET_TEXTURE_IMAGE_TYPE</constant>,
|
||||
<parameter>params</parameter> is filled with a token suitable for use as the <parameter>type</parameter> argument to
|
||||
<citerefentry><refentrytitle>glGetTexImage2D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_MIPMAP</constant> then <parameter>pname</parameter> is set to <constant>GL_TRUE</constant>
|
||||
to indicate that the specified internal format supports mipmaps and to <constant>GL_FALSE</constant> otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_GENERATE_MIPMAP</constant> or <constant>GL_AUTO_GENERATE_MIPMAP</constant> then <parameter>params</parameter>
|
||||
is indicates the level of support for manual or automatic mipmap generation for the specified internal format, respectively. Returned values
|
||||
may be one of <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> and <constant>GL_NONE</constant> to indicate
|
||||
either full support, limited support or no support at all.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_COLOR_ENCODING</constant> then the color encoding for the resource is returned in
|
||||
<parameter>params</parameter>. Possible values for color buffers are <constant>GL_LINEAR</constant> or <constant>GL_SRGB</constant>,
|
||||
for linear or sRGB-encoded color components, respectively. For non-color
|
||||
formats (such as depth or stencil), or for unsupported resources,
|
||||
the value <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_SRGB_READ</constant>, or <constant>GL_SRGB_WRITE</constant> then <parameter>params</parameter>
|
||||
indicates the level of support for reading and writing to sRGB encoded images, respectively. For <constant>GL_SRGB_READ</constant>,
|
||||
support for converting from sRGB colorspace on read operations is returned in <parameter>params</parameter> and for <constant>GL_SRGB_WRITE</constant>,
|
||||
support for converting to sRGB colorspace on write operations to the resource is returned in <parameter>params</parameter>. <parameter>params</parameter> may be
|
||||
set to <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate
|
||||
full support, limited support or no support at all, respecitively.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_FILTER</constant> the <parameter>params</parameter> is set to either <constant>GL_TRUE</constant>
|
||||
or <constant>GL_FALSE</constant> to indicate support or lack thereof for filter modes other than <constant>GL_NEAREST</constant> or <constant>GL_NEAREST_MIPMAP</constant>
|
||||
for the specified internal format.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_VERTEX_TEXTURE</constant>, <constant>GL_TESS_CONTROL_TEXTURE</constant>, <constant>GL_TESS_EVALUATION_TEXTURE</constant>,
|
||||
<constant>GL_GEOMETRY_TEXTURE</constant>, <constant>GL_FRAGMENT_TEXTURE</constant>, or <constant>GL_COMPUTE_TEXTURE</constant>, then the value
|
||||
written to <parameter>params</parameter> indicates support for use of the resource as a source of texturing in the vertex, tessellation control,
|
||||
tessellation evaluation, geometry, fragment and compute shader stages, respectively. <parameter>params</parameter> may be set to
|
||||
<constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate full support,
|
||||
limited support or no support at all, respectively.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_TEXTURE_SHADOW</constant>, <constant>GL_TEXTURE_GATHER</constant> or <constant>GL_TEXTURE_GATHER_SHADOW</constant> then the value written to
|
||||
<parameter>params</parameter> indicates the level of support for using the resource with a shadow sampler, in gather operations or as a shadow sampler in gather operations, respectively. Returned values
|
||||
may be <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate full support,
|
||||
limited support or no support at all, respectively.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_SHADER_IMAGE_LOAD</constant>, <constant>GL_SHADER_IMAGE_STORE</constant> or <constant>GL_SHADER_IMAGE_ATOMIC</constant>
|
||||
then the value returned in <parameter>params</parameter> indicates the level of support for image loads, stores and atomics for resources of the specified internal
|
||||
format. Returned values
|
||||
may be <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant> or <constant>GL_NONE</constant> to indicate full support,
|
||||
limited support or no support at all, respectively.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_IMAGE_TEXEL_SIZE</constant> then the size of a texel when the resource when used as
|
||||
an image texture is returned in <parameter>params</parameter>. If the resource is not supported for image
|
||||
textures zero is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_IMAGE_COMPATIBILITY_CLASS</constant> then the compatibility class of the resource when
|
||||
used as an image texture is returned in <parameter>params</parameter>. The possible values
|
||||
returned are <constant>GL_IMAGE_CLASS_4_X_32</constant>, <constant>GL_IMAGE_CLASS_2_X_32</constant>, <constant>GL_IMAGE_CLASS_1_X_32</constant>,
|
||||
<constant>GL_IMAGE_CLASS_4_X_16</constant>, <constant>GL_IMAGE_CLASS_2_X_16</constant>, <constant>GL_IMAGE_CLASS_1_X_16</constant>,
|
||||
<constant>GL_IMAGE_CLASS_4_X_8</constant>, <constant>GL_IMAGE_CLASS_2_X_8</constant>, <constant>GL_IMAGE_CLASS_1_X_8</constant>,
|
||||
<constant>GL_IMAGE_CLASS_11_11_10</constant>, and <constant>GL_IMAGE_CLASS_10_10_10_2</constant>, which correspond to
|
||||
the 4x32, 2x32, 1x32, 4x16, 2x16, 1x16, 4x8, 2x8, 1x8, the class
|
||||
(a) 11/11/10 packed floating-point format, and the class (b)
|
||||
10/10/10/2 packed formats, respectively.
|
||||
If the resource is not supported for image textures, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_IMAGE_PIXEL_FORMAT</constant> or <constant>GL_IMAGE_PIXEL_TYPE</constant> then
|
||||
the pixel format or type of the resource when used as an image texture is returned in <parameter>params</parameter>, respectively.
|
||||
In either case, the resource is not supported for image textures <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_IMAGE_FORMAT_COMPATIBILITY_TYPE</constant>, the matching criteria use for the
|
||||
resource when used as an image textures is returned in <parameter>params</parameter>. Possible values returned in <parameter>params</parameter> are
|
||||
<constant>GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE</constant> or <constant>GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS</constant>.
|
||||
If the resource is not supported for image textures, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST</constant> or <constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST</constant>,
|
||||
support for using the resource both as a source for texture sampling while it is bound as a buffer for depth or stencil test, respectively, is written to <parameter>params</parameter>.
|
||||
Possible values returned are <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate
|
||||
full support, limited support or no support at all. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE</constant> or <constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE</constant>,
|
||||
support for using the resource both as a source for texture sampling while performing depth or stencil writes to the resources, respectively, is written to <parameter>params</parameter>.
|
||||
Possible values returned are <constant>GL_FULL_SUPPORT</constant>, <constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate
|
||||
full support, limited support or no support at all. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_TEXTURE_COMPRESSED</constant> then <constant>GL_TRUE</constant> is returned in <parameter>params</parameter>
|
||||
if <parameter>internalformat</parameter> is a compressed internal format. <constant>GL_FALSE</constant> is returned in <parameter>params</parameter>
|
||||
otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_TEXTURE_COMPRESSED_BLOCK_WIDTH</constant>, <constant>GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT</constant> or
|
||||
<constant>GL_TEXTURE_COMPRESSED_BLOCK_SIZE</constant> then the width, height or total size, respectively of a block (in basic machine units) is returned in
|
||||
<parameter>params</parameter>. If the internal format is not compressed, or the resource is not supported, 0 is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_CLEAR_BUFFER</constant>, the level of support for using the resource with <citerefentry><refentrytitle>glClearBufferData</refentrytitle></citerefentry>
|
||||
and <citerefentry><refentrytitle>glClearBufferSubData</refentrytitle></citerefentry> is returned in <parameter>params</parameter>. Possible values returned are <constant>GL_FULL_SUPPORT</constant>,
|
||||
<constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate
|
||||
full support, limited support or no support at all, respectively. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_TEXTURE_VIEW</constant>, the level of support for using the resource with the <citerefentry><refentrytitle>glTextureView</refentrytitle></citerefentry>
|
||||
command is returned in <parameter>params</parameter>. Possible values returned are <constant>GL_FULL_SUPPORT</constant>,
|
||||
<constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate
|
||||
full support, limited support or no support at all, respectively. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_VIEW_COMPATIBILITY_CLASS</constant> then the compatibility class of the resource when
|
||||
used as a texture view is returned in <parameter>params</parameter>. The possible values
|
||||
returned are <constant>GL_VIEW_CLASS_128_BITS</constant>, <constant>GL_VIEW_CLASS_96_BITS</constant>,
|
||||
<constant>GL_VIEW_CLASS_64_BITS</constant>, <constant>GL_VIEW_CLASS_48_BITS</constant>, <constant>GL_VIEW_CLASS_32_BITS</constant>,
|
||||
<constant>GL_VIEW_CLASS_24_BITS</constant>, <constant>GL_VIEW_CLASS_16_BITS</constant>, <constant>GL_VIEW_CLASS_8_BITS</constant>,
|
||||
<constant>GL_VIEW_CLASS_S3TC_DXT1_RGB</constant>, <constant>GL_VIEW_CLASS_S3TC_DXT1_RGBA</constant>,
|
||||
<constant>GL_VIEW_CLASS_S3TC_DXT3_RGBA</constant>, <constant>GL_VIEW_CLASS_S3TC_DXT5_RGBA</constant>,
|
||||
<constant>GL_VIEW_CLASS_RGTC1_RED</constant>, <constant>GL_VIEW_CLASS_RGTC2_RG</constant>, <constant>GL_VIEW_CLASS_BPTC_UNORM</constant>, and
|
||||
<constant>GL_VIEW_CLASS_BPTC_FLOAT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_CLEAR_TEXTURE</constant> then the presence of support for using the
|
||||
<citerefentry><refentrytitle>glClearTexImage</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glClearTexSubImage</refentrytitle></citerefentry>
|
||||
commands with the resource is written to <parameter>params</parameter>. Possible values written are <constant>GL_FULL_SUPPORT</constant>,
|
||||
<constant>GL_CAVEAT_SUPPORT</constant>, or <constant>GL_NONE</constant> to indicate
|
||||
full support, limited support or no support at all, respectively. If the resource or operation is not supported, <constant>GL_NONE</constant> is returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glGetInternalformativ</function> is available only if the
|
||||
GL version is 4.2 or higher.
|
||||
</para>
|
||||
<para>
|
||||
The tokens
|
||||
<constant>GL_INTERNALFORMAT_SUPPORTED</constant>,
|
||||
<constant>GL_INTERNALFORMAT_PREFERRED</constant>,
|
||||
<constant>GL_INTERNALFORMAT_RED_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_GREEN_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_BLUE_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_ALPHA_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_DEPTH_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_STENCIL_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_SHARED_SIZE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_RED_TYPE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_GREEN_TYPE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_BLUE_TYPE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_ALPHA_TYPE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_DEPTH_TYPE</constant>,
|
||||
<constant>GL_INTERNALFORMAT_STENCIL_TYPE</constant>,
|
||||
<constant>GL_MAX_WIDTH</constant>,
|
||||
<constant>GL_MAX_HEIGHT</constant>,
|
||||
<constant>GL_MAX_DEPTH</constant>,
|
||||
<constant>GL_MAX_LAYERS</constant>,
|
||||
<constant>GL_MAX_COMBINED_DIMENSIONS</constant>,
|
||||
<constant>GL_COLOR_COMPONENTS</constant>,
|
||||
<constant>GL_DEPTH_COMPONENTS</constant>,
|
||||
<constant>GL_STENCIL_COMPONENTS</constant>,
|
||||
<constant>GL_COLOR_RENDERABLE</constant>,
|
||||
<constant>GL_DEPTH_RENDERABLE</constant>,
|
||||
<constant>GL_STENCIL_RENDERABLE</constant>,
|
||||
<constant>GL_FRAMEBUFFER_RENDERABLE</constant>,
|
||||
<constant>GL_FRAMEBUFFER_RENDERABLE_LAYERED</constant>,
|
||||
<constant>GL_FRAMEBUFFER_BLEND</constant>,
|
||||
<constant>GL_READ_PIXELS</constant>,
|
||||
<constant>GL_READ_PIXELS_FORMAT</constant>,
|
||||
<constant>GL_READ_PIXELS_TYPE</constant>,
|
||||
<constant>GL_TEXTURE_IMAGE_FORMAT</constant>,
|
||||
<constant>GL_TEXTURE_IMAGE_TYPE</constant>,
|
||||
<constant>GL_GET_TEXTURE_IMAGE_FORMAT</constant>,
|
||||
<constant>GL_GET_TEXTURE_IMAGE_TYPE</constant>,
|
||||
<constant>GL_MIPMAP</constant>,
|
||||
<constant>GL_GENERATE_MIPMAP</constant>,
|
||||
<constant>GL_AUTO_GENERATE_MIPMAP</constant>,
|
||||
<constant>GL_COLOR_ENCODING</constant>,
|
||||
<constant>GL_SRGB_READ</constant>,
|
||||
<constant>GL_SRGB_WRITE</constant>,
|
||||
<constant>GL_SRGB_DECODE_ARB</constant>,
|
||||
<constant>GL_FILTER</constant>,
|
||||
<constant>GL_VERTEX_TEXTURE</constant>,
|
||||
<constant>GL_TESS_CONTROL_TEXTURE</constant>,
|
||||
<constant>GL_TESS_EVALUATION_TEXTURE</constant>,
|
||||
<constant>GL_GEOMETRY_TEXTURE</constant>,
|
||||
<constant>GL_FRAGMENT_TEXTURE</constant>,
|
||||
<constant>GL_COMPUTE_TEXTURE</constant>,
|
||||
<constant>GL_TEXTURE_SHADOW</constant>,
|
||||
<constant>GL_TEXTURE_GATHER</constant>,
|
||||
<constant>GL_TEXTURE_GATHER_SHADOW</constant>,
|
||||
<constant>GL_SHADER_IMAGE_LOAD</constant>,
|
||||
<constant>GL_SHADER_IMAGE_STORE</constant>,
|
||||
<constant>GL_SHADER_IMAGE_ATOMIC</constant>,
|
||||
<constant>GL_IMAGE_TEXEL_SIZE</constant>,
|
||||
<constant>GL_IMAGE_COMPATIBILITY_CLASS</constant>,
|
||||
<constant>GL_IMAGE_PIXEL_FORMAT</constant>,
|
||||
<constant>GL_IMAGE_PIXEL_TYPE</constant>,
|
||||
<constant>GL_IMAGE_FORMAT_COMPATIBILITY_TYPE</constant>,
|
||||
<constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST</constant>,
|
||||
<constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST</constant>,
|
||||
<constant>GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE</constant>,
|
||||
<constant>GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE</constant>,
|
||||
<constant>GL_TEXTURE_COMPRESSED</constant>,
|
||||
<constant>GL_TEXTURE_COMPRESSED_BLOCK_WIDTH</constant>,
|
||||
<constant>GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT</constant>,
|
||||
<constant>GL_TEXTURE_COMPRESSED_BLOCK_SIZE</constant>,
|
||||
<constant>GL_CLEAR_BUFFER</constant>,
|
||||
<constant>GL_TEXTURE_VIEW</constant>, and
|
||||
<constant>GL_VIEW_COMPATIBILITY_CLASS</constant> are supported only if the GL
|
||||
version is 4.3 or higher.
|
||||
</para>
|
||||
<para>
|
||||
The <constant>GL_CLEAR_TEXTURE</constant> token is accepted for <parameter>pname</parameter> only
|
||||
if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is negative.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>pname</parameter> is not <constant>GL_SAMPLES</constant> or <constant>GL_NUM_SAMPLE_COUNTS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not color-, depth-, or stencil-renderable.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not one of <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>,
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant> or <constant>GL_RENDERBUFFER</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011-2013 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>
|
135
Source/Bind/Specifications/Docs/glGetObjectLabel.xml
Normal file
135
Source/Bind/Specifications/Docs/glGetObjectLabel.xml
Normal file
|
@ -0,0 +1,135 @@
|
|||
<?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="glGetObjectLabel">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetObjectLabel</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetObjectLabel</refname>
|
||||
<refpurpose>retrieve the label of a named object identified within a namespace</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetObjectLabel</function></funcdef>
|
||||
<paramdef>GLenum <parameter>identifier</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>name</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bifSize</parameter></paramdef>
|
||||
<paramdef>GLsizei * <parameter>length</parameter></paramdef>
|
||||
<paramdef>char * <parameter>label</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>identifier</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The namespace from which the name of the object is allocated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the object whose label to retrieve.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bufSize</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the buffer whose address is in <parameter>label</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a variable to receive the length of the object label.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>label</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a string that will receive the object label.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetObjectLabel</function> retrieves the label of the object identified by
|
||||
<parameter>name</parameter> within the namespace given by <parameter>identifier</parameter>.
|
||||
<parameter>identifier</parameter> must be one of <constant>GL_BUFFER</constant>, <constant>GL_SHADER</constant>,
|
||||
<constant>GL_PROGRAM</constant>, <constant>GL_VERTEX_ARRAY</constant>, <constant>GL_QUERY</constant>,
|
||||
<constant>GL_PROGRAM_PIPELINE</constant>, <constant>GL_TRANSFORM_FEEDBACK</constant>, <constant>GL_SAMPLER</constant>,
|
||||
<constant>GL_TEXTURE</constant>, <constant>GL_RENDERBUFFER</constant>, <constant>GL_FRAMEBUFFER</constant>,
|
||||
to indicate the namespace containing the names of buffers, shaders, programs, vertex array objects, query objects,
|
||||
program pipelines, transform feedback objects, samplers, textures, renderbuffers and frame
|
||||
buffers, respectively.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>label</parameter> is the address of a string that will be used to store the object label.
|
||||
<parameter>bufSize</parameter> specifies the number of characters in the array identified by <parameter>label</parameter>.
|
||||
<parameter>length</parameter> contains the address of a variable which will receive the the number of characters in the object label.
|
||||
If <parameter>length</parameter> is NULL, then it is ignored and no data is written. Likewise, if <parameter>label</parameter>
|
||||
is NULL, or if <parameter>bufSize</parameter> is zero then no data is written to <parameter>label</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>identifier</parameter>
|
||||
is not one of the accepted object types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>name</parameter>
|
||||
is not the name of an existing object of the type specified by <parameter>identifier</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is
|
||||
zero.
|
||||
</para>
|
||||
<para>
|
||||
If not NULL, <parameter>length</parameter> and <parameter>label</parameter> should be addresses
|
||||
to which the client has write access, otherwise undefined behavior, including process termination
|
||||
may occur.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetObjectPtrLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
119
Source/Bind/Specifications/Docs/glGetObjectPtrLabel.xml
Normal file
119
Source/Bind/Specifications/Docs/glGetObjectPtrLabel.xml
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?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="glGetObjectPtrLabel">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetObjectPtrLabel</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetObjectPtrLabel</refname>
|
||||
<refpurpose>retrieve the label of a sync object identified by a pointer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetObjectPtrLabel</function></funcdef>
|
||||
<paramdef>void * <parameter>ptr</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bifSize</parameter></paramdef>
|
||||
<paramdef>GLsizei * <parameter>length</parameter></paramdef>
|
||||
<paramdef>char * <parameter>label</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ptr</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the sync object whose label to retrieve.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bufSize</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the buffer whose address is in <parameter>label</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a variable to receive the length of the object label.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>label</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a string that will receive the object label.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetObjectPtrLabel</function> retrieves the label of the sync object identified by
|
||||
<parameter>ptr</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>label</parameter> is the address of a string that will be used to store the object label.
|
||||
<parameter>bufSize</parameter> specifies the number of characters in the array identified by <parameter>label</parameter>.
|
||||
<parameter>length</parameter> contains the address of a variable which will receive the the number of characters in the object label.
|
||||
If <parameter>length</parameter> is NULL, then it is ignored and no data is written. Likewise, if <parameter>label</parameter>
|
||||
is NULL, or if <parameter>bufSize</parameter> is zero then no data is written to <parameter>label</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>identifier</parameter>
|
||||
is not one of the accepted object types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>ptr</parameter>
|
||||
is not the name of an existing sync object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is
|
||||
zero.
|
||||
</para>
|
||||
<para>
|
||||
If not NULL, <parameter>length</parameter> and <parameter>label</parameter> should be addresses
|
||||
to which the client has write access, otherwise undefined behavior, including process termination
|
||||
may occur.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetObjectLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
274
Source/Bind/Specifications/Docs/glGetProgramInterface.xml
Normal file
274
Source/Bind/Specifications/Docs/glGetProgramInterface.xml
Normal file
|
@ -0,0 +1,274 @@
|
|||
<?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="glGetProgramInterface">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetProgramInterface</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetProgramInterface</refname>
|
||||
<refpurpose>query a property of an interface in a program</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetProgramInterfaceiv</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>programInterface</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>
|
||||
The name of a program object whose interface to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>programInterface</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token identifying the interface within <parameter>program</parameter> to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>pname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the parameter within <parameter>programInterface</parameter> to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a variable to retrieve the value of <parameter>pname</parameter> for the program interface.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetProgramInterfaceiv</function> queries the property of the interface identifed
|
||||
by <parameter>programInterface</parameter> in <parameter>program</parameter>, the property name of
|
||||
which is given by <parameter>pname</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>program</parameter> must be the name of an existing program object. <parameter>programInterface</parameter>
|
||||
is the name of the interface within <parameter>program</parameter> to query and must be one of the following
|
||||
values:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active uniforms within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM_BLOCK</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active uniform blocks within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_ATOMIC_COUNTER_BUFFER</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active atomic counter buffer binding points within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PROGRAM_INPUT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active input variables used by the first shader stage of <parameter>program</parameter>.
|
||||
If <parameter>program</parameter> contains multiple shader stages then input variables from any stage other than the first
|
||||
will not be enumerated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PROGRAM_OUTPUT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active output variables produced by the last shader stage of <parameter>program</parameter>.
|
||||
If <parameter>program</parameter> contains multiple shader stages then output variables from any stage other than the last
|
||||
will not be enumerated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_TESS_CONTROL_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_TESS_EVALUATION_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_GEOMETRY_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_FRAGMENT_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_COMPUTE_SUBROUTINE</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation,
|
||||
geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation,
|
||||
geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of output variables from the last non-fragment stage of <parameter>program</parameter> that would be
|
||||
captured if transform feedback were active.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_BUFFER_VARIABLE</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active buffer variables used by <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_SHADER_STORAGE_BLOCK</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active shader storage blocks used by <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active buffer binding points to which output variables in the
|
||||
<constant>GL_TRANSFORM_FEEDBACK_VARYING</constant> interface are written.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
<parameter>pname</parameter> identifies the property of <parameter>programInterface</parameter>
|
||||
to return in <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_ACTIVE_RESOURCES</constant>, the value returned is the number of
|
||||
resources in the active resource list for <parameter>programInterface</parameter>. If the list
|
||||
of active resources for <parameter>programInterface</parameter> is empty, zero is returned.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_MAX_NAME_LENGTH</constant>, the value returned is the length of the
|
||||
longest active name string for an active resource in <parameter>programInterface</parameter>.
|
||||
This length includes an extra character for the null terminator. If the
|
||||
list of active resources for <parameter>programInterface</parameter> is empty, zero is
|
||||
returned. It is an error to specify <constant>GL_MAX_NAME_LENGTH</constant> when <parameter>programInterface</parameter>
|
||||
is <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, as active atomic counter buffer resources are
|
||||
not assigned name strings.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_MAX_NUM_ACTIVE_VARIABLES</constant>, the value returned is the number
|
||||
of active variables belonging to the interface block or atomic counter
|
||||
buffer resource in <parameter>programInterface</parameter> with the most active variables. If
|
||||
the list of active resources for <parameter>programInterface</parameter> is empty, zero is
|
||||
returned. When <parameter>pname</parameter> is <constant>GL_MAX_NUM_ACTIVE_VARIABLES</constant>, <parameter>programInterface</parameter>
|
||||
must be <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, or <constant>GL_SHADER_STORAGE_BLOCK</constant>.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>pname</parameter> is <constant>GL_MAX_NUM_COMPATIBLE_SUBROUTINES</constant>, the value returned is the
|
||||
number of compatible subroutines belonging to the active subroutine
|
||||
uniform in <parameter>programInterface</parameter> with the most compatible subroutines. If
|
||||
the list of active resources for <parameter>programInterface</parameter> is empty, zero is
|
||||
returned. When <parameter>pname</parameter> is <constant>GL_MAX_NUM_COMPATIBLE_SUBROUTINES</constant>,
|
||||
<parameter>programInterface</parameter> must be one of <constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>, <constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, or
|
||||
<constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>identifier</parameter>
|
||||
is not one of the accepted object types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter>
|
||||
is not the name of an existing sync object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>bufSize</parameter> is
|
||||
zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>pname</parameter> is <constant>GL_MAX_NAME_LENGTH</constant> and
|
||||
<parameter>programInterface</parameter> is <constant>GL_ATOMIC_COUNTER_BUFFER</constant> or <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>,
|
||||
since active atomic counter and transform feedback buffer resources are not assigned name strings.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> error is generated if <parameter>pname</parameter> is
|
||||
<constant>GL_MAX_NUM_ACTIVE_VARIABLES</constant> and <parameter>programInterface</parameter> is not <constant>GL_UNIFORM_BLOCK</constant>,
|
||||
<constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, or
|
||||
<constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
If not NULL, <parameter>length</parameter> and <parameter>label</parameter> should be addresses
|
||||
to which the client has write access, otherwise undefined behavior, including process termination
|
||||
may occur.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetObjectLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
429
Source/Bind/Specifications/Docs/glGetProgramResource.xml
Normal file
429
Source/Bind/Specifications/Docs/glGetProgramResource.xml
Normal file
|
@ -0,0 +1,429 @@
|
|||
<?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="glGetProgramResource">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetProgramResource</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetProgramResource</refname>
|
||||
<refpurpose>retrieve values for multiple properties of a single active resource within a program object</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetProgramResourceiv</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>programInterface</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>index</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>propCount</parameter></paramdef>
|
||||
<paramdef>const Glenum * <parameter>props</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
|
||||
<paramdef>GLsizei * <parameter>length</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>
|
||||
The name of a program object whose resources to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>programInterface</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token identifying the interface within <parameter>program</parameter> containing the resource named <parameter>name</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetProgramResourceiv</function> returns values for multiple properties of a single active resource with an
|
||||
index of <parameter>index</parameter> in the interface <parameter>programInterface</parameter> of program object
|
||||
<parameter>program</parameter>. For each resource, values for <parameter>propCount</parameter> properties specified
|
||||
by the array <parameter>props</parameter> are returned. <parameter>propCount</parameter> may not be zero.
|
||||
An error is generated if any value
|
||||
in <parameter>props</parameter> is not one of the properties described immediately belowor if any value in <parameter>props</parameter> is not
|
||||
allowed for <parameter>programInterface</parameter>. The set of allowed <parameter>programInterface</parameter>
|
||||
values for each property can be found in the following table:
|
||||
</para>
|
||||
<informaltable frame="topbot">
|
||||
<tgroup cols="2" align="left">
|
||||
<colspec colnum="1" colname="col1" colwidth="1*"/>
|
||||
<colspec colnum="2" colname="col2" colwidth="2*"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry morerows="1" rowsep="1" align="center">Property</entry>
|
||||
<entry morerows="1" rowsep="1" align="center">Supported Interfaces</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_NAME_LENGTH</constant></entry>
|
||||
<entry align="left">Any except <constant>GL_ATOMIC_COUNTER_BUFFER</constant> and <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TYPE</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant>, <constant>GL_TRANSFORM_FEEDBACK_VARYING</constant>, <constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_ARRAY_SIZE</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_BUFFER_VARIABLE</constant>, <constant>GL_PROGRAM_INPUT</constant>,
|
||||
<constant>GL_PROGRAM_OUTPUT, VERTEX_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>, <constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, <constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant>, <constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_OFFSET</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_BUFFER_VARIABLE</constant>, <constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_BLOCK_INDEX</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_ARRAY_STRIDE</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_MATRIX_STRIDE</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_IS_ROW_MAJOR</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_ATOMIC_COUNTER_BUFFER_INDEX</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_BUFFER</constant></entry>
|
||||
<entry align="left"><emphasis>none</emphasis></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_BUFFER_BINDING</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant></entry>, <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_BUFFER_DATA_SIZE</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_NUM_ACTIVE_VARIABLES</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant></entry>, <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_ACTIVE_VARIABLES</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant></entry>, <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_REFERENCED_BY_VERTEX_SHADER</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_SHADER</constant>,
|
||||
<constant>GL_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_BUFFER_VARIABLE</constant>,
|
||||
<constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_REFERENCED_BY_TESS_CONTROL_SHADER</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_SHADER</constant>,
|
||||
<constant>GL_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_BUFFER_VARIABLE</constant>,
|
||||
<constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_REFERENCED_BY_TESS_EVALUATION_SHADER</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_SHADER</constant>,
|
||||
<constant>GL_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_BUFFER_VARIABLE</constant>,
|
||||
<constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_REFERENCED_BY_GEOMETRY_SHADER</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_SHADER</constant>,
|
||||
<constant>GL_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_BUFFER_VARIABLE</constant>,
|
||||
<constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_REFERENCED_BY_FRAGMENT_SHADER</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_SHADER</constant>,
|
||||
<constant>GL_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_BUFFER_VARIABLE</constant>,
|
||||
<constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_REFERENCED_BY_COMPUTE_SHADER</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_UNIFORM_BLOCK</constant>, <constant>GL_ATOMIC_COUNTER_SHADER</constant>,
|
||||
<constant>GL_BUFFER</constant>, <constant>GL_SHADER_STORAGE_BLOCK</constant>, <constant>GL_BUFFER_VARIABLE</constant>,
|
||||
<constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_NUM_COMPATIBLE_SUBROUTINES</constant></entry>
|
||||
<entry align="left"><constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>, <constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, <constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_COMPATIBLE_SUBROUTINES</constant></entry>
|
||||
<entry align="left"><constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>, <constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, <constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TOP_LEVEL_ARRAY_SIZE</constant></entry>
|
||||
<entry align="left"><constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TOP_LEVEL_ARRAY_STRIDE</constant></entry>
|
||||
<entry align="left"><constant>GL_BUFFER_VARIABLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_LOCATION</constant></entry>
|
||||
<entry align="left"><constant>GL_UNIFORM</constant>, <constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant>,
|
||||
<constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>, <constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, <constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_LOCATION_INDEX</constant></entry>
|
||||
<entry align="left"><constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_IS_PER_PATCH</constant></entry>
|
||||
<entry align="left"><constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_LOCATION_COMPONENT</constant></entry>
|
||||
<entry align="left"><constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TRANSFORM_FEEDBACK_BUFFER_INDEX</constant></entry>
|
||||
<entry align="left"><constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE</constant></entry>
|
||||
<entry align="left"><constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
<para>
|
||||
For the property <constant>GL_NAME_LENGTH</constant>, a single integer identifying the length of
|
||||
the name string associated with an active variable, interface block, or
|
||||
subroutine is written to <parameter>params</parameter>. The name length includes a terminating
|
||||
null character.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_TYPE</constant>, a single integer identifying the type of an active
|
||||
variable is written to <parameter>params</parameter>. The integer returned is one of the
|
||||
values found in table 2.16.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_ARRAY_SIZE</constant>, a single integer identifying the number of
|
||||
active array elements of an active variable is written to <parameter>params</parameter>. The
|
||||
array size returned is in units of the type associated with the property
|
||||
<constant>GL_TYPE</constant>. For active variables not corresponding to an array of basic types,
|
||||
the value zero is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_BLOCK_INDEX</constant>, a single integer identifying the index of
|
||||
the active interface block containing an active variable is written to
|
||||
<parameter>params</parameter>. If the variable is not the member of an interface block, the
|
||||
value -1 is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_OFFSET</constant>, a single integer identifying the offset of an
|
||||
active variable is written to <parameter>params</parameter>. For variables in the <constant>GL_UNIFORM</constant> and
|
||||
<constant>GL_BUFFER_VARIABLE</constant> interfaces that are backed by a buffer object, the value
|
||||
written is the offset of that variable relative to the base of the buffer
|
||||
range holding its value. For variables in the <constant>GL_TRANSFORM_FEEDBACK_VARYING</constant>
|
||||
interface, the value written is the offset in the transform feedback
|
||||
buffer storage assigned to each vertex captured in transform feedback mode
|
||||
where the value of the variable will be stored. Such offsets are
|
||||
specified via the <code>xfb_offset</code> layout qualifier or assigned according to
|
||||
the variables position in the list of strings passed to
|
||||
<citerefentry><refentrytitle>glTransformFeedbackVaryings</refentrytitle></citerefentry>. Offsets are expressed in basic machine units.
|
||||
For all variables not recorded in transform feedback mode, including the
|
||||
special names <code>"gl_NextBuffer"</code>, <code>"gl_SkipComponents1"</code>, <code>"gl_SkipComponents2"</code>,
|
||||
<code>"gl_SkipComponents3"</code>, and <code>"gl_SkipComponents4"</code>, -1 is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_ARRAY_STRIDE</constant>, a single integer identifying the stride
|
||||
between array elements in an active variable is written to <parameter>params</parameter>. For
|
||||
active variables declared as an array of basic types, the value written is
|
||||
the difference, in basic machine units, between the offsets of consecutive
|
||||
elements in an array. For active variables not declared as an array of
|
||||
basic types, zero is written to <parameter>params</parameter>. For active variables not backed
|
||||
by a buffer object, -1 is written to <parameter>params</parameter>, regardless of the variable
|
||||
type.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_MATRIX_STRIDE</constant>, a single integer identifying the stride
|
||||
between columns of a column-major matrix or rows of a row-major matrix is
|
||||
written to <parameter>params</parameter>. For active variables declared a single matrix or
|
||||
array of matrices, the value written is the difference, in basic machine
|
||||
units, between the offsets of consecutive columns or rows in each matrix.
|
||||
For active variables not declared as a matrix or array of matrices, zero
|
||||
is written to <parameter>params</parameter>. For active variables not backed by a buffer
|
||||
object, -1 is written to <parameter>params</parameter>, regardless of the variable type.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_IS_ROW_MAJOR</constant>, a single integer identifying whether an
|
||||
active variable is a row-major matrix is written to <parameter>params</parameter>. For active
|
||||
variables backed by a buffer object, declared as a single matrix or array
|
||||
of matrices, and stored in row-major order, one is written to <parameter>params</parameter>.
|
||||
For all other active variables, zero is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_ATOMIC_COUNTER_BUFFER_INDEX</constant>, a single integer identifying
|
||||
the index of the active atomic counter buffer containing an active
|
||||
variable is written to <parameter>params</parameter>. If the variable is not an atomic counter
|
||||
uniform, the value -1 is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_BUFFER_BINDING</constant>, to index of the buffer binding point
|
||||
associated with the active uniform block, shader storage block, atomic
|
||||
counter buffer or transform feedback buffer is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_BUFFER_DATA_SIZE</constant>, then the implementation-dependent
|
||||
minimum total buffer object size, in basic machine units, required to hold
|
||||
all active variables associated with an active uniform block, shader
|
||||
storage block, or atomic counter buffer is written to <parameter>params</parameter>. If the
|
||||
final member of an active shader storage block is array with no declared
|
||||
size, the minimum buffer size is computed assuming the array was declared
|
||||
as an array with one element.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_NUM_ACTIVE_VARIABLES</constant>, the number of active variables
|
||||
associated with an active uniform block, shader storage block, atomic
|
||||
counter buffer or transform feedback buffer is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_ACTIVE_VARIABLES</constant>, an array of active variable indices
|
||||
associated with an active uniform block, shader storage block, atomic
|
||||
counter buffer or transform feedback buffer is written to <parameter>params</parameter>. The number of values written to
|
||||
<parameter>params</parameter> for an active resource is given by the value of the property
|
||||
<constant>GL_NUM_ACTIVE_VARIABLES</constant> for the resource.
|
||||
</para>
|
||||
<para>
|
||||
For the properties <constant>GL_REFERENCED_BY_VERTEX_SHADER</constant>,
|
||||
<constant>GL_REFERENCED_BY_TESS_CONTROL_SHADER</constant>, <constant>GL_REFERENCED_BY_TESS_EVALUATION_SHADER</constant>,
|
||||
<constant>GL_REFERENCED_BY_GEOMETRY_SHADER</constant>, <constant>GL_REFERENCED_BY_FRAGMENT_SHADER</constant>, and
|
||||
<constant>GL_REFERENCED_BY_COMPUTE_SHADER</constant>, a single integer is written to <parameter>params</parameter>,
|
||||
identifying whether the active resource is referenced by the vertex,
|
||||
tessellation control, tessellation evaluation, geometry, or fragment
|
||||
shaders, respectively, in the program object. The value one is written to
|
||||
<parameter>params</parameter> if an active variable is referenced by the corresponding shader,
|
||||
or if an active uniform block, shader storage block, or atomic counter
|
||||
buffer contains at least one variable referenced by the corresponding
|
||||
shader. Otherwise, the value zero is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_TOP_LEVEL_ARRAY_SIZE</constant>, a single integer identifying the
|
||||
number of active array elements of the top-level shader storage block
|
||||
member containing to the active variable is written to <parameter>params</parameter>. If the
|
||||
top-level block member is not declared as an array, the value one is
|
||||
written to <parameter>params</parameter>. If the top-level block member is an array with no
|
||||
declared size, the value zero is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_TOP_LEVEL_ARRAY_STRIDE</constant>, a single integer identifying the
|
||||
stride between array elements of the top-level shader storage block member
|
||||
containing the active variable is written to <parameter>params</parameter>. For top-level
|
||||
block members declared as arrays, the value written is the difference, in
|
||||
basic machine units, between the offsets of the active variable for
|
||||
consecutive elements in the top-level array. For top-level block members
|
||||
not declared as an array, zero is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_LOCATION</constant>, a single integer identifying the assigned
|
||||
location for an active uniform, input, output, or subroutine uniform
|
||||
variable is written to <parameter>params</parameter>. For input, output, or uniform variables
|
||||
with locations specified by a layout qualifier, the specified location is
|
||||
used. For vertex shader input or fragment shader output variables without
|
||||
a layout qualifier, the location assigned when a program is linked is
|
||||
written to <parameter>params</parameter>. For all other input and output variables, the value
|
||||
-1 is written to <parameter>params</parameter>. For uniforms in uniform blocks, the value -1
|
||||
is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_LOCATION_INDEX</constant>, a single integer identifying the fragment
|
||||
color index of an active fragment shader output variable is written to
|
||||
<parameter>params</parameter>. If the active variable is an output for a non-fragment shader,
|
||||
the value -1 will be written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_IS_PER_PATCH</constant>, a single integer identifying whether the
|
||||
input or output is a per-patch attribute. If the active variable is a
|
||||
per-patch attribute (declared with the <code>patch</code> qualifier), the value one
|
||||
is written to <parameter>params</parameter>; otherwise, the value zero is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_LOCATION_COMPONENT</constant>, a single integer indicating the first
|
||||
component of the location assigned to an active input or output variable
|
||||
is written to <parameter>params</parameter>. For input and output variables with a component
|
||||
specified by a <code>layout</code> qualifier, the specified component is written.
|
||||
For all other input and output variables, the value zero is written.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_TRANSFORM_FEEDBACK_BUFFER_INDEX</constant>, a single integer
|
||||
identifying the index of the active transform feedback buffer associated
|
||||
with an active variable is written to <parameter>params</parameter>. For variables
|
||||
corresponding to the special names <code>"gl_NextBuffer"</code>, <code>"gl_SkipComponents1"</code>,
|
||||
<code>"gl_SkipComponents2"</code>, <code>"gl_SkipComponents3"</code>, and <code>"gl_SkipComponents4"</code>, -1
|
||||
is written to <parameter>params</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
For the property <constant>GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE</constant>, a single integer
|
||||
identifying the stride, in basic machine units, between consecutive
|
||||
vertices written to the transform feedback buffer is written to <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 the name of an existing program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>propCount</parameter> is
|
||||
zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter>
|
||||
is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVLALID_ENUM</constant> is generated if any value in <parameter>props</parameter>
|
||||
is not one of the accepted tokens for the interface <parameter>programInterface</parameter>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetProgramResourceName</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetGetProgramResourceIndex</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocation</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocationIndex</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
215
Source/Bind/Specifications/Docs/glGetProgramResourceIndex.xml
Normal file
215
Source/Bind/Specifications/Docs/glGetProgramResourceIndex.xml
Normal file
|
@ -0,0 +1,215 @@
|
|||
<?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="glGetProgramResourceIndex">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetProgramResourceIndex</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetProgramResourceIndex</refname>
|
||||
<refpurpose>query the index of a named resource within a program</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>GLuint <function>glGetProgramResourceIndex</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>programInterface</parameter></paramdef>
|
||||
<paramdef>const char * <parameter>name</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>program</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a program object whose resources to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>programInterface</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token identifying the interface within <parameter>program</parameter> containing the resource named <parameter>name</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the resource to query the index of.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetProgramResourceIndex</function> returns the unsigned
|
||||
integer index assigned to a resource named <parameter>name</parameter> in
|
||||
the interface type <parameter>programInterface</parameter> of program object <parameter>program</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>program</parameter> must be the name of an existing program object. <parameter>programInterface</parameter>
|
||||
is the name of the interface within <parameter>program</parameter> which contains the resource named
|
||||
<parameter>name</parameter>and must be one of the following
|
||||
values:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active uniforms within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM_BLOCK</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active uniform blocks within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PROGRAM_INPUT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active input variables used by the first shader stage of <parameter>program</parameter>.
|
||||
If <parameter>program</parameter> contains multiple shader stages then input variables from any stage other than the first
|
||||
will not be enumerated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PROGRAM_OUTPUT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active output variables produced by the last shader stage of <parameter>program</parameter>.
|
||||
If <parameter>program</parameter> contains multiple shader stages then output variables from any stage other than the last
|
||||
will not be enumerated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_TESS_CONTROL_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_TESS_EVALUATION_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_GEOMETRY_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_FRAGMENT_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_COMPUTE_SUBROUTINE</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation,
|
||||
geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation,
|
||||
geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of output variables from the last non-fragment stage of <parameter>program</parameter> that would be
|
||||
captured if transform feedback were active.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active buffer binding points to which output variables in the
|
||||
<constant>GL_TRANSFORM_FEEDBACK_VARYING</constant> interface are written.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_BUFFER_VARIABLE</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active buffer variables used by <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_SHADER_STORAGE_BLOCK</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active shader storage blocks used by <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
If <parameter>name</parameter> exactly matches the name string of one of the active resources
|
||||
for <parameter>programInterface</parameter>, the index of the matched resource is returned.
|
||||
Additionally, if <parameter>name</parameter> would exactly match the name string of an active
|
||||
resource if "[0]" were appended to <parameter>name</parameter>, the index of the matched
|
||||
resource is returned. Otherwise, <parameter>name</parameter> is considered not to be the name
|
||||
of an active resource, and <constant>GL_INVALID_INDEX</constant> is returned.
|
||||
</para>
|
||||
<para>
|
||||
For the interface <constant>GL_TRANSFORM_FEEDBACK_VARYING</constant>, the value <constant>GL_INVALID_INDEX</constant>
|
||||
should be returned when querying the index assigned to the special names
|
||||
<code>gl_NextBuffer</code>, <code>gl_SkipComponents1</code>, <code>gl_SkipComponents2</code>,
|
||||
<code>gl_SkipComponents3</code>, or <code>gl_SkipComponents4</code>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter>
|
||||
is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter> is
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER</constant> or <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, since active atomic
|
||||
counter and transform feedback buffer resources are not assigned name strings.
|
||||
</para>
|
||||
<para>
|
||||
Although not an error, <constant>GL_INVALID_INDEX</constant> is returned if <parameter>name</parameter>
|
||||
is not the name of a resource within the interface identified by <parameter>programInterface</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetProgramResourceName</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetGetProgramResource</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocation</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocationIndex</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
142
Source/Bind/Specifications/Docs/glGetProgramResourceLocation.xml
Normal file
142
Source/Bind/Specifications/Docs/glGetProgramResourceLocation.xml
Normal file
|
@ -0,0 +1,142 @@
|
|||
<?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="glGetProgramResourceLocation">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetProgramResourceLocation</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetProgramResourceLocation</refname>
|
||||
<refpurpose>query the location of a named resource within a program</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>GLint <function>glGetProgramResourceLocation</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>programInterface</parameter></paramdef>
|
||||
<paramdef>const char * <parameter>name</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>program</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a program object whose resources to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>programInterface</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token identifying the interface within <parameter>program</parameter> containing the resource named <parameter>name</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the resource to query the location of.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetProgramResourceLocation</function> returns the location assigned
|
||||
to the variable named <parameter>name</parameter> in interface <parameter>programInterface</parameter> of program
|
||||
object <parameter>program</parameter>. <parameter>program</parameter> must be the name of a program that has been
|
||||
linked successfully. <parameter>programInterface</parameter> must
|
||||
be one of <constant>GL_UNIFORM</constant>, <constant>GL_PROGRAM_INPUT</constant>, <constant>GL_PROGRAM_OUTPUT</constant>,
|
||||
<constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant>, <constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant>, <constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant>,
|
||||
<constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant>, <constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant>, or <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
The value -1 will be returned if an error occurs, if <parameter>name</parameter> does not identify an active variable on
|
||||
<parameter>programInterface</parameter>, or if <parameter>name</parameter> identifies an active variable that does
|
||||
not have a valid location assigned, as described above. The locations
|
||||
returned by these commands are the same locations returned when querying
|
||||
the <constant>GL_LOCATION</constant> and <constant>GL_LOCATION_INDEX</constant> resource properties.
|
||||
</para>
|
||||
<para>
|
||||
A string provided to <function>glGetProgramResourceLocation</function> is considered to match an active variable if:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
the string exactly matches the name of the active variable
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
if the string identifies the base name of an active array, where the
|
||||
string would exactly match the name of the variable if the suffix
|
||||
"[0]" were appended to the string
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
if the string identifies an active element of the array, where the
|
||||
string ends with the concatenation of the "[" character, an integer
|
||||
<emphasis>with no "+" sign, extra leading zeroes, or whitespace</emphasis> identifying an
|
||||
array element, and the "]" character, the integer is less than the
|
||||
number of active elements of the array variable, and where the string
|
||||
would exactly match the enumerated name of the array if the decimal
|
||||
integer were replaced with zero.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Any other string is considered not to identify an active variable. If the
|
||||
string specifies an element of an array variable,
|
||||
<function>glGetProgramResourceLocation</function> returns the
|
||||
location assigned to that element. If it
|
||||
specifies the base name of an array, it identifies the resources
|
||||
associated with the first element of the array.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter>
|
||||
is not the name of an existing program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter>
|
||||
is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter>
|
||||
has not been linked successfully.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetProgramResourceName</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceIndex</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetGetProgramResource</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocationIndex</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
|
@ -0,0 +1,139 @@
|
|||
<?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="glGetProgramResourceLocationIndex">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetProgramResourceLocationIndex</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetProgramResourceLocationIndex</refname>
|
||||
<refpurpose>query the fragment color index of a named variable within a program</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>GLint <function>glGetProgramResourceLocationIndex</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>programInterface</parameter></paramdef>
|
||||
<paramdef>const char * <parameter>name</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>program</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a program object whose resources to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>programInterface</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token identifying the interface within <parameter>program</parameter> containing the resource named <parameter>name</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the resource to query the location of.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetProgramResourceLocationIndex</function> returns the fragment color index assigned
|
||||
to the variable named <parameter>name</parameter> in interface <parameter>programInterface</parameter> of program
|
||||
object <parameter>program</parameter>. <parameter>program</parameter> must be the name of a program that has been
|
||||
linked successfully. <parameter>programInterface</parameter> must
|
||||
be <constant>PROGRAM_OUTPUT</constant>.
|
||||
</para>
|
||||
<para>
|
||||
The value -1 will be returned if an error occurs, if <parameter>name</parameter> does not identify an active variable on
|
||||
<parameter>programInterface</parameter>, or if <parameter>name</parameter> identifies an active variable that does
|
||||
not have a valid location assigned, as described above. The locations
|
||||
returned by these commands are the same locations returned when querying
|
||||
the <constant>GL_LOCATION</constant> and <constant>GL_LOCATION_INDEX</constant> resource properties.
|
||||
</para>
|
||||
<para>
|
||||
A string provided to <function>glGetProgramResourceLocationIndex</function> is considered to match an active variable if:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
the string exactly matches the name of the active variable
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
if the string identifies the base name of an active array, where the
|
||||
string would exactly match the name of the variable if the suffix
|
||||
"[0]" were appended to the string
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
if the string identifies an active element of the array, where the
|
||||
string ends with the concatenation of the "[" character, an integer
|
||||
<emphasis>with no "+" sign, extra leading zeroes, or whitespace</emphasis> identifying an
|
||||
array element, and the "]" character, the integer is less than the
|
||||
number of active elements of the array variable, and where the string
|
||||
would exactly match the enumerated name of the array if the decimal
|
||||
integer were replaced with zero.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
Any other string is considered not to identify an active variable. If the
|
||||
string specifies an element of an array variable,
|
||||
<function>glGetProgramResourceLocation</function> returns the
|
||||
location assigned to that element. If it
|
||||
specifies the base name of an array, it identifies the resources
|
||||
associated with the first element of the array.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>program</parameter>
|
||||
is not the name of an existing program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter>
|
||||
is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>program</parameter>
|
||||
has not been linked successfully.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetProgramResourceName</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceIndex</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetGetProgramResource</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocationIndex</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
240
Source/Bind/Specifications/Docs/glGetProgramResourceName.xml
Normal file
240
Source/Bind/Specifications/Docs/glGetProgramResourceName.xml
Normal file
|
@ -0,0 +1,240 @@
|
|||
<?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="glGetProgramResourceName">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glGetProgramResourceName</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glGetProgramResourceName</refname>
|
||||
<refpurpose>query the name of an indexed resource within a program</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glGetProgramResourceName</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>programInterface</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>index</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>bufSize</parameter></paramdef>
|
||||
<paramdef>GLsizei * <parameter>length</parameter></paramdef>
|
||||
<paramdef>char * <parameter>name</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>program</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a program object whose resources to query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>programInterface</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A token identifying the interface within <parameter>program</parameter> containing the indexed resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index of the resource within <parameter>programInterface</parameter> of <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bufSize</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of the character array whose address is given by <parameter>name</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a variable which will receive the length of the resource name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a character array into which will be written the name of the resource.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glGetProgramResourceName</function> retrieves the name string
|
||||
assigned to the single active resource with an index of <parameter>index</parameter>
|
||||
in the interface <parameter>programInterface</parameter> of program object
|
||||
<parameter>program</parameter>. <parameter>index</parameter> must be less than
|
||||
the number of entries in the active resource list for <parameter>programInterface</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>program</parameter> must be the name of an existing program object. <parameter>programInterface</parameter>
|
||||
is the name of the interface within <parameter>program</parameter> which contains the resource and must be one of the following
|
||||
values:
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active uniforms within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM_BLOCK</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active uniform blocks within <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PROGRAM_INPUT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active input variables used by the first shader stage of <parameter>program</parameter>.
|
||||
If <parameter>program</parameter> contains multiple shader stages then input variables from any stage other than the first
|
||||
will not be enumerated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PROGRAM_OUTPUT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active output variables produced by the last shader stage of <parameter>program</parameter>.
|
||||
If <parameter>program</parameter> contains multiple shader stages then output variables from any stage other than the last
|
||||
will not be enumerated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_TESS_CONTROL_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_TESS_EVALUATION_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_GEOMETRY_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_FRAGMENT_SUBROUTINE</constant></term>,
|
||||
<term><constant>GL_COMPUTE_SUBROUTINE</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active subroutines for the vertex, tessellation control, tessellation evaluation,
|
||||
geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_TESS_CONTROL_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_TESS_EVALUATION_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_GEOMETRY_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_FRAGMENT_SUBROUTINE_UNIFORM</constant></term>,
|
||||
<term><constant>GL_COMPUTE_SUBROUTINE_UNIFORM</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active subroutine uniform variables used by the vertex, tessellation control, tessellation evaluation,
|
||||
geometry, fragment and compute shader stages of <parameter>program</parameter>, respectively.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TRANSFORM_FEEDBACK_VARYING</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of output variables from the last non-fragment stage of <parameter>program</parameter> that would be
|
||||
captured if transform feedback were active.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_BUFFER_VARIABLE</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active buffer variables used by <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_SHADER_STORAGE_BLOCK</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The query is targeted at the set of active shader storage blocks used by <parameter>program</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
The name string assigned to the active resource identified by <parameter>index</parameter> is
|
||||
returned as a null-terminated string in the character array whose address is given in <parameter>name</parameter>. The actual number of
|
||||
characters written into <parameter>name</parameter>, excluding the null terminator, is returned
|
||||
in <parameter>length</parameter>. If <parameter>length</parameter> is NULL, no length is returned. The maximum
|
||||
number of characters that may be written into <parameter>name</parameter>, including the null
|
||||
terminator, is specified by <parameter>bufSize</parameter>. If the length of the name string
|
||||
<emphasis>including the null terminator</emphasis> is greater than <parameter>bufSize</parameter>, the first
|
||||
<parameter>bufSize</parameter>-1 characters of the name string will be written to <parameter>name</parameter>,
|
||||
followed by a null terminator. If <parameter>bufSize</parameter> is zero, no error will be
|
||||
generated but no characters will be written to <parameter>name</parameter>. The length of the
|
||||
longest name string for <parameter>programInterface</parameter>>, including a null terminator,
|
||||
can be queried by calling <citerefentry><refentrytitle>glGetProgramInterface</refentrytitle></citerefentry> with a <parameter>pname</parameter> of
|
||||
<constant>GL_MAX_NAME_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter>
|
||||
is not one of the accepted interface types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>progam</parameter> is not
|
||||
the name of an existing program.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater
|
||||
than or equal to the number of entries in the active resource list for
|
||||
<parameter>programInterface</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>programInterface</parameter> is
|
||||
<constant>GL_ATOMIC_COUNTER_BUFFER</constant> or <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, since active atomic
|
||||
counter and transform feedback buffer resources are not assigned name strings.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetProgramResourceIndex</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetGetProgramResource</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocation</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetProgramResourceLocationIndex</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
78
Source/Bind/Specifications/Docs/glInvalidateBufferData.xml
Normal file
78
Source/Bind/Specifications/Docs/glInvalidateBufferData.xml
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?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="glInvalidateBufferData">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glInvalidateBufferData</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glInvalidateBufferData</refname>
|
||||
<refpurpose>invalidate the content of a buffer object's data store</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glInvalidateBufferData</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>
|
||||
The name of a buffer object whose data store to invalidate.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glInvalidateBufferData</function> invalidates all of the
|
||||
content of the data store of a buffer object. After invalidation, the content
|
||||
of the buffer's data store becomes undefined.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>buffer</parameter> is not the
|
||||
name of an existing buffer object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any part of <parameter>buffer</parameter>
|
||||
is currently mapped.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetBufferParameter</refentrytitle></citerefentry> with argument <constant>GL_BUFFER_SIZE</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glInvalidateTexSubImage</refentrytitle></citerefentry>,,
|
||||
<citerefentry><refentrytitle>glInvalidateTexImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferSubData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateFramebuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateSubFramebuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
104
Source/Bind/Specifications/Docs/glInvalidateBufferSubData.xml
Normal file
104
Source/Bind/Specifications/Docs/glInvalidateBufferSubData.xml
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?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="glInvalidateBufferSubData">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glInvalidateBufferSubData</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glInvalidateBufferSubData</refname>
|
||||
<refpurpose>invalidate a region of a buffer object's data store</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glInvalidateBufferSubData</function></funcdef>
|
||||
<paramdef>GLuint <parameter>buffer</parameter></paramdef>
|
||||
<paramdef>GLintptr <parameter>offset</parameter></paramdef>
|
||||
<paramdef>GLsizeiptr <parameter>length</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>buffer</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a buffer object, a subrange of whose data store to invalidate.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The offset within the buffer's data store of the start of the range to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the range within the buffer's data store to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glInvalidateBufferSubData</function> invalidates all or part of the
|
||||
content of the data store of a buffer object. After invalidation, the content
|
||||
of the specified range of the buffer's data store becomes undefined. The
|
||||
start of the range is given by <parameter>offset</parameter> and its size
|
||||
is given by <parameter>length</parameter>, both measured in basic machine units.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or
|
||||
<parameter>length</parameter> is negative, or if <parameter>offset</parameter> +
|
||||
<parameter>length</parameter> is greater than the value of <constant>GL_BUFFER_SIZE</constant>
|
||||
for <parameter>buffer</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>buffer</parameter> is not the
|
||||
name of an existing buffer object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if any part of <parameter>buffer</parameter>
|
||||
is currently mapped.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetBufferParameter</refentrytitle></citerefentry> with argument <constant>GL_BUFFER_SIZE</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glInvalidateTexSubImage</refentrytitle></citerefentry>,,
|
||||
<citerefentry><refentrytitle>glInvalidateTexImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateFramebuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateSubFramebuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
123
Source/Bind/Specifications/Docs/glInvalidateFramebuffer.xml
Normal file
123
Source/Bind/Specifications/Docs/glInvalidateFramebuffer.xml
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?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="glInvalidateFramebuffer">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glInvalidateFramebuffer</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glInvalidateFramebuffer</refname>
|
||||
<refpurpose>invalidate the content some or all of a framebuffer object's attachments</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glInvalidateFramebuffer</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>numAttachments</parameter></paramdef>
|
||||
<paramdef>const GLenum * <parameter>attachments</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The target to which the framebuffer is attached. <parameter>target</parameter> must be
|
||||
<constant>GL_FRAMEBUFFER</constant>, <constant>GL_DRAW_FRAMEBUFFER</constant>, or <constant>GL_READ_FRAMEBUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>numAttachments</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of entries in the <parameter>attachments</parameter> array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attachments</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array identifying the attachments to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glInvalidateFramebuffer</function> invalidates the content
|
||||
of a specified set of attachments of a framebuffer. The framebuffer
|
||||
whose content to invalidate is indicated by setting <parameter>target</parameter>
|
||||
to the target to which it is bound. <parameter>target</parameter> may be
|
||||
<constant>GL_FRAMEBUFFER</constant>, <constant>GL_READ_FRAMEBUFFER</constant> or
|
||||
<constant>GL_DRAW_FRAMEBUFFER</constant>. <constant>GL_FRAMEBUFFER</constant>
|
||||
is treated as if it were <constant>GL_DRAW_FRAMEBUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
The set of attachments whose content to invalidate are specified in an array whose address is given
|
||||
by <parameter>attachments</parameter> and which contains <parameter>numAttachments</parameter>
|
||||
elements. The elements of <parameter>attachments</parameter> must be
|
||||
<constant>GL_DEPTH_ATTACHMENT</constant>, <constant>GL_STENCIL_ATTACHMENT</constant>
|
||||
<constant>GL_DEPTH_STENCIL_ATTACHMENT</constant>, or <constant>GL_COLOR_ATTACHMENT<emphasis>i</emphasis></constant>,
|
||||
where <emphasis>i</emphasis> is between zero and the value of <constant>GL_MAX_FRAMEBUFFER_ATTACHMENTS</constant> minus one.
|
||||
Furthermore, if the default framebuffer is bound to <parameter>target</parameter>, then
|
||||
<parameter>attachments</parameter> may contain <constant>GL_FRONT_LEFT</constant>,
|
||||
<constant>GL_FRONT_RIGHT</constant>, <constant>GL_BACK_LEFT</constant>, <constant>GL_BACK_RIGHT</constant>,
|
||||
<constant>GL_AUX<emphasis>i</emphasis></constant>, <constant>GL_ACCUM</constant>,
|
||||
<constant>GL_COLOR</constant>, <constant>GL_DEPTH</constant>, or <constant>GL_STENCIL</constant>, identifying that specific buffer.
|
||||
<constant>GL_COLOR</constant>, is treated as <constant>GL_BACK_LEFT</constant> for a double-buffered context and
|
||||
<constant>GL_FRONT_LEFT</constant> for a single-buffered context.
|
||||
After <function>glInvalidateFramebuffer</function> is executed, the contents
|
||||
of the specified attachments become undefined.
|
||||
</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
|
||||
accepted framebuffer target tokens.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if any element of <parameter>attachments</parameter> is
|
||||
not one of the accepted framebuffer attachment tokens.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if element of <parameter>attachments</parameter> is
|
||||
<constant>GL_COLOR_ATTACHMENT<emphasis>i</emphasis></constant> where <emphasis>i</emphasis> is greater than or equal
|
||||
to the value of <constant>GL_MAX_COLOR_ATTACHMENTS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_COLOR_ATTACHMENTS</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glInvalidateTexSubImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateTexImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferSubData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateSubFramebuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
169
Source/Bind/Specifications/Docs/glInvalidateSubFramebuffer.xml
Normal file
169
Source/Bind/Specifications/Docs/glInvalidateSubFramebuffer.xml
Normal file
|
@ -0,0 +1,169 @@
|
|||
<?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="glInvalidateSubFramebuffer">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glInvalidateSubFramebuffer</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glInvalidateSubFramebuffer</refname>
|
||||
<refpurpose>invalidate the content of a region of some or all of a framebuffer object's attachments</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glInvalidateSubFramebuffer</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>numAttachments</parameter></paramdef>
|
||||
<paramdef>const GLenum * <parameter>attachments</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>x</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>y</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>width</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>height</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The target to which the framebuffer is attached. <parameter>target</parameter> must be
|
||||
<constant>GL_FRAMEBUFFER</constant>, <constant>GL_DRAW_FRAMEBUFFER</constant>, or <constant>GL_READ_FRAMEBUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>numAttachments</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of entries in the <parameter>attachments</parameter> array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>attachments</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of an array identifying the attachments to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The X offset of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Y offset of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The height of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glInvalidateSubFramebuffer</function> invalidates the content of a region
|
||||
of a specified set of attachments of a framebuffer. The framebuffer
|
||||
whose content to invalidate is indicated by setting <parameter>target</parameter>
|
||||
to the target to which it is bound. <parameter>target</parameter> may be
|
||||
<constant>GL_FRAMEBUFFER</constant>, <constant>GL_READ_FRAMEBUFFER</constant> or
|
||||
<constant>GL_DRAW_FRAMEBUFFER</constant>. <constant>GL_FRAMEBUFFER</constant>
|
||||
is treated as if it were <constant>GL_DRAW_FRAMEBUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
A region within a subset of the framebuffer's attachments may be invalidated.
|
||||
This set of attachments are specified in an array whose address is given
|
||||
by <parameter>attachments</parameter> and which contains <parameter>numAttachments</parameter>
|
||||
elements. The elements of <parameter>attachments</parameter> must be
|
||||
<constant>GL_DEPTH_ATTACHMENT</constant>, <constant>GL_STENCIL_ATTACHMENT</constant>
|
||||
<constant>GL_DEPTH_STENCIL_ATTACHMENT</constant>, or <constant>GL_COLOR_ATTACHMENT<emphasis>i</emphasis></constant>,
|
||||
where <emphasis>i</emphasis> is between zero and the value of <constant>GL_MAX_FRAMEBUFFER_ATTACHMENTS</constant> minus one.
|
||||
Furthermore, if the default framebuffer is bound to <parameter>target</parameter>, then
|
||||
<parameter>attachments</parameter> may contain <constant>GL_FRONT_LEFT</constant>,
|
||||
<constant>GL_FRONT_RIGHT</constant>, <constant>GL_BACK_LEFT</constant>, <constant>GL_BACK_RIGHT</constant>,
|
||||
<constant>GL_AUX<emphasis>i</emphasis></constant>, <constant>GL_ACCUM</constant>,
|
||||
<constant>GL_COLOR</constant>, <constant>GL_DEPTH</constant>, or <constant>GL_STENCIL</constant>, identifying that specific buffer.
|
||||
<constant>GL_COLOR</constant>, is treated as <constant>GL_BACK_LEFT</constant> for a double-buffered context and
|
||||
<constant>GL_FRONT_LEFT</constant> for a single-buffered context.
|
||||
</para>
|
||||
<para>
|
||||
The region of the framebuffer attachments to be invalidated is specified
|
||||
by <parameter>x</parameter>, <parameter>y</parameter>, <parameter>width</parameter> and <parameter>height</parameter>
|
||||
where <parameter>x</parameter> and <parameter>y</parameter> give the offset from the origin (with
|
||||
lower-left corner at (0, 0)) and <parameter>width</parameter> and <parameter>height</parameter>
|
||||
give the size. Any pixels lying outside of the window allocated
|
||||
to the current GL context, or outside of the attachments of the currently
|
||||
bound framebuffer object, are ignored.
|
||||
After <function>glInvalidateFramebuffer</function> is executed, the contents
|
||||
of the specified region of the specified attachments become undefined.
|
||||
</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
|
||||
accepted framebuffer target tokens.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if any element of <parameter>attachments</parameter> is
|
||||
not one of the accepted framebuffer attachment tokens.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if element of <parameter>attachments</parameter> is
|
||||
<constant>GL_COLOR_ATTACHMENT<emphasis>i</emphasis></constant> where <emphasis>i</emphasis> is greater than or equal
|
||||
to the value of <constant>GL_MAX_COLOR_ATTACHMENTS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_COLOR_ATTACHMENTS</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glInvalidateTexSubImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateTexImage</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferSubData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateFramebuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
101
Source/Bind/Specifications/Docs/glInvalidateTexImage.xml
Normal file
101
Source/Bind/Specifications/Docs/glInvalidateTexImage.xml
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?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="glInvalidateTexImage">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glInvalidateTexImage</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glInvalidateTexImage</refname>
|
||||
<refpurpose>invalidate the entirety a texture image</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glInvalidateTexImage</function></funcdef>
|
||||
<paramdef>GLuint <parameter>texture</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>level</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>texture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a texture object to invalidate.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>level</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The level of detail of the texture object to invalidate.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glInvalidateTexSubImage</function> invalidates all of
|
||||
a texture image. <parameter>texture</parameter> and <parameter>level</parameter> indicated
|
||||
which texture image is being invalidated. After this command, data in the texture image has undefined
|
||||
values.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>level</parameter> must be greater than or equal to zero and be
|
||||
less than the base 2 logarithm of the maximum texture width, height, or depth.
|
||||
</para>
|
||||
<para>
|
||||
For textures of targets <constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_TEXTURE_BUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, or
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>, level must be zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is
|
||||
less than zero or if it is greater or equal to the base 2 logarithm of the maximum texture width, height, or depth.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the target of <parameter>texture</parameter>
|
||||
is any of <constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_TEXTURE_BUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, or
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant> and <parameter>level</parameter> is not zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not the
|
||||
name of an existing texture object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_TEXTURE_SIZE</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glInvalidateTexSubImage</refentrytitle></citerefentry>,,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferSubData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateFramebuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateSubFramebuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
173
Source/Bind/Specifications/Docs/glInvalidateTexSubImage.xml
Normal file
173
Source/Bind/Specifications/Docs/glInvalidateTexSubImage.xml
Normal file
|
@ -0,0 +1,173 @@
|
|||
<?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="glInvalidateTexSubImage">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glInvalidateTexSubImage</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glInvalidateTexSubImage</refname>
|
||||
<refpurpose>invalidate a region of a texture image</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glInvalidateTexSubImage</function></funcdef>
|
||||
<paramdef>GLuint <parameter>texture</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>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>texture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of a texture object a subregion of which to invalidate.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>level</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The level of detail of the texture object within which the region resides.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>xoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The X offset of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>yoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Y offset of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>zoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The Z offset of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The height of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>depth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The depth of the region to be invalidated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glInvalidateTexSubImage</function> invalidates all or part of
|
||||
a texture image. <parameter>texture</parameter> and <parameter>level</parameter> indicated
|
||||
which texture image is being invalidated. After this command, data in that subregion have undefined
|
||||
values. <parameter>xoffset</parameter>, <parameter>yoffset</parameter>, <parameter>zoffset</parameter>, <parameter>width</parameter>, <parameter>height</parameter>, and <parameter>depth</parameter>
|
||||
are interpreted as they are in <citerefentry><refentrytitle>glTexSubImage3D</refentrytitle></citerefentry>. For texture targets that
|
||||
don't have certain dimensions, this command treats those dimensions as
|
||||
having a size of 1. For example, to invalidate a portion of a two-
|
||||
dimensional texture, the application would use <parameter>zoffset</parameter> equal to zero and
|
||||
<parameter>depth</parameter> equal to one. Cube map textures are treated as an array of six
|
||||
slices in the z-dimension, where a value of <parameter>zoffset</parameter> is interpreted as
|
||||
specifying face <constant>TEXTURE_CUBE_MAP_POSITIVE_X</constant> + <parameter>zoffset</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>level</parameter> must be greater than or equal to zero and be
|
||||
less than the base 2 logarithm of the maximum texture width, height, or depth.
|
||||
<parameter>xoffset</parameter>, <parameter>yoffset</parameter> and <parameter>zoffset</parameter>
|
||||
must be greater than or equal to zero and be less than the width, height or depth
|
||||
of the image, respectively. Furthermore, <parameter>xoffset</parameter> + <parameter>width</parameter>,
|
||||
<parameter>yoffset</parameter> + <parameter>height</parameter>, and
|
||||
<parameter>zoffset</parameter> + <parameter>depth</parameter> must be less
|
||||
than or equal to the width, height or depth of the image, respectively.
|
||||
</para>
|
||||
<para>
|
||||
For textures of targets <constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_TEXTURE_BUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, or
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant>, level must be zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>xoffset</parameter>,
|
||||
<parameter>yoffset</parameter> or <parameter>zoffset</parameter> is less than zero,
|
||||
or if any of them is greater than the size of the image in the corresponding dimension.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>level</parameter> is
|
||||
less than zero or if it is greater or equal to the base 2 logarithm of the maximum texture width, height, or depth.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the target of <parameter>texture</parameter>
|
||||
is any of <constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_TEXTURE_BUFFER</constant>, <constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, or
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant> and <parameter>level</parameter> is not zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> is not the
|
||||
name of an existing texture object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_TEXTURE_SIZE</constant>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glInvalidateTexImage</refentrytitle></citerefentry>,,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferSubData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateBufferData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateFramebuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glInvalidateSubFramebuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
323
Source/Bind/Specifications/Docs/glMemoryBarrier.xml
Normal file
323
Source/Bind/Specifications/Docs/glMemoryBarrier.xml
Normal file
|
@ -0,0 +1,323 @@
|
|||
<?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="glMemoryBarrier">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glMemoryBarrier</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glMemoryBarrier</refname>
|
||||
<refpurpose>defines a barrier ordering memory transactions</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glMemoryBarrier</function></funcdef>
|
||||
<paramdef>GLbitfield <parameter>barriers</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>barriers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the barriers to insert. Must be a bitwise combination of <constant>GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT</constant>,
|
||||
<constant>GL_ELEMENT_ARRAY_BARRIER_BIT</constant>, <constant>GL_UNIFORM_BARRIER_BIT</constant>, <constant>GL_TEXTURE_FETCH_BARRIER_BIT</constant>,
|
||||
<constant>GL_SHADER_IMAGE_ACCESS_BARRIER_BIT</constant>, <constant>GL_COMMAND_BARRIER_BIT</constant>, <constant>GL_PIXEL_BUFFER_BARRIER_BIT</constant>,
|
||||
<constant>GL_TEXTURE_UPDATE_BARRIER_BIT</constant>, <constant>GL_BUFFER_UPDATE_BARRIER_BIT</constant>,
|
||||
<constant>GL_FRAMEBUFFER_BARRIER_BIT</constant>, <constant>GL_TRANSFORM_FEEDBACK_BARRIER_BIT</constant>, <constant>GL_ATOMIC_COUNTER_BARRIER_BIT</constant>,
|
||||
or <constant>GL_SHADER_STORAGE_BARRIER_BIT</constant>.
|
||||
If the special value <constant>GL_ALL_BARRIER_BITS</constant> is specified, all supported barriers will be inserted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glMemoryBarrier</function> defines a barrier ordering the memory transactions issued prior to the
|
||||
command relative to those issued after the barrier. For the purposes of
|
||||
this ordering, memory transactions performed by shaders are considered to
|
||||
be issued by the rendering command that triggered the execution of the
|
||||
shader. <parameter>barriers</parameter> is a bitfield indicating the set of operations that
|
||||
are synchronized with shader stores; the bits used in <parameter>barriers</parameter> are as
|
||||
follows:
|
||||
</para>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><constant>GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set, vertex data sourced from
|
||||
buffer objects after the barrier will reflect data written by shaders
|
||||
prior to the barrier. The set of buffer objects affected by this bit
|
||||
is derived from the buffer object bindings used for
|
||||
generic vertex attributes derived from the <constant>GL_VERTEX_ATTRIB_ARRAY_BUFFER</constant> bindings.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_ELEMENT_ARRAY_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If set, vertex array indices sourced from
|
||||
buffer objects after the barrier will reflect data written by shaders
|
||||
prior to the barrier. The buffer objects affected by this bit are
|
||||
derived from the <constant>GL_ELEMENT_ARRAY_BUFFER</constant> binding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_UNIFORM_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Shader uniforms sourced from buffer objects after the barrier will reflect data
|
||||
written by shaders prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TEXTURE_FETCH_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Texture fetches from shaders, including
|
||||
fetches from buffer object memory via buffer textures, after the
|
||||
barrier will reflect data written by shaders prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_SHADER_IMAGE_ACCESS_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Memory accesses using shader image
|
||||
load, store, and atomic built-in functions issued after the barrier
|
||||
will reflect data written by shaders prior to the barrier.
|
||||
Additionally, image stores and atomics issued after the barrier will
|
||||
not execute until all memory accesses (e.g., loads, stores, texture
|
||||
fetches, vertex fetches) initiated prior to the barrier complete.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_COMMAND_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Command data sourced from buffer objects by
|
||||
Draw*Indirect commands after the barrier will reflect data written by
|
||||
shaders prior to the barrier. The buffer objects affected by this bit
|
||||
are derived from the <constant>GL_DRAW_INDIRECT_BUFFER</constant> binding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_PIXEL_BUFFER_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Reads and writes of buffer objects via the
|
||||
<constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant>
|
||||
bindings (via <citerefentry><refentrytitle>glReadPixels</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexSubImage</refentrytitle></citerefentry>, etc.) after the
|
||||
barrier will reflect data written by shaders prior to the barrier.
|
||||
Additionally, buffer object writes issued after the barrier will wait
|
||||
on the completion of all shader writes initiated prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TEXTURE_UPDATE_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Writes to a texture via <function>glTex(Sub)Image*</function>,
|
||||
<function>glCopyTex(Sub)Image*</function>, <function>glCompressedTex(Sub)Image*</function>, and reads via
|
||||
<citerefentry><refentrytitle>glGetTexImage</refentrytitle></citerefentry> after the barrier will reflect data written by shaders
|
||||
prior to the barrier. Additionally, texture writes from these
|
||||
commands issued after the barrier will not execute until all shader
|
||||
writes initiated prior to the barrier complete.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_BUFFER_UPDATE_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Reads or writes via <citerefentry><refentrytitle>glBufferSubData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glCopyBufferSubData</refentrytitle></citerefentry>,
|
||||
or <citerefentry><refentrytitle>glGetBufferSubData</refentrytitle></citerefentry>, or
|
||||
to buffer object memory mapped by <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>
|
||||
or <citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry> after the barrier
|
||||
will reflect data written by shaders prior to the barrier.
|
||||
Additionally, writes via these commands issued after the barrier will
|
||||
wait on the completion of any shader writes to the same memory
|
||||
initiated prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_FRAMEBUFFER_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Reads and writes via framebuffer object
|
||||
attachments after the barrier will reflect data written by shaders
|
||||
prior to the barrier. Additionally, framebuffer writes issued after
|
||||
the barrier will wait on the completion of all shader writes issued
|
||||
prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_TRANSFORM_FEEDBACK_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Writes via transform feedback
|
||||
bindings after the barrier will reflect data written by shaders prior
|
||||
to the barrier. Additionally, transform feedback writes issued after
|
||||
the barrier will wait on the completion of all shader writes issued
|
||||
prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_ATOMIC_COUNTER_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Accesses to atomic counters after the
|
||||
barrier will reflect writes prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_SHADER_STORAGE_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Accesses to shader storage blocks after the
|
||||
barrier will reflect writes prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><constant>GL_QUERY_BUFFER_BARRIER_BIT</constant></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Writes of buffer objects via the <constant>GL_QUERY_BUFFER</constant>
|
||||
binding after the barrier will reflect data written
|
||||
by shaders prior to the barrier. Additionally, buffer object writes
|
||||
issued after the barrier will wait on the completion of all shader
|
||||
writes initiated prior to the barrier.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>barriers</parameter> is <constant>GL_ALL_BARRIER_BITS</constant>, shader memory accesses
|
||||
will be synchronized relative to all the operations described above.
|
||||
</para>
|
||||
<para>
|
||||
Implementations may cache buffer object and texture image memory that
|
||||
could be written by shaders in multiple caches; for example, there may be
|
||||
separate caches for texture, vertex fetching, and one or more caches for
|
||||
shader memory accesses. Implementations are not required to keep these
|
||||
caches coherent with shader memory writes. Stores issued by one
|
||||
invocation may not be immediately observable by other pipeline stages or
|
||||
other shader invocations because the value stored may remain in a cache
|
||||
local to the processor executing the store, or because data overwritten by
|
||||
the store is still in a cache elsewhere in the system. When <function>glMemoryBarrier</function>
|
||||
is called, the GL flushes and/or invalidates any caches relevant to the
|
||||
operations specified by the <parameter>barriers</parameter> parameter to ensure consistent
|
||||
ordering of operations across the barrier.
|
||||
</para>
|
||||
<para>
|
||||
To allow for independent shader invocations to communicate by reads and
|
||||
writes to a common memory address, image variables in the OpenGL Shading
|
||||
Language may be declared as "coherent". Buffer object or texture image
|
||||
memory accessed through such variables may be cached only if caches are
|
||||
automatically updated due to stores issued by any other shader invocation.
|
||||
If the same address is accessed using both coherent and non-coherent
|
||||
variables, the accesses using variables declared as coherent will observe
|
||||
the results stored using coherent variables in other invocations. Using
|
||||
variables declared as "coherent" guarantees only that the results of
|
||||
stores will be immediately visible to shader invocations using
|
||||
similarly-declared variables; calling <function>glMemoryBarrier</function> is required to ensure
|
||||
that the stores are visible to other operations.
|
||||
</para>
|
||||
<para>
|
||||
The following guidelines may be helpful in choosing when to use coherent
|
||||
memory accesses and when to use barriers.
|
||||
</para>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para>Data that are read-only or constant may be accessed without using
|
||||
coherent variables or calling MemoryBarrier(). Updates to the
|
||||
read-only data via API calls such as BufferSubData will invalidate
|
||||
shader caches implicitly as required.</para></listitem>
|
||||
|
||||
<listitem><para>Data that are shared between shader invocations at a fine granularity
|
||||
(e.g., written by one invocation, consumed by another invocation) should
|
||||
use coherent variables to read and write the shared data.</para></listitem>
|
||||
|
||||
<listitem><para>Data written by one shader invocation and consumed by other shader
|
||||
invocations launched as a result of its execution ("dependent
|
||||
invocations") should use coherent variables in the producing shader
|
||||
invocation and call memoryBarrier() after the last write. The consuming
|
||||
shader invocation should also use coherent variables.</para></listitem>
|
||||
|
||||
<listitem><para>Data written to image variables in one rendering pass and read by the
|
||||
shader in a later pass need not use coherent variables or
|
||||
memoryBarrier(). Calling MemoryBarrier() with the
|
||||
SHADER_IMAGE_ACCESS_BARRIER_BIT set in <parameter>barriers</parameter> between passes is
|
||||
necessary.</para></listitem>
|
||||
|
||||
<listitem><para>Data written by the shader in one rendering pass and read by another
|
||||
mechanism (e.g., vertex or index buffer pulling) in a later pass need
|
||||
not use coherent variables or memoryBarrier(). Calling
|
||||
<function>glMemoryBarrier</function> with the appropriate bits set in <parameter>barriers</parameter> between
|
||||
passes is necessary.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<function>glMemoryBarrier</function> is available only if the GL version is 4.2 or higher.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_SHADER_STORAGE_BARRIER_BIT</constant> is available only if the GL version is 4.3 or higher.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_QUERY_BUFFER_BARRIER_BIT</constant> is available only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>barriers</parameter> contains any unsupported
|
||||
bits, or is not the special value <constant>GL_ALL_BARRIER_BITS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glBindImageTexture</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glFlushMappedBufferRange</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011-2013 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>
|
94
Source/Bind/Specifications/Docs/glMinSampleShading.xml
Normal file
94
Source/Bind/Specifications/Docs/glMinSampleShading.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?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="glMinSampleShading">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2010</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glMinSampleShading</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glMinSampleShading</refname>
|
||||
<refpurpose>specifies minimum rate at which sample shaing takes place</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glMinSampleShading</function></funcdef>
|
||||
<paramdef>GLfloat <parameter>value</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<!-- eqn: ignoring delim $$ -->
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the rate at which samples are shaded within each covered pixel.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glMinSampleShading</function> specifies the rate at which samples are shaded within
|
||||
a covered pixel. Sample-rate shading is enabled by calling <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>
|
||||
with the parameter <constant>GL_SAMPLE_SHADING</constant>. If <constant>GL_MULTISAMPLE</constant>
|
||||
or <constant>GL_SAMPLE_SHADING</constant> is disabled, sample shading has no effect.
|
||||
Otherwise, an implementation must provide at least as many unique color values for
|
||||
each covered fragment as specified by <parameter>value</parameter> times <parameter>samples</parameter> where
|
||||
<parameter>samples</parameter> is the value of <constant>GL_SAMPLES</constant> for the current
|
||||
framebuffer. At least 1 sample for each covered fragment is generated.
|
||||
</para>
|
||||
<para>
|
||||
A <parameter>value</parameter> of 1.0 indicates that each sample in the framebuffer should be
|
||||
indpendently shaded. A <parameter>value</parameter> of 0.0 effectively allows the GL to ignore
|
||||
sample rate shading. Any value between 0.0 and 1.0 allows the GL to shade only a subset
|
||||
of the total samples within each covered fragment. Which samples are shaded and the algorithm
|
||||
used to select that subset of the fragment's samples is implementation dependent.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
The type of the <parameter>value</parameter> parameter was
|
||||
changed from GLclampf to GLfloat. This change is transparent
|
||||
to user code and is described in detail on the
|
||||
<citerefentry><refentrytitle>removedTypes</refentrytitle></citerefentry>
|
||||
page.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
None.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MIN_SAMPLE_SHADING</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SAMPLES</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>removedTypes</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
190
Source/Bind/Specifications/Docs/glMultiDrawArraysIndirect.xml
Normal file
190
Source/Bind/Specifications/Docs/glMultiDrawArraysIndirect.xml
Normal file
|
@ -0,0 +1,190 @@
|
|||
<?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="glMultiDrawArraysIndirect">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glMultiDrawArraysIndirect</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glMultiDrawArraysIndirect</refname>
|
||||
<refpurpose>render multiple sets of primitives from array data, taking parameters from memory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glMultiDrawArraysIndirect</function></funcdef>
|
||||
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
||||
<paramdef>const void *<parameter>indirect</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>drawcount</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>stride</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_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_LINES_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP</constant>,
|
||||
<constant>GL_TRIANGLE_FAN</constant>,
|
||||
<constant>GL_TRIANGLES</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>, and
|
||||
<constant>GL_PATCHES</constant>
|
||||
are accepted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>indirect</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of an array of structures containing the draw parameters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>drawcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the the number of elements in the array of draw parameter structures.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>stride</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the distance in basic machine units between elements of the draw parameter array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glMultiDrawArraysIndirect</function> specifies multiple geometric primitives
|
||||
with very few subroutine calls. <function>glMultiDrawArraysIndirect</function> behaves
|
||||
similarly to a multitude of calls to <citerefentry><refentrytitle>glDrawArraysInstancedBaseInstance</refentrytitle></citerefentry>,
|
||||
execept that the parameters to each call to <citerefentry><refentrytitle>glDrawArraysInstancedBaseInstance</refentrytitle></citerefentry>
|
||||
are stored in an array in memory at the address given by <parameter>indirect</parameter>, separated
|
||||
by the stride, in basic machine units, specified by <parameter>stride</parameter>. If <parameter>stride</parameter>
|
||||
is zero, then the array is assumed to be tightly packed in memory.
|
||||
</para>
|
||||
<para>
|
||||
The parameters addressed by <parameter>indirect</parameter> are packed into an array of structures,
|
||||
each element of which takes the form (in C):
|
||||
<programlisting><![CDATA[ typedef struct {
|
||||
uint count;
|
||||
uint instanceCount;
|
||||
uint first;
|
||||
uint baseInstance;
|
||||
} DrawArraysIndirectCommand;]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
A single call to <function>glMultiDrawArraysIndirect</function> is equivalent, assuming no errors
|
||||
are generated to:
|
||||
<programlisting><![CDATA[ GLsizei n;
|
||||
for (n = 0; n < drawcount; n++)
|
||||
{
|
||||
const DrawArraysIndirectCommand *cmd;
|
||||
if (stride != 0)
|
||||
{
|
||||
cmd = (const DrawArraysIndirectCommand *)((uintptr)indirect + n * stride);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd = (const DrawArraysIndirectCommand *)indirect + n;
|
||||
}
|
||||
|
||||
glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->instanceCount, cmd->baseInstance);
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
If a buffer is bound to the <constant>GL_DRAW_INDIRECT_BUFFER</constant> binding at the time
|
||||
of a call to <function>glMultiDrawArraysIndirect</function>, <parameter>indirect</parameter>
|
||||
is interpreted as an offset, in basic machine units, into that buffer and the parameter
|
||||
data is read from the buffer rather than from client memory.
|
||||
</para>
|
||||
<para>
|
||||
In contrast to <citerefentry><refentrytitle>glDrawArraysInstancedBaseInstance</refentrytitle></citerefentry>,
|
||||
the <code>first</code> member of the parameter structure is unsigned, and out-of-range indices
|
||||
do not generate an error.
|
||||
</para>
|
||||
<para>
|
||||
Vertex attributes that are modified by <function>glMultiDrawArraysIndirect</function> have an
|
||||
unspecified value after <function>glMultiDrawArraysIndirect</function> returns. Attributes that aren't
|
||||
modified remain well defined.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
The <parameter>baseInstance</parameter> member of the <parameter>DrawArraysIndirectCommand</parameter>
|
||||
structure is defined only if the GL version is 4.2 or greater. For versions of the GL less than 4.2,
|
||||
this parameter is present but is reserved and should be set to zero. On earlier versions of the GL,
|
||||
behavior is undefined if it is non-zero.
|
||||
</para>
|
||||
<para>
|
||||
<function>glMultiDrawArraysIndirect</function> is available only if the GL version is 4.3 or greater.
|
||||
</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>stride</parameter> is not a multiple
|
||||
of four.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>drawcount</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 to the <constant>GL_DRAW_INDIRECT_BUFFER</constant> binding and the buffer object's data store is currently mapped.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> is <constant>GL_PATCHES</constant>
|
||||
and no tessellation control shader is active.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysIndirect</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glMultiDrawElementsIndirect</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012-2013 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>
|
211
Source/Bind/Specifications/Docs/glMultiDrawElementsIndirect.xml
Normal file
211
Source/Bind/Specifications/Docs/glMultiDrawElementsIndirect.xml
Normal file
|
@ -0,0 +1,211 @@
|
|||
<?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="glMultiDrawElementsIndirect">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group.</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glMultiDrawElementsIndirect</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glMultiDrawElementsIndirect</refname>
|
||||
<refpurpose>render indexed primitives from array data, taking parameters from memory</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glMultiDrawElementsIndirect</function></funcdef>
|
||||
<paramdef>GLenum <parameter>mode</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>const void *<parameter>indirect</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>drawcount</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>stride</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_LINE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_LINES_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP</constant>,
|
||||
<constant>GL_TRIANGLE_FAN</constant>,
|
||||
<constant>GL_TRIANGLES</constant>,
|
||||
<constant>GL_TRIANGLE_STRIP_ADJACENCY</constant>,
|
||||
<constant>GL_TRIANGLES_ADJACENCY</constant>, and
|
||||
<constant>GL_PATCHES</constant>
|
||||
are accepted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the type of data in the buffer bound to the <constant>GL_ELEMENT_ARRAY_BUFFER</constant> binding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>indirect</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the address of a structure containing an array of draw parameters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>drawcount</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of elements in the array addressed by <parameter>indirect</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>stride</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the distance in basic machine units between elements of the draw parameter array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glMultiDrawElementsIndirect</function> specifies multiple indexed geometric primitives
|
||||
with very few subroutine calls. <function>glMultiDrawElementsIndirect</function> behaves
|
||||
similarly to a multitude of calls to <citerefentry><refentrytitle>glDrawElementsInstancedBaseVertexBaseInstance</refentrytitle></citerefentry>,
|
||||
execpt that the parameters to <citerefentry><refentrytitle>glDrawElementsInstancedBaseVertexBaseInstance</refentrytitle></citerefentry>
|
||||
are stored in an array in memory at the address given by <parameter>indirect</parameter>, separated
|
||||
by the stride, in basic machine units, specified by <parameter>stride</parameter>. If <parameter>stride</parameter>
|
||||
is zero, then the array is assumed to be tightly packed in memory.
|
||||
</para>
|
||||
<para>
|
||||
The parameters addressed by <parameter>indirect</parameter> are packed into a structure
|
||||
that takes the form (in C):
|
||||
<programlisting><![CDATA[ typedef struct {
|
||||
uint count;
|
||||
uint instanceCount;
|
||||
uint firstIndex;
|
||||
uint baseVertex;
|
||||
uint baseInstance;
|
||||
} DrawElementsIndirectCommand;]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
A single call to <function>glMultiDrawElementsIndirect</function> is equivalent, assuming no errors
|
||||
are generated to:
|
||||
<programlisting><![CDATA[ GLsizei n;
|
||||
for (n = 0; n < drawcount; n++)
|
||||
{
|
||||
const DrawElementsIndirectCommand *cmd;
|
||||
if (stride != 0)
|
||||
{
|
||||
cmd = (const DrawElementsIndirectCommand *)((uintptr)indirect + n * stride);
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd = (const DrawElementsIndirectCommand *)indirect + n;
|
||||
}
|
||||
|
||||
glDrawElementsInstancedBaseVertexBaseInstance(mode,
|
||||
cmd->count,
|
||||
type,
|
||||
cmd->firstIndex + size-of-type,
|
||||
cmd->instanceCount,
|
||||
cmd->baseVertex,
|
||||
cmd->baseInstance);
|
||||
}]]></programlisting>
|
||||
</para>
|
||||
<para>
|
||||
If a buffer is bound to the <constant>GL_DRAW_INDIRECT_BUFFER</constant> binding at the time
|
||||
of a call to <function>glDrawElementsIndirect</function>, <parameter>indirect</parameter>
|
||||
is interpreted as an offset, in basic machine units, into that buffer and the parameter
|
||||
data is read from the buffer rather than from client memory.
|
||||
</para>
|
||||
<para>
|
||||
Note that indices stored in client memory are not supported. If no buffer is bound to the
|
||||
<constant>GL_ELEMENT_ARRAY_BUFFER</constant> binding, an error will be generated.
|
||||
</para>
|
||||
<para>
|
||||
The results of the operation are undefined if the <code>reservedMustBeZero</code> member
|
||||
of the parameter structure is non-zero. However, no error is generated in this case.
|
||||
</para>
|
||||
<para>
|
||||
Vertex attributes that are modified by <function>glDrawElementsIndirect</function> have an
|
||||
unspecified value after <function>glDrawElementsIndirect</function> returns. Attributes that aren't
|
||||
modified remain well defined.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
The <parameter>baseInstance</parameter> member of the <parameter>DrawElementsIndirectCommand</parameter>
|
||||
structure is defined only if the GL version is 4.2 or greater. For versions of the GL less than 4.2,
|
||||
this parameter is present but is reserved and should be set to zero. On earlier versions of the GL,
|
||||
behavior is undefined if it is non-zero.
|
||||
</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>stride</parameter> is not a multiple
|
||||
of four.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>drawcount</parameter> is negative.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no buffer is bound to the <constant>GL_ELEMENT_ARRAY_BUFFER</constant>
|
||||
binding, or if such a buffer'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 an
|
||||
enabled array or to the <constant>GL_DRAW_INDIRECT_BUFFER</constant> binding and the buffer object's data store is currently mapped.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if a geometry shader is active and <parameter>mode</parameter>
|
||||
is incompatible with the input primitive type of the geometry shader in the currently installed program object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>mode</parameter> is <constant>GL_PATCHES</constant>
|
||||
and no tessellation control shader is active.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glDrawArrays</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysInstanced</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawArraysIndirect</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawRangeElements</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glDrawElementsIndirect</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glMultiDrawArraysIndirect</refentrytitle></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2010-2013 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>
|
121
Source/Bind/Specifications/Docs/glObjectLabel.xml
Normal file
121
Source/Bind/Specifications/Docs/glObjectLabel.xml
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?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="glObjectLabel">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glObjectLabel</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glObjectLabel</refname>
|
||||
<refpurpose>label a named object identified within a namespace</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glObjectLabel</function></funcdef>
|
||||
<paramdef>GLenum <parameter>identifier</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>name</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>length</parameter></paramdef>
|
||||
<paramdef>const char * <parameter>label</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>identifier</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The namespace from which the name of the object is allocated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the object to label.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the label to be used for the object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>label</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a string containing the label to assign to the object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glObjectLabel</function> labels the object identified by
|
||||
<parameter>name</parameter> within the namespace given by <parameter>identifier</parameter>.
|
||||
<parameter>identifier</parameter> must be one of <constant>GL_BUFFER</constant>, <constant>GL_SHADER</constant>,
|
||||
<constant>GL_PROGRAM</constant>, <constant>GL_VERTEX_ARRAY</constant>, <constant>GL_QUERY</constant>,
|
||||
<constant>GL_PROGRAM_PIPELINE</constant>, <constant>GL_TRANSFORM_FEEDBACK</constant>, <constant>GL_SAMPLER</constant>,
|
||||
<constant>GL_TEXTURE</constant>, <constant>GL_RENDERBUFFER</constant>, <constant>GL_FRAMEBUFFER</constant>,
|
||||
to indicate the namespace containing the names of buffers, shaders, programs, vertex array objects, query objects,
|
||||
program pipelines, transform feedback objects, samplers, textures, renderbuffers and frame
|
||||
buffers, respectively.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>label</parameter> is the address of a string that will be used to label an object.
|
||||
<parameter>length</parameter> contains the number of characters in <parameter>label</parameter>.
|
||||
If <parameter>length</parameter> is negative, it is implied that
|
||||
<parameter>label</parameter> contains a null-terminated string. If <parameter>label</parameter>
|
||||
is NULL, any debug label is effectively removed from the object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>identifier</parameter>
|
||||
is not one of the accepted object types.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>name</parameter>
|
||||
is not the name of an existing object of the type specified by <parameter>identifier</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the number of characters in
|
||||
<parameter>label</parameter>, excluding the null terminator when <parameter>length</parameter>
|
||||
is negative, is greater than the value of <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectPtrLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
101
Source/Bind/Specifications/Docs/glObjectPtrLabel.xml
Normal file
101
Source/Bind/Specifications/Docs/glObjectPtrLabel.xml
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?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="glObjectPtrLabel">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glObjectPtrLabel</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glObjectPtrLabel</refname>
|
||||
<refpurpose>label a a sync object identified by a pointer</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glObjectPtrLabel</function></funcdef>
|
||||
<paramdef>void * <parameter>ptr</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>length</parameter></paramdef>
|
||||
<paramdef>const char * <parameter>label</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>ptr</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
A pointer identifying a sync object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the label to be used for the object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>label</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The address of a string containing the label to assign to the object.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glObjectPtrLabel</function> labels the sync object identified by
|
||||
<parameter>ptr</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>label</parameter> is the address of a string that will be used to label the object.
|
||||
<parameter>length</parameter> contains the number of characters in <parameter>label</parameter>.
|
||||
If <parameter>length</parameter> is negative, it is implied that
|
||||
<parameter>label</parameter> contains a null-terminated string. If <parameter>label</parameter>
|
||||
is NULL, any debug label is effectively removed from the object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>ptr</parameter> is not
|
||||
a valid sync object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if the number of characters in
|
||||
<parameter>label</parameter>, excluding the null terminator when <parameter>length</parameter>
|
||||
is negative, is greater than the value of <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_LABEL_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
67
Source/Bind/Specifications/Docs/glPopDebugGroup.xml
Normal file
67
Source/Bind/Specifications/Docs/glPopDebugGroup.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?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="glPopDebugGroup">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glPopDebugGroup</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glPopDebugGroup</refname>
|
||||
<refpurpose>pop the active debug group</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glPopDebugGroup</function></funcdef>
|
||||
<paramdef>void</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glPopDebugGroup</function> pops the active debug group.
|
||||
After popping a debug group, the GL will also generate a debug
|
||||
output message describing its cause based on the <parameter>message</parameter>
|
||||
string, the source <parameter>source</parameter>, and an ID <parameter>id</parameter>
|
||||
submitted to the corresponding <citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>
|
||||
command. <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant> and <constant>GL_DEBUG_TYPE_POP_GROUP</constant>
|
||||
share a single namespace for message <parameter>id</parameter>.
|
||||
<parameter>severity</parameter> has the value <constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant>. The <parameter>type</parameter>
|
||||
has the value <constant>GL_DEBUG_TYPE_POP_GROUP</constant>. Popping a debug group restores
|
||||
the debug output volume control of the parent debug group.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_STACK_UNDERFLOW</constant> is generated if an attempt is made to pop the default debug
|
||||
group from the stack.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_DEBUG_MESSAGE_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPushDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectPtrLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
115
Source/Bind/Specifications/Docs/glPushDebugGroup.xml
Normal file
115
Source/Bind/Specifications/Docs/glPushDebugGroup.xml
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?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="glPushDebugGroup">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glPushDebugGroup</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glPushDebugGroup</refname>
|
||||
<refpurpose>push a named debug group into the command stream</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glPushDebugGroup</function></funcdef>
|
||||
<paramdef>GLenum <parameter>source</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>id</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>length</parameter></paramdef>
|
||||
<paramdef>const char * <parameter>message</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>source</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The source of the debug message.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>id</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The identifier of the message.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the message to be sent to the debug output stream.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>message</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The a string containing the message to be sent to the debug output stream.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glPushDebugGroup</function> pushes a debug group described by the string
|
||||
<parameter>message</parameter> into the command stream. The value of
|
||||
<parameter>id</parameter> specifies the ID of messages generated. The parameter
|
||||
<parameter>length</parameter> contains the number of characters in <parameter>message</parameter>.
|
||||
If <parameter>length</parameter> is negative, it is implied that <parameter>message</parameter>
|
||||
contains a null terminated string. The message has the specified <parameter>source</parameter>
|
||||
and <parameter>id</parameter>, the <parameter>type</parameter> <constant>GL_DEBUG_TYPE_PUSH_GROUP</constant>, and <parameter>severity</parameter>
|
||||
<constant>GL_DEBUG_SEVERITY_NOTIFICATION</constant>. The GL will put a new debug group
|
||||
on top of the debug group stack which inherits the control of the
|
||||
volume of debug output of the debug group previously residing on the
|
||||
top of the debug group stack. Because debug groups are strictly
|
||||
hierarchical, any additional control of the debug output volume will
|
||||
only apply within the active debug group and the debug groups pushed
|
||||
on top of the active debug group.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if the value of <parameter>source</parameter> is
|
||||
neither <constant>GL_DEBUG_SOURCE_APPLICATION</constant> nor <constant>GL_DEBUG_SOURCE_THIRD_PARTY</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>length</parameter> is negative
|
||||
and the number of characters in <parameter>message</parameter>, excluding the null-terminator,
|
||||
is not less than the value of <constant>GL_MAX_DEBUG_MESSAGE_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_DEBUG_MESSAGE_LENGTH</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glPopDebugGroup</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectLabel</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glObjectPtrLabel</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
|
@ -0,0 +1,99 @@
|
|||
<?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="glShaderStorageBlockBinding">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glShaderStorageBlockBinding</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glShaderStorageBlockBinding</refname>
|
||||
<refpurpose>change an active shader storage block binding</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glShaderStorageBlockBinding</function></funcdef>
|
||||
<paramdef>GLuint <parameter>program</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>storageBlockIndex</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>storageBlockBinding</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>program</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the program containing the block whose binding to change.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>storageBlockIndex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index storage block within the program.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>storageBlockBinding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index storage block binding to associate with the specified storage block.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glShaderStorageBlockBinding</function>, changes the active
|
||||
shader storage block with an assigned index of <parameter>storageBlockIndex</parameter>
|
||||
in program object <parameter>program</parameter>. <parameter>storageBlockIndex</parameter> must be an active shader storage block
|
||||
index in <parameter>program</parameter>. <parameter>storageBlockBinding</parameter> must be less than the value of <constant>GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS</constant>.
|
||||
If successful, <function>glShaderStorageBinding</function> specifies that <parameter>program</parameter> will use the data store of
|
||||
the buffer object bound to the binding point <parameter>storageBlockBinding</parameter> to read
|
||||
and write the values of the buffer variables in the shader storage block identified by <parameter>storageBlockIndex</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>attribindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIBS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>bindingindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no vertex array object is bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments <constant>GL_SHADER_STORAGE_BUFFER_BINDING</constant>,
|
||||
<constant>GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS</constant>, <constant>GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS</constant>,
|
||||
<constant>GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS</constant>, <constant>GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS</constant>,
|
||||
<constant>GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS</constant>, <constant>GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS</constant>,
|
||||
<constant>GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS</constant> or <constant>GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS</constant>,
|
||||
<constant>GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS</constant>, or <constant>GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
496
Source/Bind/Specifications/Docs/glTexBufferRange.xml
Normal file
496
Source/Bind/Specifications/Docs/glTexBufferRange.xml
Normal file
|
@ -0,0 +1,496 @@
|
|||
<?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="glTexBufferRange">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTexBufferRange</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTexBufferRange</refname>
|
||||
<refpurpose>bind a range of a buffer's data store to a buffer texture</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTexBufferRange</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalFormat</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>buffer</parameter></paramdef>
|
||||
<paramdef>GLintptr <parameter>offset</parameter></paramdef>
|
||||
<paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the target of the operation and must be <constant>GL_TEXTURE_BUFFER</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalFormat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the internal format of the data in the store belonging to <parameter>buffer</parameter>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>buffer</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the name of the buffer object whose storage to attach to the active buffer texture.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>offset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the offset of the start of the range of the buffer's data store to attach.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the size of the range of the buffer's data store to attach.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTexBufferRange</function> attaches the a range of the data store of the buffer object named <parameter>buffer</parameter> to the active
|
||||
buffer texture, and specifies the internal format for the texel array found in the attached buffer object. If <parameter>buffer</parameter>
|
||||
is zero, any buffer object attached to the buffer texture is detached and no new buffer object is attached. If <parameter>buffer</parameter>
|
||||
is non-zero, it must be the name of an existing buffer object. <parameter>target</parameter> must be <constant>GL_TEXTURE_BUFFER</constant>.
|
||||
The start of the range is specified by <parameter>offset</parameter> and the size of the range is specified by <parameter>size</parameter>,
|
||||
both measured in basic machine units. <parameter>offset</parameter> must be greater than or equal to zero, <parameter>size</parameter> must be greater
|
||||
than zero, and the sum of <parameter>offset</parameter> and <parameter>size</parameter> not exceed the value
|
||||
of <constant>GL_BUFFER_SIZE</constant> for <parameter>buffer</parameter>. Furthermore, <parameter>offset</parameter> must be
|
||||
an integer multiple of the value of <constant>GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT</constant>.
|
||||
<parameter>internalformat</parameter> specifies the storage format, and must be one of the following sized internal formats:
|
||||
</para>
|
||||
<informaltable frame="topbot">
|
||||
<tgroup cols="8" align="left">
|
||||
<colspec colnum="1" colname="col1" colwidth="1*"/>
|
||||
<colspec colnum="2" colname="col2" colwidth="2*"/>
|
||||
<colspec colnum="3" colname="col3" colwidth="1.5*"/>
|
||||
<colspec colnum="4" colname="col4" colwidth="1*"/>
|
||||
<colspec colnum="5" colname="col5" colwidth="1*"/>
|
||||
<colspec colnum="6" colname="col6" colwidth="2*"/>
|
||||
<colspec colnum="7" colname="col7" colwidth="1.5*"/>
|
||||
<colspec colnum="8" colname="col8" colwidth="1*"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry morerows="1" rowsep="1" align="center"></entry>
|
||||
<entry morerows="1" rowsep="1" align="center"></entry>
|
||||
<entry morerows="1" rowsep="1" align="center"></entry>
|
||||
<entry morerows="1" rowsep="1" align="center"></entry>
|
||||
<entry namest="col5" nameend="col8" rowsep="1" align="left"><emphasis role="bold">
|
||||
Component
|
||||
</emphasis></entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry align="left"><emphasis role="bold">Sized Internal Format</emphasis></entry>
|
||||
<entry align="left"><emphasis role="bold">Base Type</emphasis></entry>
|
||||
<entry align="left"><emphasis role="bold">Components</emphasis></entry>
|
||||
<entry align="left"><emphasis role="bold">Norm</emphasis></entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
<entry align="center">2</entry>
|
||||
<entry align="center">3</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R8</constant></entry>
|
||||
<entry align="left">ubyte</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">YES</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R16</constant></entry>
|
||||
<entry align="left">ushort</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">YES</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R16F</constant></entry>
|
||||
<entry align="left">half</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R32F</constant></entry>
|
||||
<entry align="left">float</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R8I</constant></entry>
|
||||
<entry align="left">byte</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R16I</constant></entry>
|
||||
<entry align="left">short</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R32I</constant></entry>
|
||||
<entry align="left">int</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R8UI</constant></entry>
|
||||
<entry align="left">ubyte</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R16UI</constant></entry>
|
||||
<entry align="left">ushort</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_R32UI</constant></entry>
|
||||
<entry align="left">uint</entry>
|
||||
<entry align="left">1</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG8</constant></entry>
|
||||
<entry align="left">ubyte</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">YES</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG16</constant></entry>
|
||||
<entry align="left">ushort</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">YES</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG16F</constant></entry>
|
||||
<entry align="left">half</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG32F</constant></entry>
|
||||
<entry align="left">float</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG8I</constant></entry>
|
||||
<entry align="left">byte</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG16I</constant></entry>
|
||||
<entry align="left">short</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG32I</constant></entry>
|
||||
<entry align="left">int</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG8UI</constant></entry>
|
||||
<entry align="left">ubyte</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG16UI</constant></entry>
|
||||
<entry align="left">ushort</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RG32UI</constant></entry>
|
||||
<entry align="left">uint</entry>
|
||||
<entry align="left">2</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">0</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGB32F</constant></entry>
|
||||
<entry align="left">float</entry>
|
||||
<entry align="left">3</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGB32I</constant></entry>
|
||||
<entry align="left">int</entry>
|
||||
<entry align="left">3</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGB32UI</constant></entry>
|
||||
<entry align="left">uint</entry>
|
||||
<entry align="left">3</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA8</constant></entry>
|
||||
<entry align="left">uint</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">YES</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA16</constant></entry>
|
||||
<entry align="left">short</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">YES</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA16F</constant></entry>
|
||||
<entry align="left">half</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA32F</constant></entry>
|
||||
<entry align="left">float</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA8I</constant></entry>
|
||||
<entry align="left">byte</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA16I</constant></entry>
|
||||
<entry align="left">short</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA32I</constant></entry>
|
||||
<entry align="left">int</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA8UI</constant></entry>
|
||||
<entry align="left">ubyte</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA16UI</constant></entry>
|
||||
<entry align="left">ushort</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGBA32UI</constant></entry>
|
||||
<entry align="left">uint</entry>
|
||||
<entry align="left">4</entry>
|
||||
<entry align="left">NO</entry>
|
||||
<entry align="center">R</entry>
|
||||
<entry align="center">G</entry>
|
||||
<entry align="center">B</entry>
|
||||
<entry align="center">A</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
<constant>GL_TEXTURE_BUFFER</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> is less than zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>size</parameter> is less than or equal to zero.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> + <parameter>size</parameter> is
|
||||
greater than the value of <constant>GL_BUFFER_SIZE</constant> for <parameter>buffer</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> is not
|
||||
an integer multiple of the value of <constant>GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT</constant>
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetTexLevelParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_BUFFER_OFFSET</constant>
|
||||
or <constant>GL_TEXTURE_BUFFER_SIZE</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexBuffer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
164
Source/Bind/Specifications/Docs/glTexStorage1D.xml
Normal file
164
Source/Bind/Specifications/Docs/glTexStorage1D.xml
Normal file
|
@ -0,0 +1,164 @@
|
|||
<?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="glTexStorage1D">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTexStorage1D</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTexStorage1D</refname>
|
||||
<refpurpose>simultaneously specify storage for all levels of a one-dimensional texture</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTexStorage1D</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>levels</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>width</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
either <constant>GL_TEXTURE_1D</constant> or <constant>GL_PROXY_TEXTURE_1D</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>levels</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of texture levels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the sized internal format to be used to store texture image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the width of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTexStorage1D</function> specifies the storage requirements for all levels
|
||||
of a one-dimensional texture simultaneously. Once a texture is specified with this
|
||||
command, the format and dimensions of all levels become immutable unless it is a proxy
|
||||
texture. The contents of the image may still be modified, however, its storage requirements
|
||||
may not change. Such a texture is referred to as an <emphasis>immutable-format</emphasis>
|
||||
texture.
|
||||
</para>
|
||||
<para>
|
||||
Calling <function>glTexStorage1D</function> is equivalent, assuming no errors are generated,
|
||||
to executing the following pseudo-code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < levels; i++)
|
||||
{
|
||||
glTexImage1D(target, i, internalformat, width, 0, format, type, NULL);
|
||||
width = max(1, (width / 2));
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Since no texture data is actually provided, the values used in the pseudo-code
|
||||
for <parameter>format</parameter> and <parameter>type</parameter> are
|
||||
irrelevant and may be considered to be any values that are legal for the
|
||||
chosen <parameter>internalformat</parameter> enumerant. <parameter>internalformat</parameter>
|
||||
must be one of the sized internal formats given in Table 1 below, one of the sized depth-component
|
||||
formats <constant>GL_DEPTH_COMPONENT32F</constant>, <constant>GL_DEPTH_COMPONENT24</constant>, or
|
||||
<constant>GL_DEPTH_COMPONENT16</constant>, one of the combined depth-stencil formats,
|
||||
<constant>GL_DEPTH32F_STENCIL8</constant>, or <constant>GL_DEPTH24_STENCIL8</constant>, or the
|
||||
stencil-only format, <constant>GL_STENCIL_INDEX8</constant>. Upon success,
|
||||
the value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant> becomes
|
||||
<constant>GL_TRUE</constant>. The value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>
|
||||
may be discovered by calling <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>
|
||||
with <parameter>pname</parameter> set to <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>.
|
||||
No further changes to the dimensions or format of the texture object may be
|
||||
made. Using any command that might alter the dimensions or format of the
|
||||
texture object (such as <citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry> or
|
||||
another call to <function>glTexStorage1D</function>) will result in the
|
||||
generation of a <constant>GL_INVALID_OPERATION</constant> error, even if it
|
||||
would not, in fact, alter the dimensions or format of the object.
|
||||
</para>
|
||||
<para>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="internalformattable.xml" />
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<constant>GL_STENCIL_INDEX8</constant> is accepted for <parameter>internalformat</parameter>
|
||||
only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a
|
||||
valid sized internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
<constant>GL_TEXTURE_1D</constant> or <constant>GL_TEXTURE_2D</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>levels</parameter>
|
||||
are less than 1.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>levels</parameter> is greater than <mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mrow>
|
||||
<mml:msub>
|
||||
<mml:mi>log</mml:mi>
|
||||
<mml:mn>2</mml:mn>
|
||||
</mml:msub>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mi>width</mml:mi>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mn>1</mml:mn>
|
||||
</mml:mrow>
|
||||
</mml:math>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexImage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
233
Source/Bind/Specifications/Docs/glTexStorage2D.xml
Normal file
233
Source/Bind/Specifications/Docs/glTexStorage2D.xml
Normal file
|
@ -0,0 +1,233 @@
|
|||
<?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="glTexStorage2D">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTexStorage2D</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTexStorage2D</refname>
|
||||
<refpurpose>simultaneously specify storage for all levels of a two-dimensional or one-dimensional array texture</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTexStorage2D</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>levels</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</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>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
one of <constant>GL_TEXTURE_2D</constant>, <constant>GL_PROXY_TEXTURE_2D</constant>,
|
||||
<constant>GL_TEXTURE_1D_ARRAY</constant>, <constant>GL_PROXY_TEXTURE_1D_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_PROXY_TEXTURE_RECTANGLE</constant>,
|
||||
or <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>levels</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of texture levels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the sized internal format to be used to store texture image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the width of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the height of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTexStorage2D</function> specifies the storage requirements for all levels
|
||||
of a two-dimensional texture or one-dimensional texture array simultaneously. Once a texture is specified with this
|
||||
command, the format and dimensions of all levels become immutable unless it is a proxy
|
||||
texture. The contents of the image may still be modified, however, its storage requirements
|
||||
may not change. Such a texture is referred to as an <emphasis>immutable-format</emphasis>
|
||||
texture.
|
||||
</para>
|
||||
<para>
|
||||
The behavior of <function>glTexStorage2D</function> depends on the <parameter>target</parameter> parameter.
|
||||
When <parameter>target</parameter> is <constant>GL_TEXTURE_2D</constant>, <constant>GL_PROXY_TEXTURE_2D</constant>,
|
||||
<constant>GL_TEXTURE_RECTANGLE</constant>, <constant>GL_PROXY_TEXTURE_RECTANGLE</constant> or <constant>GL_PROXY_TEXTURE_CUBE_MAP</constant>,
|
||||
calling <function>glTexStorage2D</function> is equivalent, assuming no errors are generated,
|
||||
to executing the following pseudo-code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < levels; i++)
|
||||
{
|
||||
glTexImage2D(target, i, internalformat, width, height, 0, format, type, NULL);
|
||||
width = max(1, (width / 2));
|
||||
height = max(1, (height / 2));
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
When <parameter>target</parameter> is <constant>GL_TEXTURE_CUBE_MAP</constant>, <function>glTexStorage2D</function>
|
||||
is equivalent to:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < levels; i++)
|
||||
{
|
||||
for (face in (+X, -X, +Y, -Y, +Z, -Z))
|
||||
{
|
||||
glTexImage2D(face, i, internalformat, width, height, 0, format, type, NULL);
|
||||
}
|
||||
width = max(1, (width / 2));
|
||||
height = max(1, (height / 2));
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
When <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant> or <constant>GL_TEXTURE_1D_ARRAY</constant>,
|
||||
<function>glTexStorage2D</function> is equivalent to:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < levels; i++)
|
||||
{
|
||||
glTexImage2D(target, i, internalformat, width, height, 0, format, type, NULL);
|
||||
width = max(1, (width / 2));
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Since no texture data is actually provided, the values used in the pseudo-code
|
||||
for <parameter>format</parameter> and <parameter>type</parameter> are
|
||||
irrelevant and may be considered to be any values that are legal for the
|
||||
chosen <parameter>internalformat</parameter> enumerant. <parameter>internalformat</parameter>
|
||||
must be one of the sized internal formats given in Table 1 below, one of the sized depth-component
|
||||
formats <constant>GL_DEPTH_COMPONENT32F</constant>, <constant>GL_DEPTH_COMPONENT24</constant>, or
|
||||
<constant>GL_DEPTH_COMPONENT16</constant>, one of the combined depth-stencil formats,
|
||||
<constant>GL_DEPTH32F_STENCIL8</constant>, or <constant>GL_DEPTH24_STENCIL8</constant>, or the
|
||||
stencil-only format, <constant>GL_STENCIL_INDEX8</constant>. Upon success,
|
||||
the value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant> becomes
|
||||
<constant>GL_TRUE</constant>. The value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>
|
||||
may be discovered by calling <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>
|
||||
with <parameter>pname</parameter> set to <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>.
|
||||
No further changes to the dimensions or format of the texture object may be
|
||||
made. Using any command that might alter the dimensions or format of the
|
||||
texture object (such as <citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry> or
|
||||
another call to <function>glTexStorage2D</function>) will result in the
|
||||
generation of a <constant>GL_INVALID_OPERATION</constant> error, even if it
|
||||
would not, in fact, alter the dimensions or format of the object.
|
||||
</para>
|
||||
<para>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="internalformattable.xml" />
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<constant>GL_STENCIL_INDEX8</constant> is accepted for <parameter>internalformat</parameter>
|
||||
only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a
|
||||
valid sized internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
one of the accepted target enumerants.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>levels</parameter>
|
||||
are less than 1.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is <constant>GL_TEXTURE_1D_ARRAY</constant>
|
||||
or <constant>GL_PROXY_TEXTURE_1D_ARRAY</constant> and <parameter>levels</parameter> is greater than <mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mrow>
|
||||
<mml:msub>
|
||||
<mml:mi>log</mml:mi>
|
||||
<mml:mn>2</mml:mn>
|
||||
</mml:msub>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mi>width</mml:mi>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mn>1</mml:mn>
|
||||
</mml:mrow>
|
||||
</mml:math>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is not <constant>GL_TEXTURE_1D_ARRAY</constant>
|
||||
or <constant>GL_PROXY_TEXTURE_1D_ARRAY</constant> and <parameter>levels</parameter> is greater than <mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mrow>
|
||||
<mml:msub>
|
||||
<mml:mi>log</mml:mi>
|
||||
<mml:mn>2</mml:mn>
|
||||
</mml:msub>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mrow>
|
||||
<mml:mi>max</mml:mi>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mrow>
|
||||
<mml:mi>width</mml:mi>
|
||||
<mml:mo>,</mml:mo>
|
||||
<mml:mtext fontfamily='Times New Roman'> </mml:mtext>
|
||||
<mml:mi>height</mml:mi>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mn>1</mml:mn>
|
||||
</mml:mrow>
|
||||
</mml:math>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
146
Source/Bind/Specifications/Docs/glTexStorage2DMultisample.xml
Normal file
146
Source/Bind/Specifications/Docs/glTexStorage2DMultisample.xml
Normal file
|
@ -0,0 +1,146 @@
|
|||
<?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="glTexStorage2DMultisample">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTexStorage2DMultisample</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTexStorage2DMultisample</refname>
|
||||
<refpurpose>specify storage for a two-dimensional multisample texture</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTexStorage2DMultisample</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>samples</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>width</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>height</parameter></paramdef>
|
||||
<paramdef>GLboolean <parameter>fixedsamplelocations</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE</constant> or <constant>GL_PROXY_TEXTURE_2D_MULTISAMPLE</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>samples</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of samples in the texture.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the sized internal format to be used to store texture image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the width of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the height of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>fixedsamplelocations</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not
|
||||
depend on the internal format or size of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTexStorage2DMultisample</function> specifies the storage requirements for
|
||||
a two-dimensional multisample texture. Once a texture is specified with this
|
||||
command, its format and dimensions become immutable unless it is a proxy
|
||||
texture. The contents of the image may still be modified, however, its storage requirements
|
||||
may not change. Such a texture is referred to as an <emphasis>immutable-format</emphasis>
|
||||
texture.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>samples</parameter> specifies the number of samples to be used for the texture
|
||||
and must be greater than zero and less than or equal to the value of <constant>GL_MAX_SAMPLES</constant>.
|
||||
<parameter>internalformat</parameter> must be a color-renderable, depth-renderable, or stencil-renderable format.
|
||||
<parameter>width</parameter> and <parameter>height</parameter> specify the width and height,
|
||||
respectively, of the texture. If <parameter>fixedsamplelocations</parameter> is <constant>GL_TRUE</constant>,
|
||||
the image will use identical sample locations and the same number of samples for all texels in the image,
|
||||
and the sample locations will not depend on the internal format or size of the image.
|
||||
</para>
|
||||
<para>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="internalformattable.xml" />
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a
|
||||
valid color-renderable, depth-renderable or stencil-renderable format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
one of the accepted target enumerants.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>height</parameter>
|
||||
are less than 1 or greater than the value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>samples</parameter> is greater than the
|
||||
value of <constant>GL_MAX_SAMPLES</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>
|
||||
for the texture bound to <parameter>target</parameter> is not <constant>GL_FALSE</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexImage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage2DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
244
Source/Bind/Specifications/Docs/glTexStorage3D.xml
Normal file
244
Source/Bind/Specifications/Docs/glTexStorage3D.xml
Normal file
|
@ -0,0 +1,244 @@
|
|||
<?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="glTexStorage3D">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2011</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTexStorage3D</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTexStorage3D</refname>
|
||||
<refpurpose>simultaneously specify storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTexStorage3D</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>levels</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>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
one of <constant>GL_TEXTURE_3D</constant>, <constant>GL_PROXY_TEXTURE_3D</constant>,
|
||||
<constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_PROXY_TEXTURE_2D_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_CUBE_ARRAY</constant>, or <constant>GL_PROXY_TEXTURE_CUBE_ARRAY</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>levels</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of texture levels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the sized internal format to be used to store texture image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the width of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the height of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>depth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the depth of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTexStorage3D</function> specifies the storage requirements for all levels
|
||||
of a three-dimensional, two-dimensional array or cube-map array texture simultaneously. Once a texture is specified with this
|
||||
command, the format and dimensions of all levels become immutable unless it is a proxy
|
||||
texture. The contents of the image may still be modified, however, its storage requirements
|
||||
may not change. Such a texture is referred to as an <emphasis>immutable-format</emphasis>
|
||||
texture.
|
||||
</para>
|
||||
<para>
|
||||
The behavior of <function>glTexStorage3D</function> depends on the <parameter>target</parameter> parameter.
|
||||
When <parameter>target</parameter> is <constant>GL_TEXTURE_3D</constant>, or <constant>GL_PROXY_TEXTURE_3D</constant>,
|
||||
calling <function>glTexStorage3D</function> is equivalent, assuming no errors are generated,
|
||||
to executing the following pseudo-code:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < levels; i++)
|
||||
{
|
||||
glTexImage3D(target, i, internalformat, width, height, depth, 0, format, type, NULL);
|
||||
width = max(1, (width / 2));
|
||||
height = max(1, (height / 2));
|
||||
depth = max(1, (depth / 2));
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
When <parameter>target</parameter> is <constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_PROXY_TEXTURE_2D_ARRAY</constant>,
|
||||
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>, or <constant>GL_PROXY_TEXTURE_CUBE_MAP_ARRAY</constant>, <function>glTexStorage3D</function>
|
||||
is equivalent to:
|
||||
</para>
|
||||
<programlisting><![CDATA[ for (i = 0; i < levels; i++)
|
||||
{
|
||||
glTexImage3D(target, i, internalformat, width, height, depth, 0, format, type, NULL);
|
||||
width = max(1, (width / 2));
|
||||
height = max(1, (height / 2));
|
||||
}]]></programlisting>
|
||||
<para>
|
||||
Since no texture data is actually provided, the values used in the pseudo-code
|
||||
for <parameter>format</parameter> and <parameter>type</parameter> are
|
||||
irrelevant and may be considered to be any values that are legal for the
|
||||
chosen <parameter>internalformat</parameter> enumerant. <parameter>internalformat</parameter>
|
||||
must be one of the sized internal formats given in Table 1 below, one of the sized depth-component
|
||||
formats <constant>GL_DEPTH_COMPONENT32F</constant>, <constant>GL_DEPTH_COMPONENT24</constant>, or
|
||||
<constant>GL_DEPTH_COMPONENT16</constant>, one of the combined depth-stencil formats,
|
||||
<constant>GL_DEPTH32F_STENCIL8</constant>, or <constant>GL_DEPTH24_STENCIL8</constant>, or the
|
||||
stencil-only format, <constant>GL_STENCIL_INDEX8</constant>. Upon success,
|
||||
the value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant> becomes
|
||||
<constant>GL_TRUE</constant>. The value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>
|
||||
may be discovered by calling <citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>
|
||||
with <parameter>pname</parameter> set to <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>.
|
||||
No further changes to the dimensions or format of the texture object may be
|
||||
made. Using any command that might alter the dimensions or format of the
|
||||
texture object (such as <citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry> or
|
||||
another call to <function>glTexStorage3D</function>) will result in the
|
||||
generation of a <constant>GL_INVALID_OPERATION</constant> error, even if it
|
||||
would not, in fact, alter the dimensions or format of the object.
|
||||
</para>
|
||||
<para>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="internalformattable.xml" />
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<constant>GL_STENCIL_INDEX8</constant> is accepted for <parameter>internalformat</parameter>
|
||||
only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a
|
||||
valid sized internal format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
one of the accepted target enumerants.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>levels</parameter>
|
||||
are less than 1.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is <constant>GL_TEXTURE_3D</constant>
|
||||
or <constant>GL_PROXY_TEXTURE_3D</constant> and <parameter>levels</parameter> is greater than <mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mrow>
|
||||
<mml:msub>
|
||||
<mml:mi>log</mml:mi>
|
||||
<mml:mn>2</mml:mn>
|
||||
</mml:msub>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mrow>
|
||||
<mml:mi>max</mml:mi>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mrow>
|
||||
<mml:mi>width</mml:mi>
|
||||
<mml:mo>,</mml:mo>
|
||||
<mml:mtext fontfamily='Times New Roman'> </mml:mtext>
|
||||
<mml:mi>height</mml:mi>
|
||||
<mml:mo>,</mml:mo>
|
||||
<mml:mtext fontfamily='Times New Roman'> </mml:mtext>
|
||||
<mml:mi>depth</mml:mi>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mn>1</mml:mn>
|
||||
</mml:mrow>
|
||||
</mml:math>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is <constant>GL_TEXTURE_2D_ARRAY</constant>,
|
||||
<constant>GL_PROXY_TEXTURE_2D_ARRAY</constant>, <constant>GL_TEXURE_CUBE_ARRAY</constant>, or <constant>GL_PROXY_TEXTURE_CUBE_MAP_ARRAY</constant>
|
||||
and <parameter>levels</parameter> is greater than <mml:math>
|
||||
<mml:mrow>
|
||||
<mml:mfenced open = '⌊' close = '⌋'>
|
||||
<mml:mrow>
|
||||
<mml:msub>
|
||||
<mml:mi>log</mml:mi>
|
||||
<mml:mn>2</mml:mn>
|
||||
</mml:msub>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mrow>
|
||||
<mml:mi>max</mml:mi>
|
||||
<mml:mfenced open = '(' close = ')'>
|
||||
<mml:mrow>
|
||||
<mml:mi>width</mml:mi>
|
||||
<mml:mo>,</mml:mo>
|
||||
<mml:mtext fontfamily='Times New Roman'> </mml:mtext>
|
||||
<mml:mi>height</mml:mi>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
</mml:mrow>
|
||||
</mml:mfenced>
|
||||
<mml:mo>+</mml:mo>
|
||||
<mml:mn>1</mml:mn>
|
||||
</mml:mrow>
|
||||
</mml:math>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2011 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>
|
168
Source/Bind/Specifications/Docs/glTexStorage3DMultisample.xml
Normal file
168
Source/Bind/Specifications/Docs/glTexStorage3DMultisample.xml
Normal file
|
@ -0,0 +1,168 @@
|
|||
<?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="glTexStorage3DMultisample">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTexStorage3DMultisample</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTexStorage3DMultisample</refname>
|
||||
<refpurpose>specify storage for a two-dimensional multisample array texture</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTexStorage3DMultisample</function></funcdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLsizei <parameter>samples</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>GLboolean <parameter>fixedsamplelocations</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the target of the operation. <parameter>target</parameter> must be
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant> or <constant>GL_PROXY_TEXTURE_2D_MULTISAMPLE_MULTISAMPLE</constant>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>samples</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the number of samples in the texture.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalformat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the sized internal format to be used to store texture image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the width of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the height of the texture, in texels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>depth</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the depth of the texture, in layers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>fixedsamplelocations</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies whether the image will use identical sample locations and the same number of samples for all texels in the image, and the sample locations will not
|
||||
depend on the internal format or size of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTexStorage3DMultisample</function> specifies the storage requirements for
|
||||
a two-dimensional multisample array texture. Once a texture is specified with this
|
||||
command, its format and dimensions become immutable unless it is a proxy
|
||||
texture. The contents of the image may still be modified, however, its storage requirements
|
||||
may not change. Such a texture is referred to as an <emphasis>immutable-format</emphasis>
|
||||
texture.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>samples</parameter> specifies the number of samples to be used for the texture
|
||||
and must be greater than zero and less than or equal to the value of <constant>GL_MAX_SAMPLES</constant>.
|
||||
<parameter>internalformat</parameter> must be a color-renderable, depth-renderable, or stencil-renderable format.
|
||||
<parameter>width</parameter> and <parameter>height</parameter> specify the width and height,
|
||||
respectively, of the texture and <parameter>depth</parameter> specifies the depth (or the number of layers)
|
||||
of the texture. If <parameter>fixedsamplelocations</parameter> is <constant>GL_TRUE</constant>,
|
||||
the image will use identical sample locations and the same number of samples for all texels in the image,
|
||||
and the sample locations will not depend on the internal format or size of the image.
|
||||
</para>
|
||||
<para>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="internalformattable.xml" />
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a
|
||||
valid color-renderable, depth-renderable or stencil-renderable format.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not
|
||||
one of the accepted target enumerants.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>width</parameter> or <parameter>height</parameter>
|
||||
are less than 1 or greater than the value of <constant>GL_MAX_TEXTURE_SIZE</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>depth</parameter>
|
||||
is less than 1 or greater than the value of <constant>GL_MAX_ARRAY_TEXTURE_LAYERS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>samples</parameter> is greater than the
|
||||
value of <constant>GL_MAX_SAMPLES</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>
|
||||
for the texture bound to <parameter>target</parameter> is not <constant>GL_FALSE</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetInteger</refentrytitle></citerefentry> with arguments <constant>GL_MAX_TEXTURE_SIZE</constant>,
|
||||
<constant>GL_MAX_ARRAY_TEXTURE_LEVELS</constant>, <constant>GL_TEXTURE_VIEW_MIN_LAYER</constant>,
|
||||
<constant>GL_TEXTURE_VIEW_NUM_LAYERS</constant>, or <constant>GL_TEXTURE_IMMUTABLE_LEVELS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexImage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexImage3DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2DMultisample</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
357
Source/Bind/Specifications/Docs/glTextureView.xml
Normal file
357
Source/Bind/Specifications/Docs/glTextureView.xml
Normal file
|
@ -0,0 +1,357 @@
|
|||
<?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="glTextureView">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glTextureView</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glTextureView</refname>
|
||||
<refpurpose>initialize a texture as a data alias of another texture's data store</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glTextureView</function></funcdef>
|
||||
<paramdef>GLuint <parameter>texture</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>target</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>origtexture</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>internalformat</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>minlevel</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>numlevels</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>minlayer</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>numlayers</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>texture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the texture object to be initialized as a view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the target to be used for the newly initialized texture.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>origtexture</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the name of a texture object of which to make a view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>internalFormat</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the internal format for the newly created view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>minlevel</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies lowest level of detail of the view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>numlevels</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of levels of detail to include in the view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>minlayer</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the index of the first layer to include in the view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>numlayers</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of layers to include in the view.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glTextureView</function> initializes a texture object as an
|
||||
alias, or view of another texture object, sharing some or all of the
|
||||
parent texture's data store with the initialized texture. <parameter>texture</parameter>
|
||||
specifies a name previously reserved by a successful call to <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>
|
||||
but that has not yet been bound or given a target. <parameter>target</parameter>
|
||||
specifies the target for the newly initialized texture and must be compatible
|
||||
with the target of the parent texture, given in <parameter>origtexture</parameter>
|
||||
as specified in the following table:
|
||||
</para>
|
||||
<informaltable frame="topbot">
|
||||
<tgroup cols="2" align="left">
|
||||
<colspec colnum="1" colname="col1" colwidth="1*"/>
|
||||
<colspec colnum="2" colname="col2" colwidth="2*"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry rowsep="1" align="center">Original Target</entry>
|
||||
<entry rowsep="1" align="center">Compatible New Targets</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_1D</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_1D_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_3D</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_3D</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_CUBE_MAP</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_CUBE_MAP</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_TEXTUER_CUBE_MAP_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_RECTANGLE</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_RECTANGLE</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_BUFFER</constant></entry>
|
||||
<entry align="left"><emphasis>none</emphasis></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_1D_ARRAY</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_1D_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D_ARRAY</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_CUBE_MAP</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_2D_ARRAY</constant>, <constant>GL_TEXTUER_CUBE_MAP_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D_MULTISAMPLE</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, <constant>GL_TEXTURE_MULTISAMPLE_ARRAY</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D_MULTISAMPLE_ARRAY</constant></entry>
|
||||
<entry align="left"><constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, <constant>GL_TEXTURE_MULTISAMPLE_ARRAY</constant></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
The value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant> for <parameter>origtexture</parameter>
|
||||
must be <constant>GL_TRUE</constant>.
|
||||
After initialization, <parameter>texture</parameter> inherits the data store of
|
||||
the parent texture, <parameter>origtexture</parameter> and is usable as a normal
|
||||
texture object with target <parameter>target</parameter>. Data in the shared store
|
||||
is reinterpreted with the new internal format specified by <parameter>internalformat</parameter>.
|
||||
<parameter>internalformat</parameter> must be compatible with the internal format
|
||||
of the parent texture as specified in the following table:
|
||||
</para>
|
||||
<informaltable frame="topbot">
|
||||
<tgroup cols="2" align="left">
|
||||
<colspec colnum="1" colname="col1" colwidth="1*"/>
|
||||
<colspec colnum="2" colname="col2" colwidth="2*"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry align="center">Class</entry>
|
||||
<entry align="center">Internal Formats</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry align="left">128-bit</entry>
|
||||
<entry align="left"><constant>GL_RGBA32F</constant>, <constant>GL_RGBA32UI</constant>, <constant>GL_RGBA32I</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">96-bit</entry>
|
||||
<entry align="left"><constant>GL_RGB32F</constant>, <constant>GL_RGB32UI</constant>, <constant>GL_RGB32I</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">64-bit</entry>
|
||||
<entry align="left"><constant>GL_RGBA16F</constant>, <constant>GL_RG32F</constant>, <constant>GL_RGBA16UI</constant>,
|
||||
<constant>GL_RG32UI</constant>, <constant>GL_RGBA16I</constant>, <constant>GL_RG32I</constant>, <constant>GL_RGBA16</constant>, <constant>GL_RGBA16_SNORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">48-bit</entry>
|
||||
<entry align="left"><constant>GL_RGB16</constant>, <constant>GL_RGB16_SNORM</constant>, <constant>GL_RGB16F</constant>, <constant>GL_RGB16UI</constant>, <constant>GL_RGB16I</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">32-bit</entry>
|
||||
<entry align="left"><constant>GL_RG16F</constant>, <constant>GL_R11F_G11F_B10F</constant>, <constant>GL_R32F</constant>, <constant>GL_RGB10_A2UI</constant>,
|
||||
<constant>GL_RGBA8UI</constant>, <constant>GL_RG16UI</constant>, <constant>GL_R32UI</constant>, <constant>GL_RGBA8I</constant>,
|
||||
<constant>GL_RG16I</constant>, <constant>GL_R32I</constant>, <constant>GL_RGB10_A2</constant>, <constant>GL_RGBA8</constant>,
|
||||
<constant>GL_RG16</constant>, <constant>GL_RGBA8_SNORM</constant>, <constant>GL_RG16_SNORM</constant>, <constant>GL_SRGB8_ALPHA8</constant>,
|
||||
<constant>GL_RGB9_E5</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">24-bit</entry>
|
||||
<entry align="left"><constant>GL_RGB8</constant>, <constant>GL_RGB8_SNORM</constant>, <constant>GL_SRGB8</constant>,
|
||||
<constant>GL_RGB8UI</constant>, <constant>GL_RGB8I</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">16-bit</entry>
|
||||
<entry align="left"><constant>GL_R16F</constant>, <constant>GL_RG8UI</constant>, <constant>GL_R16UI</constant>, <constant>GL_RG8I</constant>,
|
||||
<constant>GL_R16I</constant>, <constant>GL_RG8</constant>, <constant>GL_R16</constant>, <constant>GL_RG8_SNORM</constant>, <constant>GL_R16_SNORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left">8-bit</entry>
|
||||
<entry align="left"><constant>GL_R8UI</constant>, <constant>GL_R8I</constant>, <constant>GL_R8</constant>, <constant>GL_R8_SNORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGTC1_RED</constant></entry>
|
||||
<entry align="left"><constant>GL_COMPRESSED_RED_RGTC1</constant>, <constant>GL_COMPRESSED_SIGNED_RED_RGTC1</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_RGTC2_RG</constant></entry>
|
||||
<entry align="left"><constant>GL_COMPRESSED_RG_RGTC2</constant>, <constant>GL_COMPRESSED_SIGNED_RG_RGTC2</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_BPTC_UNORM</constant></entry>
|
||||
<entry align="left"><constant>GL_COMPRESSED_RGBA_BPTC_UNORM</constant>, <constant>GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM</constant></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry align="left"><constant>GL_BPTC_FLOAT</constant></entry>
|
||||
<entry align="left"><constant>GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT</constant>, <constant>GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT</constant></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
If the original texture is an array or has multiple mipmap levels,
|
||||
the parameters <parameter>minlayer</parameter>, <parameter>numlayers</parameter>, <parameter>minlevel</parameter>, and <parameter>numlevels</parameter>
|
||||
control which of those slices and levels are considered part of the texture.
|
||||
The <parameter>minlevel</parameter> and <parameter>minlayer</parameter> parameters are relative to the view of the
|
||||
original texture. If <parameter>numlayers</parameter> or <parameter>numlevels</parameter> extend beyond the original
|
||||
texture, they are clamped to the max extent of the original texture.
|
||||
</para>
|
||||
<para>
|
||||
If the new texture's target is <constant>GL_TEXTURE_CUBE_MAP</constant>, the clamped <parameter>numlayers</parameter>
|
||||
must be equal to 6. If the new texture's target is <constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>,
|
||||
then <parameter>numlayers</parameter> counts layer-faces rather than layers, and the clamped
|
||||
<parameter>numlayers</parameter> must be a multiple of 6. If the new texture's target is <constant>GL_TEXTURE_CUBE_MAP</constant> or
|
||||
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>, the width and height of the original texture's
|
||||
levels must be equal.
|
||||
</para>
|
||||
<para>
|
||||
When the original texture's target is <constant>GL_TEXTURE_CUBE_MAP</constant>, the layer
|
||||
parameters are interpreted in the same order as if it were a
|
||||
<constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant> with 6 layer-faces.
|
||||
</para>
|
||||
<para>
|
||||
If <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant>, <constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>, <constant>GL_TEXTURE_RECTANGLE</constant>, or
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE</constant>, <parameter>numlayers</parameter> must equal 1.
|
||||
</para>
|
||||
<para>
|
||||
The dimensions of the original texture must be less than or equal to the maximum
|
||||
supported dimensions of the new target. For example, if the original texture has a <constant>GL_TEXTURE_2D_ARRAY</constant>
|
||||
target and its width is greater than <constant>GL_MAX_CUBE_MAP_TEXTURE_SIZE</constant>, an error
|
||||
will be generated if <function>glTextureView</function> is called to create a <constant>GL_TEXTURE_CUBE_MAP</constant>
|
||||
view.
|
||||
</para>
|
||||
<para>
|
||||
Texture commands that take a <parameter>level</parameter> or <parameter>layer</parameter> parameter, such as
|
||||
<citerefentry><refentrytitle>glTexSubImage2D</refentrytitle></citerefentry>, interpret that parameter to be relative to the view of the
|
||||
texture. i.e. the mipmap level of the data store that would be updated via
|
||||
<citerefentry><refentrytitle>TexSubImage2D</refentrytitle></citerefentry> would be the sum of <parameter>level</parameter> and the value of
|
||||
<constant>GL_TEXTURE_VIEW_MIN_LEVEL</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>minlayer</parameter> or <parameter>minlevel</parameter>
|
||||
are larger than the greatest layer or level of <parameter>origtexture</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>target</parameter> is not compatible
|
||||
with the target of <parameter>origtexture</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the dimensions of <parameter>origtexture</parameter>
|
||||
are greater than the maximum supported dimensions for <parameter>target</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>internalformat</parameter> is not compatible
|
||||
with the internal format of <parameter>origtexture</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>texture</parameter> has already been bound
|
||||
or otherwise given a target.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if the value of <constant>GL_TEXTURE_IMMUTABLE_FORMAT</constant>
|
||||
for <parameter>origtexture</parameter> is not <constant>GL_TRUE</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if <parameter>origtexture</parameter> is not the name of an
|
||||
existing texture object.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generaged if <parameter>target</parameter> is <constant>GL_TEXTURE_CUBE_MAP</constant>
|
||||
and <parameter>numlayers</parameter> is not 6, or if <parameter>target</parameter> is <constant>GL_TEXTURE_CUBE_MAP_ARRAY</constant>
|
||||
and <parameter>numlayers</parameter> is not an integer multiple of 6.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>target</parameter> is <constant>GL_TEXTURE_1D</constant>,
|
||||
<constant>GL_TEXTURE_2D</constant>, <constant>GL_TEXTURE_3D</constant>, <constant>GL_TEXTURE_RECTANGLE</constant>, or
|
||||
<constant>GL_TEXTURE_2D_MULTISAMPLE</constant> and <parameter>numlayers</parameter> does not equal 1.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>texture</parameter> zero or is not the name of a texture previously
|
||||
returned from a successful call to <citerefentry><refentrytitle>glGenTextures</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexParameter</refentrytitle></citerefentry> with arguments <constant>GL_TEXTURE_VIEW_MIN_LEVEL</constant>,
|
||||
<constant>GL_TEXTURE_VIEW_NUM_LEVELS</constant>, <constant>GL_TEXTURE_VIEW_MIN_LAYER</constant>,
|
||||
<constant>GL_TEXTURE_VIEW_NUM_LAYERS</constant>, or <constant>GL_TEXTURE_IMMUTABLE_LEVELS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glTexStorage1D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage2D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glTexStorage3D</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glGetTexParameter</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
92
Source/Bind/Specifications/Docs/glVertexAttribBinding.xml
Normal file
92
Source/Bind/Specifications/Docs/glVertexAttribBinding.xml
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?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="glVertexAttribBinding">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glVertexAttribBinding</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glVertexAttribBinding</refname>
|
||||
<refpurpose>associate a vertex attribute and a vertex buffer binding</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glVertexAttribBinding</function></funcdef>
|
||||
<paramdef>GLuint <parameter>attribindex</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>bindingindex</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribindex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index of the attribute to associate with a vertex buffer binding.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bindingindex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index of the vertex buffer binding with which to associate the generic vertex attribute.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glVertexAttribBinding</function>, establishes an association between the generic vertex
|
||||
attribute whose index is given by <parameter>attribindex</parameter> and a vertex buffer binding
|
||||
whose index is given by <parameter>bindingindex</parameter>. <parameter>attribindex</parameter>
|
||||
must be less than the value of <constant>GL_MAX_VERTEX_ATTRIBS</constant> and <parameter>bindingindex</parameter>
|
||||
must be less than the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>attribindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIBS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>bindingindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no vertex array object is bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>,
|
||||
<constant>GL_VERTEX_BINDING_DIVISOR</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glBindVertexBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribFormat</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexBindingDivisor</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
201
Source/Bind/Specifications/Docs/glVertexAttribFormat.xml
Normal file
201
Source/Bind/Specifications/Docs/glVertexAttribFormat.xml
Normal file
|
@ -0,0 +1,201 @@
|
|||
<?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="glVertexAttribFormat">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glVertexAttribFormat</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glVertexAttribFormat</refname>
|
||||
<refpurpose>specify the organization of vertex arrays</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glVertexAttribFormat</function></funcdef>
|
||||
<paramdef>GLuint <parameter>attribindex</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>size</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>GLboolean <parameter>normalized</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>relativeoffset</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glVertexAttribIFormat</function></funcdef>
|
||||
<paramdef>GLuint <parameter>attribindex</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>size</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>relativeoffset</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glVertexAttribLFormat</function></funcdef>
|
||||
<paramdef>GLuint <parameter>attribindex</parameter></paramdef>
|
||||
<paramdef>GLint <parameter>size</parameter></paramdef>
|
||||
<paramdef>GLenum <parameter>type</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>relativeoffset</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>attribindex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The generic vertex attribute array being described.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of values per vertex that are stored in the array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the data stored in the array.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>normalized</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between elements within the buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>relativeoffset</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between elements within the buffer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glVertexAttribFormat</function>, <function>glVertexAttribIFormat</function> and
|
||||
<function>glVertexAttribLFormat</function> specify the organization of data in vertex arrays.
|
||||
<parameter>attribindex</parameter> specifies the index of the generic vertex attribute
|
||||
array whose data layout is being described, and must be less
|
||||
than the value of <constant>GL_MAX_VERTEX_ATTRIBS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>size</parameter> determines the number of components per vertex are allocated
|
||||
to the specifed attribute and must be 1, 2, 3 or 4. <parameter>type</parameter> indicates
|
||||
the type of the data. If <parameter>type</parameter> is one of <constant>GL_BYTE</constant>,
|
||||
<constant>GL_SHORT</constant>, <constant>GL_INT</constant>, <constant>GL_FIXED</constant>,
|
||||
<constant>GL_FLOAT</constant>, <constant>GL_HALF_FLOAT</constant>, and
|
||||
<constant>GL_DOUBLE</constant> indicate types <code>GLbyte</code>, <code>GLshort</code>,
|
||||
<code>GLint</code>, <code>GLfixed</code>, <code>GLfloat</code>, <code>GLhalf</code>, and
|
||||
<code>GLdouble</code>, respectively; the values <constant>GL_UNSIGNED_BYTE</constant>,
|
||||
<constant>GL_UNSIGNED_SHORT</constant>, and <constant>GL_UNSIGNED_INT</constant> indicate types
|
||||
<code>GLubyte</code>, <code>GLushort</code>, and <code>GLuint</code>,
|
||||
respectively; the values <constant>GL_INT_2_10_10_10_REV</constant> and
|
||||
<constant>GL_UNSIGNED_INT_2_10_10_10_REV</constant> indicating respectively four signed or
|
||||
unsigned elements packed into a single <code>GLuint</code>; and the value
|
||||
<constant>GL_UNSIGNED_INT_10F_11F_11F_REV</constant> indicating three floating point values
|
||||
packed into a single <code>GLuint</code>.
|
||||
</para>
|
||||
<para>
|
||||
<function>glVertexAttribLFormat</function> is used to specify layout for
|
||||
data associated with a generic attribute variable declared as 64-bit double precision
|
||||
components. For <function>glVertexAttribLFormat</function>, <parameter>type</parameter>
|
||||
must be <constant>GL_DOUBLE</constant>. In contrast to <function>glVertexAttribFormat</function>,
|
||||
which will cause data declared as <constant>GL_DOUBLE</constant> to be converted to 32-bit
|
||||
representation, <function>glVertexAttribLFormat</function> causes such data to be left
|
||||
in its natural, 64-bit representation.
|
||||
</para>
|
||||
<para>
|
||||
For <function>glVertexAttribFormat</function>, if <parameter>normalized</parameter> is
|
||||
<constant>GL_TRUE</constant>, then integer data is normalized to the range [-1, 1] or
|
||||
[0, 1] if it is signed or unsigned, respectively. If <parameter>noramlized</parameter> is
|
||||
<constant>GL_FALSE</constant> then integer data is directly converted to floating point.
|
||||
</para>
|
||||
<para>
|
||||
<parameter>relativeoffset</parameter> is the offset, measured in basic machine units
|
||||
of the first element relative to the start of the vertex buffer binding this attribute
|
||||
fetches from.
|
||||
</para>
|
||||
<para>
|
||||
<function>glVertexAttribFormat</function> should be used to describe vertex attribute
|
||||
layout for floating-point vertex attributes, <function>glVertexAttribIFormat</function>
|
||||
should be used to describe vertex attribute layout for integer vertex attribute
|
||||
and <function>glVertexAttribLFormat</function> should be used to describe the layout
|
||||
for 64-bit vertex attributes. Data for an array specified by
|
||||
<function>glVertexAttribIFormat</function> will always be left as integer values;
|
||||
such data are referred to as pure integers.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="notes"><title>Notes</title>
|
||||
<para>
|
||||
<constant>GL_UNSIGNED_INT_10F_11F_11F_REV</constant> is accepted for <parameter>type</parameter>
|
||||
only if the GL version is 4.4 or higher.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>attribindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIBS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>size</parameter> is not
|
||||
one of the accepted values.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_VALUE</constant> is generated if <parameter>relativeoffset</parameter> is greater
|
||||
than the value of <constant>GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>type</parameter> is not
|
||||
one of the accepted tokens.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no vertex array object is bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>,
|
||||
or <constant>GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGetVertexAttrib</refentrytitle></citerefentry> with argument <constant>GL_VERTEX_ATTRIB_RELATIVE_OFFSET</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glBindVertexBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribBinding</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexBindingDivisor</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
91
Source/Bind/Specifications/Docs/glVertexBindingDivisor.xml
Normal file
91
Source/Bind/Specifications/Docs/glVertexBindingDivisor.xml
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?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="glVertexBindingDivisor">
|
||||
<refmeta>
|
||||
<refmetainfo>
|
||||
<copyright>
|
||||
<year>2012</year>
|
||||
<holder>Khronos Group</holder>
|
||||
</copyright>
|
||||
</refmetainfo>
|
||||
<refentrytitle>glVertexBindingDivisor</refentrytitle>
|
||||
<manvolnum>3G</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>glVertexBindingDivisor</refname>
|
||||
<refpurpose>modify the rate at which generic vertex attributes advance</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv><title>C Specification</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>glVertexBindingDivisor</function></funcdef>
|
||||
<paramdef>GLuint <parameter>bindingindex</parameter></paramdef>
|
||||
<paramdef>GLuint <parameter>divisor</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="parameters"><title>Parameters</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>bindingindex</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The index of the binding whose divisor to modify.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>divisor</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new value for the instance step rate to apply.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="description"><title>Description</title>
|
||||
<para>
|
||||
<function>glVertexBindingDivisor</function>, modifies the rate at which generic vertex attributes advance when
|
||||
rendering multiple instances of primitives in a single draw command. If
|
||||
<parameter>divisor</parameter> is zero, the attributes using the buffer bound to <parameter>bindingindex</parameter>
|
||||
advance once per vertex. If <parameter>divisor</parameter> is non-zero, the attributes advance
|
||||
once per <parameter>divisor</parameter> instances of the set(s) of vertices being rendered. An
|
||||
attribute is referred to as <emphasis>instanced</emphasis> if the corresponding <parameter>divisor</parameter>
|
||||
value is non-zero.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="errors"><title>Errors</title>
|
||||
<para>
|
||||
<constant>GL_INVAILD_VALUE</constant> is generated if <parameter>bindingindex</parameter> is greater than
|
||||
or equal to the value of <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
|
||||
</para>
|
||||
<para>
|
||||
<constant>GL_INVALID_OPERATION</constant> is generated if no vertex array object is bound.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with arguments <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>,
|
||||
<constant>GL_VERTEX_BINDING_DIVISOR</constant>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="seealso"><title>See Also</title>
|
||||
<para>
|
||||
<citerefentry><refentrytitle>glBindVertexBuffer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribBinding</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexBindingDivisor</refentrytitle></citerefentry>,
|
||||
<citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 id="Copyright"><title>Copyright</title>
|
||||
<para>
|
||||
Copyright <trademark class="copyright"></trademark> 2012 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>
|
Loading…
Reference in a new issue