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