e8a54f25a289aa4572c5867ed34e8e5faa258fc5
[clinton/guile-figl.git] / upstream-man-pages / man4 / glClearBufferData.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="glClearBufferData">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2012</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glClearBufferData</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glClearBufferData</refname>
17 <refpurpose>fill a 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>glClearBufferData</function></funcdef>
23 <paramdef>GLenum <parameter>target</parameter></paramdef>
24 <paramdef>GLenum <parameter>internalformat</parameter></paramdef>
25 <paramdef>GLenum <parameter>format</parameter></paramdef>
26 <paramdef>GLenum <parameter>type</parameter></paramdef>
27 <paramdef>const void * <parameter>data</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 operation. <parameter>target</parameter> must be
38 one of the global buffer binding targets.
39 </para>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term><parameter>internalformat</parameter></term>
44 <listitem>
45 <para>
46 The internal format with which the data will be stored in the buffer object.
47 </para>
48 </listitem>
49 </varlistentry>
50 <varlistentry>
51 <term><parameter>size</parameter></term>
52 <listitem>
53 <para>
54 The size, in basic machine units of the range of the data store to fill.
55 </para>
56 </listitem>
57 </varlistentry>
58 <varlistentry>
59 <term><parameter>format</parameter></term>
60 <listitem>
61 <para>
62 The format of the data in memory addressed by <parameter>data</parameter>.
63 </para>
64 </listitem>
65 </varlistentry>
66 <varlistentry>
67 <term><parameter>type</parameter></term>
68 <listitem>
69 <para>
70 The type of the data in memory addressed by <parameter>data</parameter>.
71 </para>
72 </listitem>
73 </varlistentry>
74 <varlistentry>
75 <term><parameter>data</parameter></term>
76 <listitem>
77 <para>
78 The address of a memory location storing the data to be replicated into the
79 buffer's data store.
80 </para>
81 </listitem>
82 </varlistentry>
83 </variablelist>
84 </refsect1>
85 <refsect1 id="description"><title>Description</title>
86 <para>
87 <function>glClearBufferData</function> fills the entirety of a buffer object's
88 data store with data from client memory. Data, initially supplied in a format
89 specified by <parameter>format</parameter> in data type <parameter>type</parameter> is
90 read from the memory address given by <parameter>data</parameter> and converted into
91 the internal representation given by <parameter>internalforamt</parameter>.
92 This converted data is then replicated throughout the buffer object's
93 data store.
94 </para>
95 <para>
96 If <parameter>data</parameter> is NULL, then the buffer's data store
97 is filled with zeros.
98 </para>
99 </refsect1>
100 <refsect1 id="errors"><title>Errors</title>
101 <para>
102 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> not one of the generic buffer binding targets.
103 </para>
104 <para>
105 <constant>GL_INVALID_VALUE</constant> is generated if no buffer is bound to <parameter>target</parameter>.
106 </para>
107 <para>
108 <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a sized internal format.
109 </para>
110 <para>
111 <constant>GL_INVALID_OPERATION</constant> is generated if any part of the buffer's data store is
112 mapped with <citerefentry><refentrytitle>glMapBufferRange</refentrytitle></citerefentry> or <citerefentry><refentrytitle>glMapBuffer.</refentrytitle></citerefentry>
113 </para>
114 </refsect1>
115 <refsect1 id="seealso"><title>See Also</title>
116 <para>
117 <citerefentry><refentrytitle>glClearBufferSubData</refentrytitle></citerefentry>.
118 </para>
119 </refsect1>
120 <refsect1 id="Copyright"><title>Copyright</title>
121 <para>
122 Copyright <trademark class="copyright"></trademark> 2011-2012 Khronos Group.
123 This material may be distributed subject to the terms and conditions set forth in
124 the Open Publication License, v 1.0, 8 June 1999.
125 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
126 </para>
127 </refsect1>
128 </refentry>