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

PowerVR functionality which is managed globally More...

Topics

 Fog
 Hardware Fog API for the PowerVR
 
 Palettes
 Color palette management API of the PowerVR
 

Functions

void pvr_set_bg_color (float r, float g, float b)
 Set the background plane color.
 
void pvr_set_shadow_scale (bool enable, float scale_value)
 Set cheap shadow parameters.
 
void pvr_set_zclip (float zc)
 Set Z clipping depth.
 
int pvr_set_vertical_scale (float factor)
 Set the vertical scale factor.
 

Detailed Description

PowerVR functionality which is managed globally

These are miscellaneous parameters you can set which affect the rendering process.

Function Documentation

◆ pvr_set_bg_color()

void pvr_set_bg_color ( float r,
float g,
float b )

Set the background plane color.

This function sets the color of the area of the screen not covered by any other polygons.

Parameters
rRed component of the color to set
gGreen component of the color to set
bBlue component of the color to set

◆ pvr_set_shadow_scale()

void pvr_set_shadow_scale ( bool enable,
float scale_value )

Set cheap shadow parameters.

This function sets up the PVR cheap shadow parameters for use. You can only specify one scale value per frame, so the effect that you can get from this is somewhat limited, but if you want simple shadows, this is the easiest way to do it.

Polygons affected by a shadow modifier volume will effectively multiply their final color by the scale value set here when shadows are enabled and the polygon is inside the modifier (or outside for exclusion volumes).

Parameters
enableSet to true to enable cheap shadow mode.
scale_valueFloating point value (between 0 and 1) representing how colors of polygons affected by and inside the volume will be modified by the shadow volume.

◆ pvr_set_vertical_scale()

int pvr_set_vertical_scale ( float factor)

Set the vertical scale factor.

This function sets the vertical scale factor used when the PVR scene is rendered to the framebuffer. Generally you want 1.0f or near-1.0f values here. The default used by the PVR driver is 1.0f when using VGA, and 0.999f otherwise. Having a value slightly below 1.0f gives the image a pleasant smoothing.

Return values
0On success
-1On invalid factor value

◆ pvr_set_zclip()

void pvr_set_zclip ( float zc)

Set Z clipping depth.

This function sets the Z clipping depth. The default value for this is 0.0001.

Parameters
zcThe new value to set the z clip parameter to.