Graphics (GX/G2/G3/G3X) API Function List

General 2D/3D Graphics (GX)

Common to the 2D Graphics Engines

Power Control

GX_SetPower

Collectively sets each type of power control.

GX_GetPower

Gets the power control states.

GX_Power2D

Sets the main and sub 2D graphics engines ON/OFF.

GX_Power3D

Sets the geometry and rendering engines ON/OFF.

GX_Power2DMain

Sets the main 2D graphics engine ON/OFF.

GX_Power2DSub

Sets the sub 2D graphics engine ON/OFF.

GX_PowerGeometry

Sets geometry engine ON/OFF.

GX_PowerRender

Sets rendering engine ON/OFF.

GX_SetDispSelect

Sets the LCD output destination.

GX_GetDispSelect

Gets the LCD output destination.

Initialization

GX_Init

Initializes the graphics system.

GX_InitEx

Initializes the graphics system. Also changes the default DMA number for GX.

GX_SetDefaultDMA

Changes the DMA number setting used by GX.

GX_GetDefaultDMA

Obtains the DMA number setting used by GX.

Allocating VRAM Banks To Resources

GX_SetBankForBG

Specifies VRAM bank, and allocates it to the Main 2D Engine BG.

GX_SetBankForBGEx

Specifies the VRAM bank with the combination that cannot be allocated to the contiguous addresses, and allocates it to the main 2D engine BG.

GX_SetBankForOBJ

Specifies VRAM bank, and allocates it to the Main 2D Engine OBJ.

GX_SetBankForBGExtPltt

Specifies VRAM bank, and allocates it to the Main 2D Engine BG expanded palette.

GX_SetBankForOBJExtPltt

Specifies VRAM bank, and allocates it to the Main 2D Engine OBJ expanded palette.

GX_SetBankForTex

Specifies VRAM bank, and allocates it to the texture image slot.

GX_SetBankForTexPltt

Specifies VRAM bank, and allocates it to the texture palette slot.

GX_SetBankForClearImage

Specifies VRAM bank, and allocates it to clear image.

GX_SetBankForSubBG

Specifies VRAM bank, and allocates it to the Sub 2D Engine BG.

GX_SetBankForSubOBJ

Specifies VRAM bank, and allocates it to the Sub 2D Engine OBJ.

GX_SetBankForSubBGExtPltt

Specifies VRAM bank, and allocates it to the Sub 2D Engine BG expanded palette.

GX_SetBankForSubOBJExtPltt

Specifies VRAM bank, and allocates it to the Sub 2D Engine OBJ expanded palette.

GX_SetBankForARM7

Specifies VRAM bank, and allocates it to ARM7 memory space.

GX_SetBankForLCDC

Specifies VRAM bank, and allocates it to LCDC memory space.

Obtaining Information on VRAM Banks Allocated to Resources

GX_GetBankForBG

Gets information on VRAM bank allocated to the Main 2D Engine BG.

GX_GetBankForOBJ

Gets information on VRAM bank allocated to the Main 2D Engine OBJ.

GX_GetBankForBGExtPltt

Gets information on VRAM bank allocated to the Main 2D Engine BG expanded palette.

GX_GetBankForOBJExtPltt

Gets information on VRAM bank allocated to the Main 2D Engine OBJ expanded palette.

GX_GetBankForTex

Gets information on VRAM bank allocated to the texture image slot.

GX_GetBankForTexPltt

Gets information on VRAM bank allocated to the texture palette slot.

GX_GetBankForClearImage

Gets information on VRAM bank allocated to clear image.

GX_GetBankForSubBG

Gets information on VRAM bank allocated to the Sub 2D Engine BG.

GX_GetBankForSubOBJ

Gets information on VRAM bank allocated to the Sub 2D Engine OBJ.

GX_GetBankForSubBGExtPltt

Gets information on VRAM bank allocated to the Sub 2D Engine BG expanded palette.

GX_GetBankForSubOBJExtPltt

Gets information on VRAM bank allocated to the Sub 2D Engine OBJ expanded palette.

GX_GetBankForARM7

Gets information on VRAM bank allocated to ARM7 memory space.

GX_GetBankForLCDC

Gets information on VRAM bank allocated to LCDC.

Switching VRAM Banks That Were Allocated To ResourcesTo LCDC Memory Space

GX_ResetBankForBG

Allocates VRAM bank that was allocated to the Main 2D Engine BG to LCDC memory space.

GX_ResetBankForOBJ

Allocates VRAM bank that was allocated to the Main 2D Engine OBJ to LCDC memory space.

GX_ResetBankForBGExtPltt

Allocates VRAM bank that was allocated to the Main 2D Engine BG expanded palette to LCDC memory space.

GX_ResetBankForOBJExtPltt

Allocates VRAM bank that was allocated to the Main 2D Engine OBJ expanded palette to LCDC memory space.

GX_ResetBankForTex

Allocates VRAM bank that was allocated to texture image slot to LCDC memory space.

GX_ResetBankForTexPltt

Allocates VRAM bank that was allocated to texture palette slot to LCDC memory space.

GX_ResetBankForClearImage

Allocates VRAM bank that was allocated to clear image to LCDC memory space.

GX_ResetBankForSubBG

Allocates VRAM bank that was allocated to the Sub 2D Engine BG to LCDC memory space.

GX_ResetBankForSubOBJ

Allocates VRAM bank that was allocated to the Sub 2D Engine OBJ to LCDC memory space.

GX_ResetBankForSubBGExtPltt

Allocates VRAM bank that was allocated to the Sub 2D Engine BG expanded palette to LCDC memory space.

GX_ResetBankForSubOBJExtPltt

Allocates VRAM bank that was allocated to the Sub 2D Engine OBJ expanded palette to LCDC memory space.

GX_ResetBankForARM7

Allocates VRAM bank that was allocated to ARM7 to LCDC memory space.

Releasing VRAM Banks That Were Allocated To Resources

GX_DisableBankForBG

Disables VRAM bank that was allocated to the Main 2D Engine BG.

GX_DisableBankForOBJ

Disables VRAM bank that was allocated to the Main 2D Engine OBJ.

GX_DisableBankForBGExtPltt

Disables VRAM bank that was allocated to the Main 2D Engine BG expanded palette.

GX_DisableBankForOBJExtPltt

Disables VRAM bank that was allocated to the Main 2D Engine OBJ expanded palette.

GX_DisableBankForTex

Disables VRAM bank that was allocated to texture image slot.

GX_DisableBankForTexPltt

Disables VRAM bank that was allocated to texture palette slot.

GX_DisableBankForClearImage

Disables VRAM bank that was allocated to clear image slot.

GX_DisableBankForSubBG

Disables VRAM bank that was allocated to the Sub 2D Engine BG.

GX_DisableBankForSubOBJ

Disables VRAM bank that was allocated to the Sub 2D Engine OBJ.

GX_DisableBankForSubBGExtPltt

Disables VRAM bank that was allocated to the Sub 2D Engine BG expanded palette.

GX_DisableBankForSubOBJExtPltt

Disables VRAM bank that was allocated to the Sub 2D Engine OBJ expanded palette.

GX_DisableBankForARM7

Disables VRAM bank that was allocated to ARM7.

GX_DisableBankForLCDC

Disables VRAM bank that was allocated to LCDC.

Getting Resource Sizes

GX_GetSizeOfBG

Returns the Main 2D Engine BG size in bytes.

GX_GetSizeOfOBJ

Returns the Main 2D Engine OBJ size in bytes.

GX_GetSizeOfBGExtPltt

Returns the Main 2D Engine BG expanded palette size in bytes.

GX_GetSizeOfOBJExtPltt

Returns the Main 2D Engine OBJ expanded palette size in bytes.

GX_GetSizeOfTex

Returns the texture image size in bytes.

GX_GetSizeOfTexPltt

Returns the texture palette size in bytes.

GX_GetSizeOfClearImage

Returns the clear image size in bytes.

GX_GetSizeOfSubBG

Returns the Sub 2D Engine BG size in bytes.

GX_GetSizeOfSubOBJ

Returns the Sub 2D Engine OBJ size in bytes.

GX_GetSizeOfSubBGExtPltt

Returns the Sub 2D Engine BG expanded palette size in bytes.

GX_GetSizeOfSubOBJExtPltt

Returns the Sub 2D Engine OBJ expanded palette size in bytes.

GX_GetSizeOfARM7

Returns the size of VRAM allocated to ARM7 in bytes.

Interrupts and Miscellaneous

GX_GetVCount

Reads the V-Counter value.

GX_SetVCount

Writes the V-Counter value.

GX_IsHBlank

Tests whether in H-Blank period.

GX_IsVBlank

Tests whether in V-Blank period.

GX_IsVCountEq

Tests whether in V-Counter matching period.

GX_VCountEqIntr

Sets V-Counter matching interrupts to enable/disable.

GX_SetVCountEqVal

Sets the V-Counter matching set value.

GX_GetVCountEqVal

Acquires V-Counter matching set value.

GX_HBlankIntr

Sets H-Blank interrupts to enable/disable.

GX_VBlankIntr

Sets V-Blank interrupts to enable/disable.

Main 2D Graphics Engine

Display Mode Settings

GX_SetGraphicsMode

Sets display mode and BG mode.

Hide/Show Settings

GX_SetVisiblePlane

Hide/Show settings for BG and OBJ.

GX_SetVisibleWnd

Hide/Show settings for windows.

GX_DispOn

Turns ON output to the LCD.

GX_DispOff

Turns OFF output to the LCD.

GX_BlankScr

This API will be deleted from future releases.

GX_HBlankOBJProc

Sets whether OBJ processing occurs during H-Blanks.

Offset Settings

GX_SetBGScrOffset

Sets screen offset.

GX_SetBGCharOffset

Sets character offset.

OBJ Mapping Mode Settings

GX_SetOBJVRamModeChar

Sets character OBJ mapping mode.

GX_SetOBJVRamModeBmp

Sets bitmap OBJ mapping mode.

Loading Resources (2D)

GX_LoadOBJ

Transfers OBJ data to OBJ-VRAM

GX_LoadOAM

Transfers OAM data to OAM.

GX_LoadBGPltt

Transfers standard BG palette data to standard BG palette RAM.

GX_LoadOBJPltt

Transfers standard OBJ palette data to standard OBJ palette RAM.

GX_LoadBG0Scr

Transfers data to the BG0 screen.

GX_LoadBG1Scr

Transfers data to the BG1 screen..

GX_LoadBG2Scr

Transfers data to the BG2 screen.

GX_LoadBG3Scr

Transfers data to the BG3 screen.

GX_LoadBG2Bmp

Transfers bit map data to BG2.

GX_LoadBG3Bmp

Transfers bit map data to BG3.

GX_LoadBG0Char

Transfers data to BG0 character.

GX_LoadBG1Char

Transfers data to BG1 character.

GX_LoadBG2Char

Transfers data to BG2 character.

GX_LoadBG3Char

Transfers data to BG3 character.

GX_BeginLoadBGExtPltt

Call before transferring data to BG extended palette.

GX_LoadBGExtPltt

Transfers data to BG extended palette.

GX_EndLoadBGExtPltt

Call after all data transfer to BG extended palette is finished.

GX_BeginLoadOBJExtPltt

Call before transferring data to OBJ extended palette.

GX_LoadOBJExtPltt

Transfers data to OBJ extended palette.

GX_EndLoadOBJExtPltt

Call after data transfer to OBJ extended palette is complete.

Loading Resources (3D)

GX_BeginLoadTex

Call before transferring to texture image slot.

GX_LoadTex

Transfers data to texture image slot.

GX_EndLoadTex

Call after all data has been transferred to texture image slot.

GX_LoadTexEx

Transfers data to the VRAM bank that can be allocated to the texture image slot.

GX_BeginLoadTexPltt

Call before transferring to texture palette slot.

GX_LoadTexPltt

Transfers data to texture palette slot.

GX_EndLoadTexPltt

Call after all data has been transferred to texture palette slot.

GX_LoadTexPlttEx

Transfers data to the VRAM bank that can be allocated to the texture palette slot.

GX_BeginLoadClearImage

Call before transferring to clear image slot.

GX_LoadClearImageColor

Transfers color data to clear image slot.

GX_LoadClearImageDepth

Transfers depth data to clear image slot.

GX_EndLoadClearImage

Call after all data has been transferred to clear image slot.

Miscellaneous

GX_SetCapture

Sets screen capture.

GX_SetMasterBrightness

Sets master brightness.

Sub 2D Graphics Engine

Display Mode Settings

GXS_SetGraphicsMode

Sets BG mode.

Hide/Show Settings

GXS_SetVisiblePlane

Hide/Show settings for BG and OBJ.

GXS_SetVisibleWnd

Hide/Show settings for windows.

GXS_DispOn

Turns ON output to the LCD.

GXS_DispOff

Turns OFF output to the LCD.

GXS_HBlankOBJProc

Sets whether OBJ processing occurs during H-Blanks.

OBJ Mapping Mode Settings

GXS_SetOBJVRamModeChar

Sets character OBJ mapping mode

GXS_SetOBJVRamModeBmp

Sets bitmap OBJ mapping mode.

Loading Resources

GXS_LoadOBJ

Transfers OBJ data to OBJ-VRAM.

GXS_LoadOAM

Transfers OAM data to OAM.

GXS_LoadBGPltt

Transfers standard BG palette data to standard BG palette RAM.

GXS_LoadOBJPltt

Transfers standard OBJ palette data to standard OBJ palette RAM.

GXS_LoadBG0Scr

Transfers data to the BG0 screen.

GXS_LoadBG1Scr

Transfers data to the BG1 screen.

GXS_LoadBG2Scr

Transfers data to the BG2 screen.

GXS_LoadBG3Scr

Transfers data to the BG3 screen.

GXS_LoadBG2Bmp

Transfers bit map to BG2.

GXS_LoadBG3Bmp

Transfers bit map to BG3.

GXS_LoadBG0Char

Transfers data to BG0 character.

GXS_LoadBG1Char

Transfers data to BG1 character.

GXS_LoadBG2Char

Transfers data to BG2 character.

GXS_LoadBG3Char

Transfers data to BG3 character.

GXS_BeginLoadBGExtPltt

Call before transferring to BG expanded palette.

GXS_LoadBGExtPltt

Transfers data to BG expanded palette.

GXS_EndLoadBGExtPltt

Call after all data has been transferred to BG expanded palette.

GXS_BeginLoadOBJExtPltt

Call before transferring to OBJ expanded palette.

GXS_LoadOBJExtPltt

Transfers data to OBJ expanded palette.

GXS_EndLoadOBJExtPltt

Call after all data has been transferred to OBJ expanded palette.

2D Graphics (G2)

GXS_SetMasterBrightness

Sets the master brightness.

2D Graphics (G2)

Common to the 2D Graphics Engines

OAM

G2_SetOBJAttr

Sets each object attribute.

G2_SetOBJAffine

Sets object affine conversion.

G2_SetOBJPosition

Sets object XY coordinates.

G2_SetOBJPriority

Sets object display priority level.

G2_SetOBJMode

Sets object OBJ mode.

G2_SetOBJEffect

Sets object flip/affine conversion parameters.

G2_SetOBJShape

Sets object shape.

G2_SetOBJCharName

Sets the name of first character in the object.

G2_SetOBJColorMode

Sets color mode for the object.

G2_OBJMosaic

Sets whether or not to apply mosaic to OBJ.

G2_GetOBJPosition

Obtains the x,y coordinates of the object.

G2_GetOBJPriority

Obtains the display priority of the object.

G2_GetOBJMode

Obtains the OBJ mode of the object.

G2_GetOBJColorParam

Obtains the color parameters of the object.

G2_GetOBJEffect

Obtains the flip/affine mode of the object.

G2_GetOBJShape

Obtains the shape of the object.

G2_GetOBJCharName

Obtains the name of first character in the object.

G2_GetOBJColorMode

Obtains the color mode of the object.

Main 2D Graphics Engine

BG Control

G2_SetBG0Control

Sets each type of BG0 control.

G2_SetBG1Control

Sets each type of BG1 control.

G2_SetBG2ControlText

Sets each type of BG2 control (in the case of text mode).

G2_SetBG2ControlAffine

Sets each type of BG2 control (in the case of affine mode).

G2_SetBG2Control256x16Pltt

Sets each type of BG2 control (in the case of 256x16 palette character BG).

G2_SetBG2Control256Bmp

Sets each type of BG2 control (in the case of 256 bitmap BG).

G2_SetBG2ControlDCBmp

Sets each type of BG2 control (in the case of direct color bitmap BG).

G2_SetBG2ControlLargeBmp

Sets each type of BG2 control (in the case of large screen 256-color bitmap BG).

G2_SetBG3ControlText

Sets each type of BG3 control (in the case of text mode).

G2_SetBG3ControlAffine

Sets each type of BG3 control (in the case of affine mode).

G2_SetBG3Control256x16Pltt

Sets each type of BG3 control (in the case of 256x16 palette character BG).

G2_SetBG3Control256Bmp

Sets each type of BG3 control (in the case of 256 bitmap BG).

G2_SetBG3ControlDCBmp

Sets each type of BG3 control (in the case of direct color bitmap BG).

Setting BG Display Priority Levels

G2_SetBG0Priority

Sets the BG0 display priority level.

G2_SetBG1Priority

Sets the BG1 display priority level.

G2_SetBG2Priority

Sets the BG2 display priority level.

G2_SetBG3Priority

Sets the BG3 display priority level.

Setting To Apply Or Not Apply Mosaic To BG

G2_BG0Mosaic

Sets whether or not to apply mosaic to BG0.

G2_BG1Mosaic

Sets whether or not to apply mosaic to BG1.

G2_BG2Mosaic

Sets whether or not to apply mosaic to BG2.

G2_BG3Mosaic

Sets whether or not to apply mosaic to BG3.

Acquiring Pointers

G2_GetBG0ScrPtr

Returns a pointer to the BG0 screen base.

G2_GetBG1ScrPtr

Returns a pointer to the BG1 screen base.

G2_GetBG2ScrPtr

Returns a pointer to the BG2 screen base.

G2_GetBG3ScrPtr

Returns a pointer to the BG3 screen base.

G2_GetBG0CharPtr

Returns a pointer to the BG0 character base.

G2_GetBG1CharPtr

Returns a pointer to the BG1 character base.

G2_GetBG2CharPtr

Returns a pointer to the BG2 character base.

G2_GetBG3CharPtr

Returns a pointer to the BG3 character base.

G2_GetOBJCharPtr

Returns a pointer to the OBJ character base.

Setting BG Plane Offsets

G2_SetBG0Offset

Sets the BG0 plane offset.

G2_SetBG1Offset

Sets the BG1 plane offset.

G2_SetBG2Offset

Sets the BG2 plane offset.

G2_SetBG3Offset

Sets the BG3 plane offset.

Setting BG Plane Affine Conversions

G2_SetBG2Affine

Sets affine conversions applied to the BG2 plane.

G2_SetBG3Affine

Sets affine conversions applied to the BG3 plane.

Setting Windows

G2_SetWnd0InsidePlane

Sets a plane that comes inside window0.

G2_SetWnd1InsidePlane

Sets a plane that comes inside window1.

G2_SetWndOutsidePlane

Sets a plane that comes outside the window.

G2_SetWndOBJInsidePlane

Sets a plane that comes inside the OBJ window.

G2_SetWnd0Position

Sets window0 position.

G2_SetWnd1Position

Sets window1 position.

Mosaic

G2_SetBGMosaicSize

Sets the size of the mosaic that is applied to BG.

G2_SetOBJMosaicSize

Sets the size of the mosaic that is applied to OBJ.

Color Special Effects

G2_BlendNone

Sets to not perform color special effects.

G2_SetBlendAlpha

Performs alpha-blending.

G2_SetBlendBrightness

Controls brightness.

G2_SetBlendBrightnessExt

Controls brightness, and performs alpha-blending only on OBJ and 3D.

G2_ChangeBlendAlpha

Sets the alpha-blending coefficient.

G2_ChangeBlendBrightness

Sets the brightness update coefficient.

Sub 2D Graphics Engine

BG Control

G2S_SetBG0Control

Sets each type of BG0 control.

G2S_SetBG1Control

Sets each type of BG1 control.

G2S_SetBG2ControlText

Sets each type of BG2 control (in the case of text mode).

G2S_SetBG2ControlAffine

Sets each type of BG2 control (in the case of affine mode).

G2S_SetBG2Control256x16Pltt

Sets each type of BG2 control (in the case of 256x16 palette character BG).

G2S_SetBG2Control256Bmp

Sets each type of BG2 control (in the case of 256 bitmap BG).

G2S_SetBG2ControlDCBmp

Sets each type of BG2 control (in the case of direct color bitmap BG).

G2S_SetBG3ControlText

Sets each type of BG3 control (in the case of text mode).

G2S_SetBG3ControlAffine

Sets each type of BG3 control (in the case of affine mode).

G2S_SetBG3Control256x16Pltt

Sets each type of BG3 control (in the case of 256x16 palette character BG).

G2S_SetBG3Control256Bmp

Sets each type of BG3 control (in the case of 256 bitmap BG).

G2S_SetBG3ControlDCBmp

Sets each type of BG3 control (in the case of direct color bitmap BG).

Setting BG Display Priority Levels

G2S_SetBG0Priority

Sets the BG0 display priority level.

G2S_SetBG1Priority

Sets the BG1 display priority level.

G2S_SetBG2Priority

Sets the BG2 display priority level.

G2S_SetBG3Priority

Sets the BG3 display priority level.

Setting To Apply Or Not Apply Mosaic To BG

G2S_BG0Mosaic

Sets whether or not to apply mosaic to BG0.

G2S_BG1Mosaic

Sets whether or not to apply mosaic to BG1.

G2S_BG2Mosaic

Sets whether or not to apply mosaic to BG2.

G2S_BG3Mosaic

Sets whether or not to apply mosaic to BG3.

Acquiring Pointers

G2S_GetBG0ScrPtr

Returns a pointer to the BG0 screen base.

G2S_GetBG1ScrPtr

Returns a pointer to the BG1 screen base.

G2S_GetBG2ScrPtr

Returns a pointer to the BG2 screen base.

G2S_GetBG3ScrPtr

Returns a pointer to the BG3 screen base.

G2S_GetBG0CharPtr

Returns a pointer to the BG0 character base.

G2S_GetBG1CharPtr

Returns a pointer to the BG1 character base.

G2S_GetBG2CharPtr

Returns a pointer to the BG2 character base.

G2S_GetBG3CharPtr

Returns a pointer to the BG3 character base.

G2S_GetOBJCharPtr

Returns a pointer to the OBJ character base.

Setting BG Plane Offsets

G2S_SetBG0Offset

Sets the BG0 plane offset.

G2S_SetBG1Offset

Sets the BG1 plane offset.

G2S_SetBG2Offset

Sets the BG2 plane offset.

G2S_SetBG3Offset

Sets the BG3 plane offset.

Setting BG Plane Affine Conversions

G2S_SetBG2Affine

Sets affine conversions applied to the BG2 plane.

G2S_SetBG3Affine

Sets affine conversions applied to the BG3 plane.

Setting Windows

G2S_SetWnd0InsidePlane

Sets a plane that comes inside window0.

G2S_SetWnd1InsidePlane

Sets a plane that comes inside window1.

G2S_SetWndOutsidePlane

Sets a plane that comes outside the window.

G2S_SetWndOBJInsidePlane

Sets a plane that comes inside the OBJ window.

G2S_SetWnd0Position

Sets window0 position.

G2S_SetWnd1Position

Sets window1 position.

Mosaic

G2S_SetBGMosaicSize

Sets the size of the mosaic that is applied to BG.

G2S_SetOBJMosaicSize

Sets the size of the mosaic that is applied to OBJ.

Color Special Effects

G2S_BlendNone

Sets to not perform color special effects.

G2S_SetBlendAlpha

Performs alpha-blending.

G2S_SetBlendBrightness

Controls brightness.

G2S_SetBlendBrightnessExt

Controls brightness, and performs alpha-blending only on OBJ and 3D.

G2S_ChangeBlendAlpha

Sets the alpha-blending coefficient.

G2S_ChangeBlendBrightness

Sets the brightness update coefficient.

3D Geometry (G3*)

Geometry Command Cycle List

Geometry And Vertices

G3*_Begin

Declares beginning of vertex list.

G3*_End

Declares end of vertex list.

G3*_Vtx

Sets vertex coordinates.

G3*_Vtx10

Sets vertex coordinates.

G3*_VtxXY

Sets vertex XY coordinates.

G3*_VtxXZ

Sets vertex XZ coordinates.

G3*_VtxYZ

Sets vertex YZ coordinates.

G3*_VtxDiff

Specifies vertex coordinates using the difference with the data that was last set.

G3*_Normal

Sets a normal vector.

G3*_Color

Directly sets vertex color.

G3*_TexCoord

Sets texture coordinates.

G3*_PolygonAttr

Sets polygon related attributes.

MatrixAndViewport

G3*_MtxMode

Sets matrix mode.

G3*_Identity

Initializes current matrix to a unit matrix.

G3*_LoadMtx43

Sets a 4x3 matrix to the current matrix.

G3*_LoadMtx44

Sets a 4x4 matrix to the current matrix..

G3*_MultMtx43

Multiplies current matrix with a 4x3 matrix.

G3*_MultMtx44

Multiplies current matrix with a 4x4 matrix.

G3*_MultMtx33

Multiplies current matrix with a 3x3 matrix.

G3*_MultTransMtx33

Multiplies current matrix with a translation matrix and a 3x3 matrix.

G3*_PushMtx

Pushes current matrix to the stack.

G3*_PopMtx

Pops current matrix from the stack.

G3*_StoreMtx

Stores current matrix in a specified position in the stack.

G3*_RestoreMtx

Reads a matrix from a specified position in the stack.

G3*_Scale

Multiplies the current matrix with a scaling (enlarge, reduce) matrix.

G3*_Translate

Multiplies the current matrix with a translation matrix.

G3*_ViewPort

Sets theviewport.

Lighting

G3*_LightColor

Sets light color.

G3*_LightVector

Sets light direction vector.

G3*_MaterialColorDiffAmb

Sets material diffuse reflection color and ambient reflection color.

G3*_MaterialColorSpecEmi

Sets material specular reflection color and emitted light color.

G3*_Shininess

Setsspecular reflection brightness table.

Texture

G3*_TexImageParam

Sets texture parameters.

G3*_TexPlttBase

Sets texture palette base address.

G3*_MakeTexPlttBaseParam

Calculates texture palette base address.

Control

G3*_SwapBuffers

Swaps the data group that the rendering engine references.

G3*_Nop

Does nothing.

Geometry Visibility Determination

G3*_BoxTest

Tests whether the results of applying the current matrix to the Box argument are contained in the viewing volume.

G3*_PositionTest

Uses the current clip coordinate matrix to transform position coordinates.

G3*_VectorTest

Uses the current direction vector matrix to transform the coordinates of the direction vector.

Direct Write

G3*_Direct0

This function is used to directly write commands and parameters. Use it when there are no arguments.

G3*_Direct1

This function is used to directly write commands and parameters. Use it when there is 1 argument.

G3*_Direct2

This function is used to directly write commands and parameters. Use it when there are 2 arguments.

G3*_Direct3

This function is used to directly write commands and parameters. Use it when there are 3 arguments.

Utilities

G3_Frustum

Sets in the current Projection matrix.

G3_Perspective

Sets in the current Projection matrix.

G3_Ortho

Sets in the current Projection matrix.

G3_FrustumW

Sets in the current Projection matrix (with scale W parameters)

G3_PerspectiveW

Sets in the current Projection matrix (with scale W parameters)

G3_OrthoW

Sets in the current Projection matrix (with scale W parameters)

G3_LookAt

Sets in the current Position/Vector matrix.

G3_RotX

Multiplies the current Position/Vector matrix by the rotation matrix for the x-axis.

G3_RotY

Multiplies the current Position/Vector matrix by the rotation matrix for the y-axis.

G3_RotZ

Multiplies the current Position/Vector matrix by the rotation matrix for the z-axis.

G3*_LoadTexMtxTexCoord

Sets a maxtrix corrected for the TexCoord source into the current Texture matrix.

G3*_LoadTexMtxEnv

Sets a matrix correct for theNormal source/Vertex source into the current Texture matrix.

Creating Dynamic Display Lists (Command Lists)

G3_BeginMakeDL

Call before creating the command list.

G3_EndMakeDL

Call after creating the command list.

G3_GetDLStart

Gets the pointer to the command list.

G3_GetDLLength

Gets the size of the command list buffer.

G3_GetDLSize

Gets the size of the command list.

3D Graphics Control (G3X)

Initialization

G3X_Init

Initializes each 3D related item.

G3X_InitTable

Initializes the Fog table, etc.

G3X_InitMtxStack

Initializes the matrix stack.

G3X_Reset

Resets overflow, etc. Normally executed at the beginning of each frame draw process.

G3X_ResetMtxStack

Initializes the matrix stack. However it will not substitute a unit matrix in the projection matrix.

Enabling and Disabling Each Function

G3X_AlphaTest

Performs alpha test setting.

G3X_AlphaBlend

Selects enable/disable for alpha-blending.

G3X_AntiAlias

Selects antialias enable/disable.

Tone/Highlight/Shading

G3X_SetShading

Selects toon/highlight shading.

G3X_SetToonTable

Sets toon/highlight table.

Edge Color

G3X_EdgeMarking

Selects enable/disable for edge marking.

G3X_SetEdgeColorTable

Sets edge color table.

Fog

G3X_SetFog

Sets fog.

G3X_SetFogColor

Sets fog color.

G3X_SetFogTable

Set fog table.

Setting Offsets

G3X_SetHOffset

Sets BG0 plane offset.

G3X_SetClearImageOffset

Sets the offset when using clear image.

Clear ColorAnd Clear Depth

G3X_SetClearColor

Sets clear color.

Acquiring Test Results And Calculated Results

G3X_GetBoxTestResult

Acquires box test results.

G3X_GetPositionTestResult

Acquires position test results.

G3X_GetVectorTestResult

Acquires vector test results.

G3X_GetClipMtx

Acquires current clip coordinate matrix.

G3X_GetVectorMtx

Acquires current direction vector matrix.

Miscellaneous

G3X_GetMtxStackLevelPV

Acquires thePositionVector matrix stack level.

G3X_GetMtxStackLevelPJ

Acquires the Projection matrix stack level.

G3X_IsGeometryBusy

Tests to see if geometry engine is busy.

G3X_IsMtxStackOverflow

Tests the Matrix stack's overflow flag.

G3X_IsLineBufferUnderflow

Rendering engine tests the lines over flag.

G3X_IsListRamOverflow

Tests the overflow flag of the polygon list RAM and vertex list RAM.

G3X_ResetMtxStackOverflow

Clears the matrix stack overflow flag.

G3X_ResetLineBufferUnderflow

Clears the rendering engine lines over flag.

G3X_ResetListRamOverflow

Clears the overflow flag for the polygon list RAM and vertex list RAM.

G3X_ClearFifo

Clears entire command FIFO.

G3X_GetPolygonListRamCount

Gets value of polygon list RAM counter.

G3X_GetVtxListRamCount

Gets value of vertex list RAM counter.

G3X_GetRenderedLineCount

Gets minimum number of rendered lines.

G3X_GetCommandFifoCount

References the number of commands/data currently stored in the command FIFO.

G3X_GetCommandFifoStatus

Gets the command FIFO status.

G3X_SetFifoIntrCond

Sets command FIFO interrupt request generating conditions.

G3X_SetDisp1DotDepth

Sets 1 pixel polygon display boundary depth value register value.

Major Types and Macros

GXRgb

A type that shows a color with each RGB is 5 bits.
GXRgba

A type that shows a color with each RGB is 5 bits and an alpha flag.

VexVtx10

Packs the s3.6 type 3D vector.

VecVtxDiff

Shows the command parameter of G3_VtxDiff.
GXBoxTestParam

Structure used as an argument of G3_BoxTest.
GXDLInfo

Structure used as a parameter for the display list creation function.
GXOamAttr

Structure that indicates an OAM attribute.
GXOamAffine

Structure that indicates an OAM affine transformation parameter.
Macros

Macros such as the GX type conversion.
Display List Description Macros

Macro that packs the geometry command parameter.
2D Screen Macros and Structures

Structures and macros for storing screen data and character data in 2D screen.
Prefix for the API that creates the display list.

Description of the prefixes for the API that creates the display list.