# GX_SetGraphicsMode

## C Specification

  `#include <nitro/gx/gx.h>`
  `void GX_SetGraphicsMode(GXDispMode dispMode, GXBGMode bgMode,GXBG0As bg0_2d3d);`

## Description

This function sets the display mode for the main graphics engine.

If something other than graphics display mode is selected with `dispMode`, the values of `bgMode` and `bg0_2d3d` are used only for capturing the graphics display screen.

`GX_DISPMODE_OFF` | Display off
`GX_DISPMODE_GRAPHICS` | Show 2D/3D graphics
`GX_DISPMODE_VRAM_A` | VRAM display mode (show VRAM-A)
`GX_DISPMODE_VRAM_B` | VRAM display mode (show VRAM-B)
`GX_DISPMODE_VRAM_C` | VRAM display mode (show VRAM-C)
`GX_DISPMODE_VRAM_D` | VRAM display mode (show VRAM-D)
`GX_DISPMODE_MMEM` | Main memory display mode (transfer with `MI_DispMemDmaCopy`)

`GX_BGMODE_0` | BG0=Text/3D, BG1=Text, BG2=Text, BG3=Text
`GX_BGMODE_1` | BG0=Text/3D, BG1=Text, BG2=Text, BG3=Affine
`GX_BGMODE_2` | BG0=Text/3D, BG1=Text, BG2=Affine, BG3=Affine
`GX_BGMODE_3` | BG0=Text/3D, BG1=Text, BG2=Text, BG3=Affine Extended BG
`GX_BGMODE_4` | BG0=Text/3D, BG1=Text, BG2=Affine, BG3=Affine Extended BG
`GX_BGMODE_5` | BG0=Text/3D, BG1=Text, BG2=Affine Extended BG, BG3=Affine Extended BG
`GX_BGMODE_6` | BG0=3D, BG1=None, BG2=Big Screen 256-color bitmap, BG3=None

`GX_BG0_AS_2D` | BG0 displayed as text. Ignored when `GX_BGMODE_6` is selected.
`GX_BG0_AS_3D` | BG0 displayed as 3D. Ignored when `GX_BGMODE_6` is selected.

The following is the type definition for `GXDispMode`, `GXBGMode`, and `GXBG0As` types.

    typedef enum
    {
        GX_DISPMODE_GRAPHICS = 0x01,
        GX_DISPMODE_VRAM_A = 0x02,
        GX_DISPMODE_VRAM_B = 0x06,
        GX_DISPMODE_VRAM_C = 0x0a,
        GX_DISPMODE_VRAM_D = 0x0e,
        GX_DISPMODE_MMEM = 0x03
    }
    GXDispMode;

    typedef enum
    {
        GX_BGMODE_0 = 0,
        GX_BGMODE_1 = 1,
        GX_BGMODE_2 = 2,
        GX_BGMODE_3 = 3,
        GX_BGMODE_4 = 4,
        GX_BGMODE_5 = 5,
        GX_BGMODE_6 = 6
    }
    GXBGMode;

    typedef enum
    {
        GX_BG0_AS_2D = 0,
        GX_BG0_AS_3D = 1
    }
    GXBG0As;

## Arguments

`dispMode` | Display Mode. Selects from Graphics display mode VRAM display mode, Main Memory display mode.
`bgMode` | Selects BG mode. Only enabled in Graphics display mode.
`bg0_2d3d` | Selects whether to allocate BG0 to 3D. Only enabled in Graphics display mode.

## Return Values

None

## See Also

## Revision History

08/03/2004 The values of `bgMode` and `bg0_2d3d` are reflected to the register when functions other than `GX_DISPMODE_GRAPHIC` is used.
02/09/2004 Deleted `GX_DISPMODE_OFF`. Use `GX_DispOff` instead.
01/19/2004 Initial Version