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 (const 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.
 

Variables

static const pvr_init_params_t pvr_default_params
 PVR initialization structure defaults.
 

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 ( const 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

Referenced by main(), main(), main(), setup(), and setup().

◆ pvr_init_defaults()

int pvr_init_defaults ( void )

Simple PVR initialization.

This simpler function initializes the PVR using the default parameters defined in pvr_default_params.

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

Referenced by main(), main(), pvr_initialise(), and pvr_setup().

◆ 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

Referenced by main(), and main().

Variable Documentation

◆ pvr_default_params

const pvr_init_params_t pvr_default_params
static
Initial value:
= {
.vertex_buf_size = 512 * 1024,
.opb_overflow_count = 3
}
#define PVR_BINSIZE_16
16-word (64-byte) length
Definition pvr.h:648
#define PVR_BINSIZE_0
0-length (disables the list)
Definition pvr.h:646

PVR initialization structure defaults.

These are the default values for pvr_init_params_t used by pvr_init_defaults().

See also
pvr_init_defaults()