1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>G3*_SwapBuffers</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">G3*_SwapBuffers <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19<PRE>
20<CODE>#include &lt;nitro/gx/g3imm.h&gt;
21#include &lt;nitro/gx/g3b.h&gt;
22#include &lt;nitro/gx/g3c.h&gt;</CODE><BR>
23<CODE>void G3_SwapBuffers(GXSortMode am, GXBufferMode zw);</CODE>
24
25// Below are APIs for creating the display list (command list)<BR><CODE>void G3B_SwapBuffers(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, GXSortMode am, GXBufferMode zw);</CODE><BR><CODE>void G3C_SwapBuffers(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, GXSortMode am, GXBufferMode zw);</CODE><BR><CODE>void G3BS_SwapBuffers(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, GXSortMode am, GXBufferMode zw);</CODE><BR><CODE>void G3CS_SwapBuffers(<A href="../gx/GXDLInfo.html">GXDLInfo</A>* info, GXSortMode am, GXBufferMode zw);</CODE></PRE></dd>
26</dl><h2>Arguments</h2>
27
28<table border="1" width="100%">
29  <tr>
30    <td width="13%"><em><strong><font face="Courier New">info</font></strong></em></td>
31    <td width="87%">Command List Information.</td>
32  </tr>
33  <tr>
34    <td width="13%"><em><strong><font face="Courier New">am</font></strong></em></td>
35    <td width="87%">Translucent polygon y-sorting selection</td>
36  </tr>
37    <TR>
38      <TD><em><strong><font face="Courier New">zw</font></strong></em></TD>
39      <TD>Depth buffering selection</TD>
40    </TR>
41  </table>
42<h2>Return Values</h2>
43<p>None.</p>
44<H2>Description</H2>
45<P>This function swaps the data group referenced by the rendering engine. <em><strong><code>zw</code></strong></em> is the depth buffering selection flag that selects the value to use in the depth test. Buffering using w-values will not function normally for orthogonal projections. <em><strong><code>am</code></strong></em> is the translucent polygon sorting selection flag that should be set to the manual sort mode when you want to specify the drawing order when using shadow volumes. When the V-Blank period starts immediately after the <code>SwapBuffers</code> command is issued, the data that is referenced by the rendering engine is swapped. This data includes the polygon list RAM, vertex RAM, and rendering-related registers. Therefore, the written graphics data will be rendered in the frame after the V-Blank that is started after the <code>SwapBuffers</code> command was issued.<BR> <b>Note</b>: When this instruction is issued after the V-Blank begins, the data will be swapped when the next V-Blank begins. <b>Note</b>: The Geometry engine will maintain a busy status until the data swap is performed. In addition, subsequent processing of geometry commands is not performed.
46</P>
47<TABLE border="1">
48  <TBODY>
49    <TR>
50      <TD width="30%"><CODE>GX_SORTMODE_AUTO</CODE></TD>
51      <TD width="70%">Auto sort mode</TD>
52    </TR>
53    <TR>
54      <TD width="30%"><CODE>GX_SORTMODE_MANUAL</CODE></TD>
55      <TD width="70%">Manual sort mode</TD>
56    </TR>
57  </TBODY>
58</TABLE>
59<P></P>
60<TABLE border="1">
61  <TBODY>
62    <TR>
63      <TD width="30%"><CODE>GX_BUFFERMODE_Z</CODE></TD>
64      <TD width="70%">Buffering using z-values</TD>
65    </TR>
66    <TR>
67      <TD width="30%"><CODE>GX_BUFFERMODE_W</CODE></TD>
68      <TD width="70%">Buffering using w-values (does not function normally if the <CODE><A href="G3_Ortho.html">G3_Ortho</A></CODE> function is used)</TD>
69    </TR>
70  </TBODY>
71</TABLE>
72<P>The following indicates the type definitions for <CODE>GXSortMode</CODE> and <CODE>GXBufferMode</CODE> types.</P>
73<PRE><CODE>typedef enum
74{
75    GX_SORTMODE_AUTO = 0,
76    GX_SORTMODE_MANUAL = 1
77}
78GXSortMode;
79
80typedef enum
81{
82    GX_BUFFERMODE_Z = 0,
83    GX_BUFFERMODE_W = 1
84}
85GXBufferMode;</CODE></PRE>
86<h2>See Also</h2>
87<H2>Revision History</H2>
88<P>2004/02/09</P>
89<UL>
90  <LI>Added a note.
91</UL>
92<P>2004/01/19 Initial version.</P>
93
94<hr><p>CONFIDENTIAL</p></body>
95</html>
96