Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd"> | |
4 | <refentry id="glBindBufferBase"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glBindBufferBase</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glBindBufferBase</refname> | |
17 | <refpurpose>bind a buffer object to an indexed buffer target</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
22 | <funcdef>void <function>glBindBufferBase</function></funcdef> | |
23 | <paramdef>GLenum <parameter>target</parameter></paramdef> | |
24 | <paramdef>GLuint <parameter>index</parameter></paramdef> | |
25 | <paramdef>GLuint <parameter>buffer</parameter></paramdef> | |
26 | </funcprototype> | |
27 | </funcsynopsis> | |
28 | </refsynopsisdiv> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>target</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | Specify the target of the bind operation. <parameter>target</parameter> must be | |
36 | one of <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, | |
37 | <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, <constant>GL_UNIFORM_BUFFER</constant> or | |
38 | <constant>GL_SHADER_STORAGE_BUFFER</constant>. | |
39 | </para> | |
40 | </listitem> | |
41 | </varlistentry> | |
42 | <varlistentry> | |
43 | <term><parameter>index</parameter></term> | |
44 | <listitem> | |
45 | <para> | |
46 | Specify the index of the binding point within the array specified by <parameter>target</parameter>. | |
47 | </para> | |
48 | </listitem> | |
49 | </varlistentry> | |
50 | <varlistentry> | |
51 | <term><parameter>buffer</parameter></term> | |
52 | <listitem> | |
53 | <para> | |
54 | The name of a buffer object to bind to the specified binding point. | |
55 | </para> | |
56 | </listitem> | |
57 | </varlistentry> | |
58 | </variablelist> | |
59 | </refsect1> | |
60 | <refsect1 id="description"><title>Description</title> | |
61 | <para> | |
62 | <function>glBindBufferBase</function> binds the buffer object <parameter>buffer</parameter> | |
63 | to the binding point at index <parameter>index</parameter> of the array of targets specified | |
64 | by <parameter>target</parameter>. Each <parameter>target</parameter> represents an indexed | |
65 | array of buffer binding points, as well as a single general binding point that can be used by | |
66 | other buffer manipulation functions such as <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry> | |
67 | or <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>. In addition to binding | |
68 | <parameter>buffer</parameter> to the indexed buffer binding target, <function>glBindBufferBase</function> | |
69 | also binds <parameter>buffer</parameter> to the generic buffer binding point specified by <parameter>target</parameter>. | |
70 | </para> | |
71 | </refsect1> | |
72 | <refsect1 id="notes"><title>Notes</title> | |
73 | <para> | |
74 | Calling <function>glBindBufferBase</function> is equivalent to calling | |
75 | <citerefentry><refentrytitle>glBindBufferRange</refentrytitle></citerefentry> with <parameter>offset</parameter> | |
76 | zero and <parameter>size</parameter> equal to the size of the buffer. | |
77 | </para> | |
78 | <para> | |
79 | The <constant>GL_ATOMIC_COUNTER_BUFER</constant> target is available only if the GL version is 4.2 or greater. | |
80 | </para> | |
81 | <para> | |
82 | The <constant>GL_SHADER_STORAGE_BUFFER</constant> target is available only if the GL version is 4.3 or greater. | |
83 | </para> | |
84 | </refsect1> | |
85 | <refsect1 id="errors"><title>Errors</title> | |
86 | <para> | |
87 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not | |
88 | <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, | |
89 | <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, <constant>GL_UNIFORM_BUFFER</constant> or | |
90 | <constant>GL_SHADER_STORAGE_BUFFER</constant>. | |
91 | </para> | |
92 | <para> | |
93 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater | |
94 | than or equal to the number of <parameter>target</parameter>-specific indexed binding points. | |
95 | </para> | |
96 | <para> | |
97 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>buffer</parameter> does | |
98 | not have an associated data store, or if the size of that store is zero. | |
99 | </para> | |
100 | </refsect1> | |
101 | <refsect1 id="seealso"><title>See Also</title> | |
102 | <para> | |
103 | <citerefentry><refentrytitle>glGenBuffers</refentrytitle></citerefentry>, | |
104 | <citerefentry><refentrytitle>glDeleteBuffers</refentrytitle></citerefentry>, | |
105 | <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>, | |
106 | <citerefentry><refentrytitle>glBindBufferRange</refentrytitle></citerefentry>, | |
107 | <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>, | |
108 | <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry>, | |
109 | </para> | |
110 | </refsect1> <refsect1 id="Copyright"><title>Copyright</title> | |
111 | <para> | |
112 | Copyright <trademark class="copyright"></trademark> 2010-2011 Khronos Group. | |
113 | This material may be distributed subject to the terms and conditions set forth in | |
114 | the Open Publication License, v 1.0, 8 June 1999. | |
115 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
116 | </para> | |
117 | </refsect1> | |
118 | </refentry> |