NightFox’s Lib
Functions
3D video setup

Functions to setup 2D the video modes of the NDS and enable 3D. More...

Functions

void NF_Set3D (int screen, u32 mode)
 Init 3D mode for the selected screen. More...
 
void NF_InitOpenGL (void)
 Initialitzes and configures OpenGL for 3D sprites. More...
 

Detailed Description

Functions to setup 2D the video modes of the NDS and enable 3D.

Function Documentation

◆ NF_InitOpenGL()

void NF_InitOpenGL ( void  )

Initialitzes and configures OpenGL for 3D sprites.

NF_Init3dSpriteSys() automaticaly calls it, so the user doesn't need to call it manually.

◆ NF_Set3D()

void NF_Set3D ( int  screen,
u32  mode 
)

Init 3D mode for the selected screen.

Modes: 0 - Tiled BGs (256 colors). 2 - Affine BGs of 8 bits in layers 2 & 3 5 - Bitmap BGs at 8 or 16 bits.

The 3D output replaces layer 0.

If you set screen 1 for 3D, the screen numbers for 2D will be inverted (the top screen will be 1 and the bottom screen will be 0).

You must use this function before using 3D sprites.

Example:

// Setup video mode 0 (tiled backgrounds) with 3D
NF_Set3D(1, 0);
void NF_Set3D(int screen, u32 mode)
Init 3D mode for the selected screen.
Definition: nf_3d.c:15
Parameters
screenScreen (0 - 1).
modeMode (0, 2, 5).