#include <nitro/gx/g3imm.h> #include <nitro/gx/g3b.h> #include <nitro/gx/g3c.h>
void G3_SwapBuffers(GXSortMode am, GXBufferMode zw);
// Below are APIs for creating the display list (command list)void G3B_SwapBuffers(GXDLInfo* info, GXSortMode am, GXBufferMode zw);
void G3C_SwapBuffers(GXDLInfo* info, GXSortMode am, GXBufferMode zw);
void G3BS_SwapBuffers(GXDLInfo* info, GXSortMode am, GXBufferMode zw);
void G3CS_SwapBuffers(GXDLInfo* info, GXSortMode am, GXBufferMode zw);
info | Command List Information |
am | Translucent polygon y-sorting selection |
zw | Depth buffering selection |
None.
This function swaps the data group referenced by the rendering engine. zw
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. am
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 SwapBuffers
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 SwapBuffers
command was issued.
Note: When this instruction is issued after the V-Blank begins, the data will be swapped when the next V-Blank begins. Note: The Geometry engine will maintain a busy status until the data swap is performed. In addition, subsequent processing of geometry commands is not performed.
GX_SORTMODE_AUTO |
Auto sort mode |
GX_SORTMODE_MANUAL |
Manual sort mode |
GX_BUFFERMODE_Z |
Buffering using z-values |
GX_BUFFERMODE_W |
Buffering using w-values (does not function normally if G3_Ortho is used) |
The following indicates the type definitions for GXSortMode
and GXBufferMode
types.
typedef enum
{
GX_SORTMODE_AUTO = 0,
GX_SORTMODE_MANUAL = 1
}
GXSortMode;
typedef enum
{
GX_BUFFERMODE_Z = 0,
GX_BUFFERMODE_W = 1
}
GXBufferMode;
02/09/2004
01/19/2004 Initial version