include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / man4 / glClearBufferSubData.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="glClearBufferSubData">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2012</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glClearBufferSubData</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glClearBufferSubData</refname>
17 <refpurpose>fill all or part of buffer object's data store with a fixed value</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glClearBufferSubData</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
25 <paramdef>GLintptr <parameter>offset</parameter></paramdef>
26 <paramdef>GLsizeiptr <parameter>size</parameter></paramdef>
27 <paramdef>GLenum <parameter>format</parameter></paramdef>
28 <paramdef>GLenum <parameter>type</parameter></paramdef>
29 <paramdef>const void * <parameter>data</parameter></paramdef>
30 </funcprototype>
31 </funcsynopsis>
32 </refsynopsisdiv>
33 <refsect1 id="parameters"><title>Parameters</title>
34 <variablelist>
35 <varlistentry>
36 <term><parameter>target</parameter></term>
37 <listitem>
38 <para>
39 Specify the target of the operation. <parameter>target</parameter> must be
40 one of the global buffer binding targets.
41 </para>
42 </listitem>
43 </varlistentry>
44 <varlistentry>
45 <term><parameter>internalformat</parameter></term>
46 <listitem>
47 <para>
48 The internal format with which the data will be stored in the buffer object.
49 </para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term><parameter>offset</parameter></term>
54 <listitem>
55 <para>
56 The offset, in basic machine units into the buffer object's data store at which to start filling.
57 </para>
58 </listitem>
59 </varlistentry>
60 <varlistentry>
61 <term><parameter>size</parameter></term>
62 <listitem>
63 <para>
64 The size, in basic machine units of the range of the data store to fill.
65 </para>
66 </listitem>
67 </varlistentry>
68 <varlistentry>
69 <term><parameter>format</parameter></term>
70 <listitem>
71 <para>
72 The format of the data in memory addressed by <parameter>data</parameter>.
73 </para>
74 </listitem>
75 </varlistentry>
76 <varlistentry>
77 <term><parameter>type</parameter></term>
78 <listitem>
79 <para>
80 The type of the data in memory addressed by <parameter>data</parameter>.
81 </para>
82 </listitem>
83 </varlistentry>
84 <varlistentry>
85 <term><parameter>data</parameter></term>
86 <listitem>
87 <para>
88 The address of a memory location storing the data to be replicated into the
89 buffer's data store.
90 </para>
91 </listitem>
92 </varlistentry>
93 </variablelist>
94 </refsect1>
95 <refsect1 id="description"><title>Description</title>
96 <para>
97 <function>glClearBufferSubData</function> fills a specified region of a buffer object's
98 data store with data from client memory. <parameter>offset</parameter> and <parameter>size</parameter>
99 demark the extent of the region within the data store of the buffer object bound to
100 <parameter>target</parameter> to fill with data. Data, initially supplied in a format
101 specified by <parameter>format</parameter> in data type <parameter>type</parameter> is
102 read from the memory address given by <parameter>data</parameter> and converted into
103 the internal representation given by <parameter>internalforamt</parameter>.
104 This converted data is then replicated throughout the specified region of the buffer object's
105 data store.
106 </para>
107 <para>
108 If <parameter>data</parameter> is NULL, then the subrange of the buffer's data store
109 is filled with zeros.
110 </para>
111 </refsect1>
112 <refsect1 id="errors"><title>Errors</title>
113 <para>
114 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> not one of the generic buffer binding targets.
115 </para>
116 <para>
117 <constant>GL_INVALID_VALUE</constant> is generated if no buffer is bound to <parameter>target</parameter>.
118 </para>
119 <para>
120 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a sized internal format.
121 </para>
122 <para>
123 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or <parameter>range</parameter> are not multiples of
124 the number of basic machine units per-element for the internal format specified by
125 <parameter>internalformat</parameter>.
126 </para>
127 <para>
128 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or <parameter>size</parameter> is less than zero, or if
129 <parameter>offset</parameter> + <parameter>size</parameter> is greater than the value of <constant>GL_BUFFER_SIZE</constant> for the buffer bound to <parameter>target</parameter>.
130 </para>
131 <para>
132 <constant>GL_INVALID_OPERATION</constant> is generated if any part of the specified buffer range is
133 mapped with <citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>.
134 </para>
135 </refsect1>
136 <refsect1 id="seealso"><title>See Also</title>
137 <para>
138 <citerefentry><refentrytitle>glClearBufferData</refentrytitle></citerefentry>.
139 </para>
140 </refsect1>
141 <refsect1 id="Copyright"><title>Copyright</title>
142 <para>
143 Copyright <trademark class="copyright"></trademark> 2012 Khronos Group.
144 This material may be distributed subject to the terms and conditions set forth in
145 the Open Publication License, v 1.0, 8 June 1999.
146 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
147 </para>
148 </refsect1>
149 </refentry>