1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../css/manpage.css" type="text/css" />
7<title>glClear</title>
8  </head>
9  <body>
10<h1>glClear Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glClear(
15     GLbitfield mask
16);
17</pre>
18    </div>
19<h2>Parameters</h2>
20    <div class="section">
21      <table class="arguments">
22        <thead>
23          <tr>
24            <td width="15" />
25<th>Name</th>
26<td>Description</td>
27          </tr>
28        </thead>
29        <tr>
30<td>in</td>
31<th>mask</th>
32<td>Buffer-indication bits.</td>
33        </tr> </table>
34    </div>
35<h2>Return Values</h2>
36<div class="section">No values are returned. </div>
37<h2>Description</h2>
38    <div class="section">
39<p>Clears the various buffers attached to the current framebuffer.</p><P>
40Set <span class="argument">mask</span> to a bitwise OR of any of the following values.
41<TABLE><TR><TH>GL_COLOR_BUFFER_BIT</TH><TD>Clear the color buffer.</TD></TR><TR><TH>GL_DEPTH_BUFFER_BIT</TH><TD>Clear the depth buffer.</TD></TR><TR><TH>GL_STENCIL_BUFFER_BIT</TH><TD>Clear the stencil buffer.</TD></TR><TR><TH>GL_EARLY_DEPTH_BUFFER_BIT_DMP</TH><TD>Clear the early depth buffer.</TD></TR></TABLE><!-- source                      maskにはGL_COLOR_BUFFER_BIT、GL_DEPTH_BUFFER_BIT、GL_STENCIL_BUFFER_BIT、GL_EARLY_DEPTH_BUFFER_BIT_DMPを論理和で指定します。                 --></P><P>
42Because <code>GL_DEPTH24_STENCIL8_EXT</code> is the only supported stencil buffer format, if you specify <code>GL_STENCIL_BUFFER_BIT</code> you must also specify <code>GL_DEPTH_BUFFER_BIT</code>.
43            </P><P>
44A value of <code>GL_EARLY_DEPTH_BUFFER_BIT_DMP</code> is used to clear the early depth buffer. You cannot configure the early depth buffer to be cleared from POD.
45            </P><P>
46Scissoring set by <code>glScissor</code> and various buffer mask settings set by <code>glColorMask</code>, <code>glDepthMask</code>, and <code>glStencilMask</code> do not affect how the buffers are cleared by <code>glClear</code>. If a render buffer has not been set on the framebuffer's attachment point, clear operations are ignored.
47            </P><P>
48This function generates the following errors.
49<TABLE><TR><TH>GL_INVALID_VALUE</TH><TD>The <span class="argument">mask</span> argument was set to an invalid value.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">mask</span> argument specified <code>GL_STENCIL_BUFFER_BIT</code> without specifying <code>GL_DEPTH_BUFFER_BIT</code>.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>This function was called without any command-list objects bound.</TD></TR></TABLE><!-- source                      maskに不正な値を指定した場合エラーGL_INVALID_VALUEを生成します。 maskにGL_STENCIL_BUFFER_BITを指定し、GL_DEPTH_BUFFER_BITを指定しない場合エラーGL_INVALID_OPERATIONを生成します。 コマンドリストオブジェクトをバインドしていない状態で呼び出すとエラーGL_INVALID_OPERATIONを生成します。                 --></P></div>
50<h2>Revision History</h2>
51    <div class="section">
52      <dl class="history">
53        <dt>2010/01/07</dt>
54<dd>Initial version.<br />
55        </dd>
56      </dl>
57    </div>
58  <hr><p>CONFIDENTIAL</p></body>
59</html>