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>glRenderbufferStorage</title>
8  </head>
9  <body>
10<h1><CODE>glRenderbufferStorage</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glRenderbufferStorage(
15     GLenum target,
16     GLenum internalformat,
17     GLsizei width,
18     GLsizei height
19);
20</pre>
21    </div>
22<h2>Parameters</h2>
23    <div class="section">
24      <table class="arguments">
25        <thead>
26          <tr>
27            <td width="15" />
28<th>Name</th>
29<td>Description</td>
30          </tr>
31        </thead>
32        <tr>
33<td>in</td>
34<th>target</th>
35<td>Target render buffer object</td>
36        </tr>
37        <tr>
38<td>in</td>
39<th>internalformat</th>
40<td>Format of the region to allocate</td>
41        </tr>
42        <tr>
43<td>in</td>
44<th>width</th>
45<td>Width of the region to allocate</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>height</th>
50<td>Height of the region to allocate</td>
51        </tr> </table>
52    </div>
53<h2>Return Values</h2>
54<div class="section">No values are returned. </div>
55<h2>Description</h2>
56    <div class="section">
57<p>Allocates the data region for the current render buffer object.</p><P>
58Set <span class="argument">target</span> to <code>GL_RENDERBUFFER</code>. To also specify the data region, set <code>target</code> to a bitwise OR that includes the following values.
59<UL><LI><code>NN_GX_MEM_VRAMA</code>: Allocate a region in VRAMA.</LI><LI><code>NN_GX_MEM_VRAMB</code>: Allocate a region in VRAMB.</LI></UL>
60If you do not specify the above values, <code>NN_GX_MEM_VRAMA</code> is applied. You cannot specify the data region with POD.
61            </P><P>
62Set <code>internalformat</code> to the internal format. You can set <code>internalformat</code> to the following values.
63<TABLE><TR><TH>GL_RGBA8_OES</TH><TD>A 32-bit format that uses 8 bits for each of the RGBA components.</TD></TR><TR><TH>GL_RGB565</TH><TD>A 16-bit format that uses 5-bit red, 6-bit green, and 5-bit blue components.</TD></TR><TR><TH>GL_RGBA4</TH><TD>A 16-bit format that uses 4 bits for each of the RGBA components.</TD></TR><TR><TH>GL_RGB5_A1</TH><TD>A 16-bit format that uses 5 bits for each of the RGB components and 1 bit for the alpha component.</TD></TR><TR><TH>GL_GAS_DMP</TH><TD>A 32-bit format that uses 16 bits for each of the D1 and D2 density information components.</TD></TR><TR><TH>GL_DEPTH_COMPONENT16</TH><TD>A 16-bit format for the depth component.</TD></TR><TR><TH>GL_DEPTH_COMPONENT24_OES</TH><TD>A 24-bit format for the depth component.</TD></TR><TR><TH>GL_DEPTH24_STENCIL8_EXT</TH><TD>A 32-bit format that uses a 24-bit depth component and an 8-bit stencil component.</TD></TR></TABLE>
64You cannot specify <code>GL_STENCIL_INDEX8</code> from the OpenGL ES 2.0 standard. <!-- source                      internalformatで内部フォーマットを指定します。internalformatにはGL_RGBA8_OES、GL_RGB565、GL_RGBA4、GL_RGB5_A1、GL_GAS_DMP、GL_DEPTH_COMPONENT16、 GL_DEPTH_COMPONENT24_OES、GL_DEPTH24_STENCIL8_EXTが指定できます。OpenGLES2.0標準のGL_STENCIL_INDEX8は指定できません。GL_RGBA8_OESの場合、赤緑青アルファ各成分8ビットずつの32ビットフォーマットになります。 GL_RGB565の場合、赤が5ビット、緑が6ビット、青が5ビットの16ビットフォーマットになります。 GL_RGBA4の場合、赤緑青アルファ各成分が4ビットずつの16ビットフォーマットになります。 GL_RGB5_A1の場合、赤緑青各成分が5ビット、アルファが1ビットの16ビットフォーマットになります。 GL_GAS_DMPの場合、密度情報D1、D2各16ビットの32ビットフォーマットになります。 GL_DEPTH_COMPONENT16の場合、デプス成分が16ビットのフォーマットになります。 GL_DEPTH_COMPONENT24_OESの場合、デプス成分が24ビットのフォーマットになります。 GL_DEPTH24_STENCIL8_EXTの場合、デプス成分が24ビット、ステンシル成分が8ビットの32ビットフォーマットになります。                 --></P><P>
65Set <code>width</code> and <code>height</code> to the width and height of the render buffer.
66            </P><P>
67This function generates the following errors.
68<TABLE><TR><TH>GL_INVALID_ENUM</TH><TD>The <code>target</code> or <code>internalformat</code> argument was set to an invalid value.</TD></TR><TR><TH>GL_INVALID_VALUE</TH><TD>The <code>width</code> or <code>height</code> argument is negative, or the maximum supported size was exceeded.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>No render buffer is currently bound.</TD></TR><TR><TH>GL_OUT_OF_MEMORY</TH><TD>Failed to allocate the render buffer region.</TD></TR></TABLE><!-- source                      target、internalformatに不正な値を指定した場合エラーGL_INVALID_ENUMを生成します。 width、heightが負の値の場合、またはサポートされている最大サイズを超える場合エラーGL_INVALID_VALUEを生成します。 サポートされている最大サイズはglGetIntegervにGL_MAX_RENDERBUFFER_SIZEを指定することで取得できます。 カレントにレンダーバッファがバインドされていない場合エラーGL_INVALID_OPERATIONを生成します。 レンダーバッファの領域の確保に失敗した場合エラーGL_OUT_OF_MEMORYを生成します。                 --></P></div>
69<h2>Revision History</h2>
70    <div class="section">
71      <dl class="history">
72        <dt>2010/01/07</dt>
73<dd>Initial version.<br />
74        </dd>
75      </dl>
76    </div>
77  <hr><p>CONFIDENTIAL</p></body>
78</html>