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=
"glBindVertexBuffer">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glBindVertexBuffer
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glBindVertexBuffer
</refname>
17 <refpurpose>bind a buffer to a vertex buffer bind point
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glBindVertexBuffer
</function></funcdef>
23 <paramdef>GLuint
<parameter>bindingindex
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>buffer
</parameter></paramdef>
25 <paramdef>GLintptr
<parameter>offset
</parameter></paramdef>
26 <paramdef>GLintptr
<parameter>stride
</parameter></paramdef>
30 <refsect1 id=
"parameters"><title>Parameters
</title>
33 <term><parameter>bindingindex
</parameter></term>
36 The index of the vertex buffer binding point to which to bind the buffer.
41 <term><parameter>buffer
</parameter></term>
44 The name of an existing buffer to bind to the vertex buffer binding point.
49 <term><parameter>offset
</parameter></term>
52 The offset of the first element of the buffer.
57 <term><parameter>stride
</parameter></term>
60 The distance between elements within the buffer.
66 <refsect1 id=
"description"><title>Description
</title>
68 <function>glBindVertexBuffer
</function> binds the buffer named
<parameter>buffer
</parameter>
69 to the vertex buffer binding point whose index is given by
<parameter>bindingindex
</parameter>.
70 <parameter>offset
</parameter> and
<parameter>stride
</parameter> specify the offset of the first
71 element within the buffer and the distance between elements within the buffer, respectively, and
72 are both measured in basic machine units.
<parameter>bindingindex
</parameter> must be less than
73 the value of
<constant>GL_MAX_VERTEX_ATTRIB_BINDINGS
</constant>.
<parameter>offset
</parameter>
74 and
<parameter>stride
</parameter> must be greater than or equal to zero. If
<parameter>buffer
</parameter>
75 is zero, then any buffer currently bound to the specified binding point is unbound.
78 <refsect1 id=
"errors"><title>Errors
</title>
80 <constant>GL_INVAILD_VALUE
</constant> is generated if
<parameter>bindingindex
</parameter> is greater than
81 or equal to the value of
<constant>GL_MAX_VERTEX_ATTRIB_BINDINGS
</constant>.
84 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>offset
</parameter> or
<parameter>stride
</parameter>
88 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>buffer
</parameter> is not the name of an
89 existing buffer object.
92 <constant>GL_INVALID_OPERATION
</constant> is generated if no vertex array object is bound.
95 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
97 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_VERTEX_ATTRIB_BINDINGS
</constant>.
100 <refsect1 id=
"seealso"><title>See Also
</title>
102 <citerefentry><refentrytitle>glVertexAttribBinding
</refentrytitle></citerefentry>,
103 <citerefentry><refentrytitle>glVertexAttribFormat
</refentrytitle></citerefentry>,
104 <citerefentry><refentrytitle>glVertexAttribPointer
</refentrytitle></citerefentry>,
105 <citerefentry><refentrytitle>glVertexBindingDivisor
</refentrytitle></citerefentry>.
108 <refsect1 id=
"Copyright"><title>Copyright
</title>
110 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
111 This material may be distributed subject to the terms and conditions set forth in
112 the Open Publication License, v
1.0,
8 June
1999.
113 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.