KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Initialization

Driver initialization and shutdown More...

Topics

 Primitive Bin Sizes
 Available sizes for primitive bins
 

Data Structures

struct  pvr_init_params_t
 PVR initialization structure. More...
 

Functions

int pvr_init (pvr_init_params_t *params)
 Initialize the PVR chip to ready status.
 
int pvr_init_defaults (void)
 Simple PVR initialization.
 
int pvr_shutdown (void)
 Shut down the PVR chip from ready status.
 

Detailed Description

Driver initialization and shutdown

Initialization and shutdown: stuff you should only ever have to do once in your program.

Function Documentation

◆ pvr_init()

int pvr_init ( pvr_init_params_t * params)

Initialize the PVR chip to ready status.

This function enables the specified lists and uses the specified parameters. Note that bins and vertex buffers come from the texture memory pool, so only allocate what you actually need. Expects that a 2D mode was initialized already using the vid_* API.

Parameters
paramsThe set of parameters to initialize with
Return values
0On success
-1If the PVR has already been initialized or the video mode active is not suitable for 3D

◆ pvr_init_defaults()

int pvr_init_defaults ( void )

Simple PVR initialization.

This simpler function initializes the PVR using 16/16 for the opaque and translucent lists' bin sizes, and 0's for everything else. It sets 512KB of vertex buffer. This is equivalent to the old ta_init_defaults() for now.

Return values
0On success
-1If the PVR has already been initialized or the video mode active is not suitable for 3D

◆ pvr_shutdown()

int pvr_shutdown ( void )

Shut down the PVR chip from ready status.

This essentially leaves the video system in 2D mode as it was before the init.

Return values
0On success
-1If the PVR has not been initialized