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 one of
<constant>GL_ATOMIC_COUNTER_BUFFER
</constant>,
39 <constant>GL_TRANSFORM_FEEDBACK_BUFFER
</constant>,
<constant>GL_UNIFORM_BUFFER
</constant>,
40 or
<constant>GL_SHADER_STORAGE_BUFFER
</constant>.
45 <term><parameter>index
</parameter></term>
48 Specify the index of the binding point within the array specified by
<parameter>target
</parameter>.
53 <term><parameter>buffer
</parameter></term>
56 The name of a buffer object to bind to the specified binding point.
61 <term><parameter>offset
</parameter></term>
64 The starting offset in basic machine units into the buffer object
<parameter>buffer
</parameter>.
69 <term><parameter>size
</parameter></term>
72 The amount of data in machine units that can be read from the buffet object while used as an indexed target.
78 <refsect1 id=
"description"><title>Description
</title>
80 <function>glBindBufferRange
</function> binds a range the buffer object
<parameter>buffer
</parameter>
81 represented by
<parameter>offset
</parameter> and
<parameter>size
</parameter> to the
82 binding point at index
<parameter>index
</parameter> of the array of targets specified by
<parameter>target
</parameter>.
83 Each
<parameter>target
</parameter> represents an indexed array of buffer binding points, as well
84 as a single general binding point that can be used by other buffer manipulation functions such as
85 <citerefentry><refentrytitle>glBindBuffer
</refentrytitle></citerefentry> or
86 <citerefentry><refentrytitle>glMapBuffer
</refentrytitle></citerefentry>. In addition to binding
87 a range of
<parameter>buffer
</parameter> to the indexed buffer binding target,
<function>glBindBufferRange
</function>
88 also binds the range to the generic buffer binding point specified by
<parameter>target
</parameter>.
91 <parameter>offset
</parameter> specifies the offset in basic machine units into the buffer object
92 <parameter>buffer
</parameter> and
<parameter>size
</parameter> specifies the amount of data that
93 can be read from the buffer object while used as an indexed target.
96 <refsect1 id=
"notes"><title>Notes
</title>
98 The
<constant>GL_ATOMIC_COUNTER_BUFER
</constant> target is available only if the GL version is
4.2 or greater.
101 The
<constant>GL_SHADER_STORAGE_BUFFER
</constant> target is available only if the GL version is
4.3 or greater.
104 <refsect1 id=
"errors"><title>Errors
</title>
106 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not
107 one of
<constant>GL_ATOMIC_COUNTER_BUFFER
</constant>,
108 <constant>GL_TRANSFORM_FEEDBACK_BUFFER
</constant>,
<constant>GL_UNIFORM_BUFFER
</constant> or
109 <constant>GL_SHADER_STORAGE_BUFFER
</constant>.
112 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>index
</parameter> is greater
113 than or equal to the number of
<parameter>target
</parameter>-specific indexed binding points.
116 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>size
</parameter> is less than
117 or equal to zero, or if
<parameter>offset
</parameter> +
<parameter>size
</parameter> is greater
118 than the value of
<constant>GL_BUFFER_SIZE
</constant>.
121 Additional errors may be generated if
<parameter>offset
</parameter> violates any
122 <parameter>target
</parameter>-specific alignmemt restrictions.
125 <refsect1 id=
"seealso"><title>See Also
</title>
127 <citerefentry><refentrytitle>glGenBuffers
</refentrytitle></citerefentry>,
128 <citerefentry><refentrytitle>glDeleteBuffers
</refentrytitle></citerefentry>,
129 <citerefentry><refentrytitle>glBindBuffer
</refentrytitle></citerefentry>,
130 <citerefentry><refentrytitle>glBindBufferBase
</refentrytitle></citerefentry>,
131 <citerefentry><refentrytitle>glMapBuffer
</refentrytitle></citerefentry>,
132 <citerefentry><refentrytitle>glUnmapBuffer
</refentrytitle></citerefentry>,
135 <refsect1 id=
"Copyright"><title>Copyright
</title>
137 Copyright
<trademark class=
"copyright"></trademark> 2010-
2011 Khronos Group.
138 This material may be distributed subject to the terms and conditions set forth in
139 the Open Publication License, v
1.0,
8 June
1999.
140 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.