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>glFramebufferRenderbuffer</title>
8  </head>
9  <body>
10<h1>glFramebufferRenderbuffer Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer(
15     GLenum target,
16     GLenum attachment,
17     GLenum renderbuffertarget,
18     GLuint renderbuffer
19);
20</pre>
21    </div>
22<h2>Arguments</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 framebuffer</td>
36        </tr>
37        <tr>
38<td>in</td>
39<th>attachment</th>
40<td>Attachment point</td>
41        </tr>
42        <tr>
43<td>in</td>
44<th>renderbuffertarget</th>
45<td>Target render buffer</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>renderbuffer</th>
50<td>Render buffer object</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>Attaches a render buffer to the current framebuffer.</p><P>
58Set <span class="argument">target</span> to <code>GL_FRAMEBUFFER</code>.
59            </P><P>
60Set <span class="argument">attachment</span> to <code>GL_COLOR_ATTACHMENT0</code>, <code>GL_DEPTH_ATTACHMENT</code>, or <code>GL_DEPTH_STENCIL_ATTACHMENT</code> to attach the render buffer to the color buffer, depth buffer, or depth buffer and stencil buffer, respectively.
61            </P><P>
62Set <span class="argument">renderbuffertarget</span> to <code>GL_RENDERBUFFER</code>.
63            </P><P>
64Set <span class="argument">renderbuffer</span> to the render buffer object to attach. Set <span class="argument">renderbuffer</span> to 0 to detach an object.
65            </P><P>
66From some POD environments, it is not possible to attach a render buffer in the <code>GL_DEPTH24_STENCIL8_EXT</code> format to <code>GL_DEPTH_STENCIL_ATTACHMENT</code>. In a situation like this, you must call this function twice: once with <span class="argument">attachment</span> set to <code>GL_DEPTH_ATTACHMENT</code> and once with <span class="argument">attachment</span> set to <code>GL_STENCIL_ATTACHMENT</code>. Use <code>glCheckFramebufferStatus</code> to determine whether it was attached successfully.
67            </P><P>
68This function generates the following errors.
69<TABLE><TR><TH>GL_INVALID_ENUM</TH><TD>The <span class="argument">target</span>, <span class="argument">attachment</span>, or <span class="argument">renderbuffertarget</span> argument was set to an invalid value.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>0 is bound to the current framebuffer in POD.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">renderbuffer</span> argument specifies an invalid render buffer object.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">attachment</span> argument is <code>GL_COLOR_ATTACHMENT0</code>, but the format of <span class="argument">renderbuffer</span> is not <code>GL_RGB8_OES</code>, <code>GL_RGBA8_OES</code>, <code>GL_RGBA4</code>, <code>GL_RGB565</code>, <code>GL_RGB5_A1</code>, or <code>GL_GAS_DMP</code>.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">attachment</span> argument is <code>GL_DEPTH_ATTACHMENT</code>, but the format of <span class="argument">renderbuffer</span> is not <code>GL_DEPTH_COMPONENT16</code>, <code>GL_DEPTH_COMPONENT24_OES</code>, or <code>GL_DEPTH24_STENCIL8_EXT</code>.</TD></TR><TR><TH>GL_INVALID_OPERATION</TH><TD>The <span class="argument">attachment</span> argument is <code>GL_STENCIL_ATTACHMENT</code>, but the format of <span class="argument">renderbuffer</span> is not <code>GL_DEPTH24_STENCIL8_EXT</code>.</TD></TR></TABLE><!-- source                     target、attachment、renderbuffertargetに不正な値を指定した場合エラーGL_INVALID_ENUMを生成します。 PODではカレントのフレームバッファに0がバインドされている場合エラーGL_INVALID_OPERATIONを生成します。 renderbufferが不正なレンダーバッファオブジェクトの場合エラーGL_INVALID_OPERATIONを生成します。                     renderbufferのフォーマットがGL_RGB8_OES、GL_RGBA8_OES、GL_RGBA4、GL_RGB565、GL_RGB5_A1、GL_GAS_DMP以外で、 かつattachmentがGL_COLOR_ATTACHMENT0の場合エラーGL_INVALID_OPERATIONを生成します。 renderbufferのフォーマットがGL_DEPTH_COMPONENT16、GL_DEPTH_COMPONENT24_OES、GL_DEPTH24_STENCIL8_EXT以外で、 かつattachmentがGL_DEPTH_ATTACHMENTの場合エラーGL_INVALID_OPERATIONを生成します。 renderbufferのフォーマットがGL_DEPTH24_STENCIL8_EXT以外で、 かつattachmentがGL_STENCIL_ATTACHMENTの場合エラーGL_INVALID_OPERATIONを生成します。                 --></P></div>
70<h2>Revision History</h2>
71    <div class="section">
72      <dl class="history">
73        <dt>2010/01/07</dt>
74<dd>Initial version.<br />
75        </dd>
76      </dl>
77    </div>
78  <hr><p>CONFIDENTIAL</p></body>
79</html>