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>nngxDisplaybufferStorage</title>
8  </head>
9  <body>
10<h1><CODE>nngxDisplaybufferStorage</CODE> Function</h1>
11<h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14NNGX_APICALL void NNGX_APIENTRY nngxDisplaybufferStorage(
15     GLenum format,
16     GLsizei width,
17     GLsizei height,
18     GLenum area
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>format</th>
35<td>Display buffer format.</td>
36        </tr>
37        <tr>
38<td>in</td>
39<th>width</th>
40<td>Display buffer width (parallel to the scan lines).</td>
41        </tr>
42        <tr>
43<td>in</td>
44<th>height</th>
45<td>Display buffer height (perpendicular to the scan lines).</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>area</th>
50<td>Display buffer region.</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 a region for the display buffer bound to the active display target.</p><P>
58The allocated region stores image data to display.
59            </P><P>
60Set <SPAN class="argument">format</SPAN> to the following values for the display buffer format.
61<TABLE><TR><TH><CODE>GL_RGB8_OES</CODE></TH><TD>RGB8 (24 bits)</TD></TR><TR><TH><CODE>GL_RGBA4</CODE></TH><TD>RGBA4 (16 bits)</TD></TR><TR><TH><CODE>GL_RGB5_A1</CODE></TH><TD>RGBA5551 (16 bits)</TD></TR><TR><TH><CODE>GL_RGB565</CODE></TH><TD>RGB565 (16 bits)</TD></TR></TABLE></P><P>
62Set <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN> to the width and height of the display buffer. Both <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN> must be greater than 0. You must also set <SPAN class="argument">width</SPAN> and <SPAN class="argument">height</SPAN> to a multiple of the block size for the color buffer to transfer to the display buffer. This must be a multiple of 8 in 8-block mode and a multiple of 32 in 32-block mode.
63            </P><P>
64Set <CODE>area</CODE> to the following values to configure where the region is placed.
65<TABLE><TR><TH><CODE>NN_GX_MEM_FCRAM</CODE></TH><TD>Allocates the region in main memory.</TD></TR><TR><TH><CODE>NN_GX_MEM_VRAMA</CODE></TH><TD>Allocates the region in the A channel in VRAM.</TD></TR><TR><TH><CODE>NN_GX_MEM_VRAMB</CODE></TH><TD>Allocates the region in the B channel in VRAM.</TD></TR></TABLE></P><P><B><B>Note:</B></B> When you allocate the display buffer in VRAM, do not place it within the last 1.5 MB of the region for either the A channel or B channel. <BR>In <CODE>Development</CODE> and <CODE>Debug</CODE> builds, if the allocated display buffer overlaps with these regions at all and <CODE>nngxSwapBuffers</CODE> is called, an assert occurs.
66            </P><P>
67The following errors occur in this function.
68<TABLE><TR><TH><CODE>GL_ERROR_8021_DMP</CODE></TH><TD><CODE>0</CODE> was bound to the display target.</TD></TR><TR><TH><CODE>GL_ERROR_8022_DMP</CODE></TH><TD>The <SPAN class="argument">width</SPAN> or <SPAN class="argument">height</SPAN> argument was set to an invalid value.</TD></TR><TR><TH><CODE>GL_ERROR_8023_DMP</CODE></TH><TD>The <SPAN class="argument">format</SPAN> argument was set to an invalid value.</TD></TR><TR><TH><CODE>GL_ERROR_8024_DMP</CODE></TH><TD>The <SPAN class="argument">area</SPAN> argument was set to an invalid value.</TD></TR><TR><TH><CODE>GL_ERROR_8025_DMP</CODE></TH><TD>Failed to allocate the display buffer.</TD></TR></TABLE></P></div>
69<h2>Revision History</h2>
70    <div class="section">
71      <dl class="history">
72        <dt>2011/07/04</dt>
73<dd>Added a note about the assert issued on memory allocated for the display buffer.<BR>
74        </dd>
75        <dt>2011/02/01</dt>
76<dd>Deleted RGBA8 format.<br />
77        </dd>
78        <dt>2010/09/28</dt>
79<dd>Added <B>Note</B> about restricted ranges when allocating the buffer in VRAM.<br />
80        </dd>
81        <dt>2010/08/11</dt>
82<dd>Revised the description of each <SPAN class="argument">format</SPAN> value.
83        </dd>
84        <dt>2010/06/23</dt>
85<dd>Added <B>Note</B> about allowed ranges when allocating the buffer in VRAM.<br />
86        </dd>
87        <dt>2010/03/17</dt>
88<dd>Fixed an incorrect number of bits in the <CODE>GL_RGB8_OES</CODE> format; revised terminology.<br />
89        </dd>
90        <dt>2010/03/12</dt>
91<dd>Added extended error codes.<br />
92        </dd>
93        <dt>2010/01/07</dt>
94<dd>Initial version.<br />
95        </dd>
96      </dl>
97    </div>
98  <hr><p>CONFIDENTIAL</p></body>
99</html>