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=
"glBindBufferRange">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glBindBufferRange
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glBindBufferRange
</refname>
17 <refpurpose>bind a range within a buffer object to an indexed buffer target
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glBindBufferRange
</function></funcdef>
23 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>index
</parameter></paramdef>
25 <paramdef>GLuint
<parameter>buffer
</parameter></paramdef>
26 <paramdef>GLintptr
<parameter>offset
</parameter></paramdef>
27 <paramdef>GLsizeiptr
<parameter>size
</parameter></paramdef>
31 <refsect1 id=
"parameters"><title>Parameters
</title>
34 <term><parameter>target
</parameter></term>
37 Specify the target of the bind operation.
<parameter>target
</parameter> must be
38 either
<constant>GL_TRANSFORM_FEEDBACK_BUFFER
</constant> or
<constant>GL_UNIFORM_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.
59 <term><parameter>offset
</parameter></term>
62 The starting offset in basic machine units into the buffer object
<parameter>buffer
</parameter>.
67 <term><parameter>size
</parameter></term>
70 The amount of data in machine units that can be read from the buffet object while used as an indexed target.
76 <refsect1 id=
"description"><title>Description
</title>
78 <function>glBindBufferRange
</function> binds a range the buffer object
<parameter>buffer
</parameter>
79 represented by
<parameter>offset
</parameter> and
<parameter>size
</parameter> to the
80 binding point at index
<parameter>index
</parameter> of the array of targets specified by
<parameter>target
</parameter>.
81 Each
<parameter>target
</parameter> represents an indexed array of buffer binding points, as well
82 as a single general binding point that can be used by other buffer manipulation functions such as
83 <citerefentry><refentrytitle>glBindBuffer
</refentrytitle></citerefentry> or
84 <citerefentry><refentrytitle>glMapBuffer
</refentrytitle></citerefentry>. In addition to binding
85 a range of
<parameter>buffer
</parameter> to the indexed buffer binding target,
<function>glBindBufferRange
</function>
86 also binds the range to the generic buffer binding point specified by
<parameter>target
</parameter>.
89 <parameter>offset
</parameter> specifies the offset in basic machine units into the buffer object
90 <parameter>buffer
</parameter> and
<parameter>size
</parameter> specifies the amount of data that
91 can be read from the buffer object while used as an indexed target.
94 <refsect1 id=
"errors"><title>Errors
</title>
96 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not
97 <constant>GL_TRANSFORM_FEEDBACK_BUFFER
</constant> or
<constant>GL_UNIFORM_BUFFER
</constant>.
100 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>index
</parameter> is greater
101 than or equal to the number of
<parameter>target
</parameter>-specific indexed binding points.
104 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>size
</parameter> is less than
105 or equal to zero, or if
<parameter>offset
</parameter> +
<parameter>size
</parameter> is greater
106 than the value of
<constant>GL_BUFFER_SIZE
</constant>.
109 Additional errors may be generated if
<parameter>offset
</parameter> violates any
110 <parameter>target
</parameter>-specific alignmemt restrictions.
113 <refsect1 id=
"seealso"><title>See Also
</title>
115 <citerefentry><refentrytitle>glGenBuffers
</refentrytitle></citerefentry>,
116 <citerefentry><refentrytitle>glDeleteBuffers
</refentrytitle></citerefentry>,
117 <citerefentry><refentrytitle>glBindBuffer
</refentrytitle></citerefentry>,
118 <citerefentry><refentrytitle>glBindBufferBase
</refentrytitle></citerefentry>,
119 <citerefentry><refentrytitle>glMapBuffer
</refentrytitle></citerefentry>,
120 <citerefentry><refentrytitle>glUnmapBuffer
</refentrytitle></citerefentry>,
123 <refsect1 id=
"Copyright"><title>Copyright
</title>
125 Copyright
<trademark class=
"copyright"></trademark> 2010 Khronos Group.
126 This material may be distributed subject to the terms and conditions set forth in
127 the Open Publication License, v
1.0,
8 June
1999.
128 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.