d09816ba567e293a2a67c351ed0699435ebe1206
[clinton/guile-figl.git] / upstream-man-pages / man4 / glBindVertexBuffer.xml
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">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2012</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glBindVertexBuffer</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glBindVertexBuffer</refname>
17 <refpurpose>bind a buffer to a vertex buffer bind point</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
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>
27 </funcprototype>
28 </funcsynopsis>
29 </refsynopsisdiv>
30 <refsect1 id="parameters"><title>Parameters</title>
31 <variablelist>
32 <varlistentry>
33 <term><parameter>bindingindex</parameter></term>
34 <listitem>
35 <para>
36 The index of the vertex buffer binding point to which to bind the buffer.
37 </para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>buffer</parameter></term>
42 <listitem>
43 <para>
44 The name of an existing buffer to bind to the vertex buffer binding point.
45 </para>
46 </listitem>
47 </varlistentry>
48 <varlistentry>
49 <term><parameter>offset</parameter></term>
50 <listitem>
51 <para>
52 The offset of the first element of the buffer.
53 </para>
54 </listitem>
55 </varlistentry>
56 <varlistentry>
57 <term><parameter>stride</parameter></term>
58 <listitem>
59 <para>
60 The distance between elements within the buffer.
61 </para>
62 </listitem>
63 </varlistentry>
64 </variablelist>
65 </refsect1>
66 <refsect1 id="description"><title>Description</title>
67 <para>
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.
76 </para>
77 </refsect1>
78 <refsect1 id="errors"><title>Errors</title>
79 <para>
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>.
82 </para>
83 <para>
84 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or <parameter>stride</parameter>
85 is less than zero.
86 </para>
87 <para>
88 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>buffer</parameter> is not the name of an
89 existing buffer object.
90 </para>
91 <para>
92 <constant>GL_INVALID_OPERATION</constant> is generated if no vertex array object is bound.
93 </para>
94 </refsect1>
95 <refsect1 id="associatedgets"><title>Associated Gets</title>
96 <para>
97 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_MAX_VERTEX_ATTRIB_BINDINGS</constant>.
98 </para>
99 </refsect1>
100 <refsect1 id="seealso"><title>See Also</title>
101 <para>
102 <citerefentry><refentrytitle>glVertexAttribBinding</refentrytitle></citerefentry>,
103 <citerefentry><refentrytitle>glVertexAttribFormat</refentrytitle></citerefentry>,
104 <citerefentry><refentrytitle>glVertexAttribPointer</refentrytitle></citerefentry>,
105 <citerefentry><refentrytitle>glVertexBindingDivisor</refentrytitle></citerefentry>.
106 </para>
107 </refsect1>
108 <refsect1 id="Copyright"><title>Copyright</title>
109 <para>
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>.
114 </para>
115 </refsect1>
116 </refentry>