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>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>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 (in the direction of scan lines).</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th>height</th> 45<td>Display buffer height (in the vertical direction relative to 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_RGBA8_OES</CODE></TH><TD>RGBA8 (32-bit)</TD></TR><TR><TH><CODE>GL_RGB8_OES</CODE></TH><TD>RGB8 (24-bit)</TD></TR><TR><TH><CODE>GL_RGBA4</CODE></TH><TD>RGBA4 (16-bit)</TD></TR><TR><TH><CODE>GL_RGB5_A1</CODE></TH><TD>RGBA5551 (16-bit)</TD></TR><TR><TH><CODE>GL_RGB565</CODE></TH><TD>RGB565 (16-bit)</TD></TR></TABLE><!-- source GL_RGBA8_OES ・・・ R8G8B8A8の32bit GL_RGB8_OES ・・・ R8G8B8の32bit GL_RGBA4 ・・・ R4G4B4A4の16bit GL_RGB5_A1 ・・・ R5G5B5A1の16bit GL_RGB565 ・・・ R5G6B5の16bit --></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 <SPAN class="argument">area</SPAN> to the following values to configure where the region is placed.<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><!-- source NN_GX_MEM_FCRAM ・・・ FCRAMに領域を確保 NN_GX_MEM_VRAMA ・・・ VRAMのAチャネルに領域を確保 NN_GX_MEM_VRAMB ・・・ VRAMのBチャネルに領域を確保 --></P><P><B><B>Note:</B></B> If you allocate the display buffer in VRAM, you cannot place the buffer within the last 1.5 MB of either the A-channel or B-channel region. 65 </P><P> 66The following errors occur in this function. 67<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> 68<h2>Revision History</h2> 69 <div class="section"> 70 <dl class="history"> 71 <dt>2010/09/28</dt> 72<dd>Added <B>Note</B> about restricted ranges when allocating the buffer in VRAM.<br /> 73 </dd> 74 <dt>2010/08/11</dt> 75<dd>Revised the description of each <SPAN class="argument">format</SPAN> value. 76 </dd> 77 <dt>2010/06/23</dt> 78<dd>Added <B>Note</B> about allowed ranges when allocating the buffer in VRAM.<br /> 79 </dd> 80 <dt>2010/03/17</dt> 81<dd>Fixed an incorrect number of bits in the <CODE>GL_RGB8_OES</CODE> format; revised terminology.<br /> 82 </dd> 83 <dt>2010/03/12</dt> 84<dd>Added extended error codes.<br /> 85 </dd> 86 <dt>2010/01/07</dt> 87<dd>Initial version.<br /> 88 </dd> 89 </dl> 90 </div> 91 <hr><p>CONFIDENTIAL</p></body> 92</html>