Citro3D

Welcome to my Citro3D Documentation! This is a collection of the notes that I've tooken while learning how to use the 3DS Citro3D library.

If you didn't know already, Citro3D is a library used to develop homebrew for the Nintendo 3DS. It provides an easy to use stateful interface to the PICA200 GPU, the GPU that the 3DS uses.

Configuring Output

Finally, we have to choose how our target will be shown on the screen.

C3D_RenderTargetSetOutput

Target C3D_RenderTarget Object Pointer

For this, simply pass the C3D_RenderTarget object pointer we made before.

Screen gfxScreen_t Enum Value

This controls which screen will be drawn on.
Possible values:

GFX_TOP Top Screen
GFX_BOTTOM Bottom Screen

Side gfx3dSide_t Enum Value

If you are drawing to the top screen and 3D is enabled, this controls which eyebuffer will be drawn on.
Possible values:

GFX_LEFT Left eyebuffer
GFX_RIGHT Right eyebuffer

If you are drawing to the bottom screen or are drawing to the top screen, use GFX_LEFT.

Flags Unsigned 32-Bit Integer

This controls lots of other options, which you'll select using bitwise operators. Make a new unsigned 32-bit integer, and OR it with the following options:

GX_TRANSFER_SCALING(x) GX_TRANSFER_SCALE Enum Value

This is used for anti-aliasing.
Possible values:

GX_TRANSFER_SCALE_NO No anti-aliasing.
GX_TRANSFER_SCALE_X 2x1 anti-aliasing.
GX_TRANSFER_SCALE_XY 2x2 anti-aliasing.

No Anti-Aliasing

X Anti-Aliasing

XY Anti-Aliasing