Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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"> | |
5 | <refmeta> | |
6 | <refmetainfo> | |
7 | <copyright> | |
8 | <year>2010</year> | |
9 | <holder>Khronos Group</holder> | |
10 | </copyright> | |
11 | </refmetainfo> | |
12 | <refentrytitle>glBindBufferRange</refentrytitle> | |
13 | <manvolnum>3G</manvolnum> | |
14 | </refmeta> | |
15 | <refnamediv> | |
16 | <refname>glBindBufferRange</refname> | |
17 | <refpurpose>bind a range within a buffer object to an indexed buffer target</refpurpose> | |
18 | </refnamediv> | |
19 | <refsynopsisdiv><title>C Specification</title> | |
20 | <funcsynopsis> | |
21 | <funcprototype> | |
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> | |
28 | </funcprototype> | |
29 | </funcsynopsis> | |
30 | </refsynopsisdiv> | |
31 | <refsect1 id="parameters"><title>Parameters</title> | |
32 | <variablelist> | |
33 | <varlistentry> | |
34 | <term><parameter>target</parameter></term> | |
35 | <listitem> | |
36 | <para> | |
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>. | |
41 | </para> | |
42 | </listitem> | |
43 | </varlistentry> | |
44 | <varlistentry> | |
45 | <term><parameter>index</parameter></term> | |
46 | <listitem> | |
47 | <para> | |
48 | Specify the index of the binding point within the array specified by <parameter>target</parameter>. | |
49 | </para> | |
50 | </listitem> | |
51 | </varlistentry> | |
52 | <varlistentry> | |
53 | <term><parameter>buffer</parameter></term> | |
54 | <listitem> | |
55 | <para> | |
56 | The name of a buffer object to bind to the specified binding point. | |
57 | </para> | |
58 | </listitem> | |
59 | </varlistentry> | |
60 | <varlistentry> | |
61 | <term><parameter>offset</parameter></term> | |
62 | <listitem> | |
63 | <para> | |
64 | The starting offset in basic machine units into the buffer object <parameter>buffer</parameter>. | |
65 | </para> | |
66 | </listitem> | |
67 | </varlistentry> | |
68 | <varlistentry> | |
69 | <term><parameter>size</parameter></term> | |
70 | <listitem> | |
71 | <para> | |
72 | The amount of data in machine units that can be read from the buffet object while used as an indexed target. | |
73 | </para> | |
74 | </listitem> | |
75 | </varlistentry> | |
76 | </variablelist> | |
77 | </refsect1> | |
78 | <refsect1 id="description"><title>Description</title> | |
79 | <para> | |
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>. | |
89 | </para> | |
90 | <para> | |
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. | |
94 | </para> | |
95 | </refsect1> | |
96 | <refsect1 id="notes"><title>Notes</title> | |
97 | <para> | |
98 | The <constant>GL_ATOMIC_COUNTER_BUFER</constant> target is available only if the GL version is 4.2 or greater. | |
99 | </para> | |
100 | <para> | |
101 | The <constant>GL_SHADER_STORAGE_BUFFER</constant> target is available only if the GL version is 4.3 or greater. | |
102 | </para> | |
103 | </refsect1> | |
104 | <refsect1 id="errors"><title>Errors</title> | |
105 | <para> | |
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>. | |
110 | </para> | |
111 | <para> | |
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. | |
114 | </para> | |
115 | <para> | |
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>. | |
119 | </para> | |
120 | <para> | |
121 | Additional errors may be generated if <parameter>offset</parameter> violates any | |
122 | <parameter>target</parameter>-specific alignmemt restrictions. | |
123 | </para> | |
124 | </refsect1> | |
125 | <refsect1 id="seealso"><title>See Also</title> | |
126 | <para> | |
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>, | |
133 | </para> | |
134 | </refsect1> | |
135 | <refsect1 id="Copyright"><title>Copyright</title> | |
136 | <para> | |
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>. | |
141 | </para> | |
142 | </refsect1> | |
143 | </refentry> |