include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man3 / glBindBufferRange.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="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 either <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant> or <constant>GL_UNIFORM_BUFFER</constant>.
39 </para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>index</parameter></term>
44 <listitem>
45 <para>
46 Specify the index of the binding point within the array specified by <parameter>target</parameter>.
47 </para>
48 </listitem>
49 </varlistentry>
50 <varlistentry>
51 <term><parameter>buffer</parameter></term>
52 <listitem>
53 <para>
54 The name of a buffer object to bind to the specified binding point.
55 </para>
56 </listitem>
57 </varlistentry>
58 <varlistentry>
59 <term><parameter>offset</parameter></term>
60 <listitem>
61 <para>
62 The starting offset in basic machine units into the buffer object <parameter>buffer</parameter>.
63 </para>
64 </listitem>
65 </varlistentry>
66 <varlistentry>
67 <term><parameter>size</parameter></term>
68 <listitem>
69 <para>
70 The amount of data in machine units that can be read from the buffet object while used as an indexed target.
71 </para>
72 </listitem>
73 </varlistentry>
74 </variablelist>
75 </refsect1>
76 <refsect1 id="description"><title>Description</title>
77 <para>
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>.
87 </para>
88 <para>
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.
92 </para>
93 </refsect1>
94 <refsect1 id="errors"><title>Errors</title>
95 <para>
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>.
98 </para>
99 <para>
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.
102 </para>
103 <para>
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>.
107 </para>
108 <para>
109 Additional errors may be generated if <parameter>offset</parameter> violates any
110 <parameter>target</parameter>-specific alignmemt restrictions.
111 </para>
112 </refsect1>
113 <refsect1 id="seealso"><title>See Also</title>
114 <para>
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>,
121 </para>
122 </refsect1>
123 <refsect1 id="Copyright"><title>Copyright</title>
124 <para>
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>.
129 </para>
130 </refsect1>
131 </refentry>