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">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glBindBufferBase
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glBindBufferBase
</refname>
17 <refpurpose>bind a buffer object to an indexed buffer target
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
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>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>target
</parameter></term>
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>.
43 <term><parameter>index
</parameter></term>
46 Specify the index of the binding point within the array specified by
<parameter>target
</parameter>.
51 <term><parameter>buffer
</parameter></term>
54 The name of a buffer object to bind to the specified binding point.
60 <refsect1 id=
"description"><title>Description
</title>
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>.
72 <refsect1 id=
"notes"><title>Notes
</title>
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.
79 The
<constant>GL_ATOMIC_COUNTER_BUFER
</constant> target is available only if the GL version is
4.2 or greater.
82 The
<constant>GL_SHADER_STORAGE_BUFFER
</constant> target is available only if the GL version is
4.3 or greater.
85 <refsect1 id=
"errors"><title>Errors
</title>
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>.
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.
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.
101 <refsect1 id=
"seealso"><title>See Also
</title>
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>,
110 </refsect1> <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.