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>nngxSwapBuffers</title> 8 </head> 9 <body> 10<h1><CODE>nngxSwapBuffers</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14NNGX_APICALL void NNGX_APIENTRY nngxSwapBuffers( 15 GLenum display 16); 17</pre> 18 </div> 19<h2>Arguments</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>display</th> 32<td>Display to show.</td> 33 </tr> </table> 34 </div> 35<h2>Return Values</h2> 36<div class="section">There is no return value. </div> 37<h2>Description</h2> 38 <div class="section"> 39<p>Presets the display buffer bound to the <SPAN class="argument">display</SPAN> to be shown.</p><P> 40Set <SPAN class="argument">display</SPAN> to <CODE>NN_GX_DISPLAY0</CODE>, <CODE>NN_GX_DISPLAY1</CODE>, or <CODE>NN_GX_DISPLAY_BOTH</CODE> to show screen 0, screen 1, or both, respectively. 41</P><P>This function sets the address for the display buffer to be shown in the hardware. The value ultimately set in the hardware for the display buffer is calculated from data that includes the address allocated by the <CODE>nngxDisplaybufferStorage</CODE> function, the display buffer resolution, the pixel size, the LCD resolution, and the offset value set by the <CODE>nngxDisplayEnv</CODE> function. The address set in the hardware must be 16-byte aligned. 42 </P><P> 43Specify <CODE>NN_GX_DISPLAY0</CODE> for the <CODE>display</CODE> argument when the upper-screen display mode set by the <CODE>nngxSetDisplayMode</CODE> function is <CODE>NN_GX_DISPLAYMODE_STEREO</CODE> to preset the display with the display buffer bound to <CODE>NN_GX_DISPLAY0</CODE> for the left eye and to <CODE>NN_GX_DISPLAY0_EXT</CODE> for the right eye. 44 </P><P> 45The following errors occur in this function. 46<TABLE><TR><TH>GL_ERROR_8030_DMP</TH><TD>Invalid value specified for <SPAN class="argument">display</SPAN> (Including when <CODE>NN_GX_DISPLAY0_EXT</CODE> was specified.))</TD></TR><TR><TH>GL_ERROR_8031_DMP</TH><TD>Either <CODE>0</CODE> is bound to the current display buffer, or no memory has been allocated for the display buffer.</TD></TR><TR><TH>GL_ERROR_8031_DMP</TH><TD>The starting display coordinates specified by <CODE>nngxDisplayEnv</CODE> point outside of the display buffer.</TD></TR><TR><TH>GL_ERROR_8053_DMP</TH><TD>The final display buffer address calculated from the offset value specified by the <CODE>nngxDisplayEnv</CODE> function was not 16-byte aligned.</TD></TR><TR><TH>GL_ERROR_9000_DMP</TH><TD>When the display mode is set to <CODE>NN_GX_DISPLAYMODE_STEREO</CODE>, either <CODE>0</CODE> is bound to <CODE>NN_GX_DISPLAY0_EXT</CODE> or no memory has been allocated for the display buffer.</TD></TR><TR><TH>GL_ERROR_9001_DMP</TH><TD>When the display mode is set to <CODE>NN_GX_DISPLAYMODE_STEREO</CODE>, the display region specified by <CODE>nngxDisplayEnv</CODE> lies outside the display buffer.</TD></TR><TR><TH>GL_ERROR_9002_DMP</TH><TD>When the display mode is set to <CODE>NN_GX_DISPLAYMODE_STEREO</CODE>, either the display buffer resolutions, formats, or memory regions for the display buffers bound to <CODE>NN_GX_DISPLAY0</CODE> and <CODE>NN_GX_DISPLAY0_EXT</CODE> do not match.</TD></TR></TABLE></P></div> 47<h2>Revision History</h2> 48 <div class="section"> 49 <dl class="history"> 50 <dt>2010/04/14</dt> 51<dd>Added descriptions of display modes and of address restrictions for display buffers.<br /> 52 </dd> 53 <dt>2010/03/12</dt> 54<dd>Added extended error codes.<br /> 55 </dd> 56 <dt>2010/01/07</dt> 57<dd>Initial version.<br /> 58 </dd> 59 </dl> 60 </div> 61 <hr><p>CONFIDENTIAL</p></body> 62</html>