Miscellaneous utilities for the PVR API.
More...
#include <stdint.h>
#include <sys/cdefs.h>
Go to the source code of this file.
|
#define | PVR_PACK_COLOR(a, r, g, b) |
| Pack four floating point color values into a 32-bit integer form.
|
|
|
static uint32_t | PVR_PACK_16BIT_UV (float u, float v) |
| Pack two floating point coordinates into one 32-bit value, truncating them to 16-bits each.
|
|
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.
|
|
void | pvr_set_presort_mode (bool presort) |
| Set the translucent polygon sort mode for the next frame.
|
|
int | pvr_get_vbl_count (void) |
| Retrieve the current VBlank count.
|
|
int | pvr_get_stats (pvr_stats_t *stat) |
| Get the current statistics from the PVR.
|
|
bool | pvr_txr_set_stride (uint32_t texture_width) |
| Set the global stride width for non-power-of-two textures in PVR RAM.
|
|
uint32_t | pvr_txr_get_stride (void) |
| Get the current texture stride width in pixels as set in the PVR.
|
|
Miscellaneous utilities for the PVR API.
- Author
- Megan Potter
-
Roger Cattermole
-
Paul Boese
-
Brian Paul
-
Lawrence Sebald
-
Benoit Miller
-
Ruslan Rostovtsev
-
Falco Girgis
◆ PVR_PACK_COLOR
#define PVR_PACK_COLOR |
( |
| a, |
|
|
| r, |
|
|
| g, |
|
|
| b ) |
Value: ( \
( ((uint8_t)( (a) * 255 ) ) << 24 ) | \
( ((uint8_t)( (r) * 255 ) ) << 16 ) | \
( ((uint8_t)( (g) * 255 ) ) << 8 ) | \
( ((uint8_t)( (b) * 255 ) ) << 0 ) )
Pack four floating point color values into a 32-bit integer form.
All of the color values should be between 0 and 1.
- Parameters
-
a | Alpha value |
r | Red value |
g | Green value |
b | Blue value |
- Returns
- The packed color value
◆ PVR_PACK_16BIT_UV()
static uint32_t PVR_PACK_16BIT_UV |
( |
float | u, |
|
|
float | v ) |
|
inlinestatic |
Pack two floating point coordinates into one 32-bit value, truncating them to 16-bits each.
- Parameters
-
u | First coordinate to pack |
v | Second coordinate to pack |
- Returns
- The packed coordinates