Dreambox C/C++ SDK v1.0.0
C/C++ SDK for creating Dreambox games
|
Go to the source code of this file.
Data Structures | |
struct | vdp_Rect |
An axis-aligned rectangle. More... | |
struct | vdp_Color32 |
A 32-bit color. More... | |
struct | vdp_Vertex |
A vertex which can be passed to vdp_drawGeometry. More... | |
Typedefs | |
typedef void(* | vsync_handler_t) () |
Callback type for vsync. More... | |
Functions | |
void | vdp_clearColor (const vdp_Color32 *color) |
Clear framebuffer to the given color value. More... | |
void | vdp_clearDepth (float depth) |
Clear depth buffer to the given depth value. More... | |
void | vdp_depthWrite (uint8_t enable) |
Set whether depth writes are enabled or disabled. More... | |
void | vdp_depthFunc (uint32_t comparison) |
Set the depth test function. More... | |
void | vdp_blendEquation (uint32_t mode) |
Set the blend equation mode. More... | |
void | vdp_blendFunc (uint32_t srcFactor, uint32_t dstFactor) |
Set the blend equation factors. More... | |
void | vdp_setWinding (uint32_t windingOrder) |
Set the winding order of vertices for backface culling. More... | |
void | vdp_setCulling (uint8_t enabled) |
Set whether backface culling is enabled or disabled. More... | |
void | vdp_drawGeometry (uint32_t topology, uint32_t first, uint32_t count, const vdp_Vertex *vertexData) |
Draw geometry to the screen. More... | |
uint32_t | vdp_allocTexture (uint8_t mipmap, uint32_t format, uint32_t width, uint32_t height) |
Allocate a texture. More... | |
void | vdp_releaseTexture (uint32_t textureHandle) |
Release previously allocated texture. More... | |
void | vdp_setTextureData (uint32_t textureHandle, uint32_t level, const void *data, uint32_t dataLen) |
Upload data to an allocated texture. More... | |
void | vdp_copyFbToTexture (vdp_Rect *srcRect, vdp_Rect *dstRect, uint32_t textureHandle) |
Copy a portion of the framebuffer into a texture. More... | |
uint32_t | vdp_getUsage () |
Report total texture memory usage in bytes. More... | |
void | vdp_setSampleParams (uint32_t filter, uint32_t wrapU, uint32_t wrapV) |
Set texture sampling params. More... | |
void | vdp_bindTexture (uint32_t textureHandle) |
Set texture to use for rendering. More... | |
void | vdp_viewport (uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
Set the current viewport rect. More... | |
void | vdp_submitDepthQuery (float refVal, uint32_t comparison, uint32_t x, uint32_t y, uint32_t w, uint32_t h) |
Submit a depth query of a portion of the framebuffer, comparing a region of it against a specified value. More... | |
uint32_t | vdp_getDepthQueryResult () |
Get the results of the previously submitted depth query. More... | |
void | vdp_setVsyncHandler (const vsync_handler_t handler) |
Set a callback handler for vsync. More... | |
uint32_t vdp_allocTexture | ( | uint8_t | mipmap, |
uint32_t | format, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
Allocate a texture.
mipmap | |
format | |
width | |
height |
void vdp_bindTexture | ( | uint32_t | textureHandle | ) |
Set texture to use for rendering.
textureHandle |
void vdp_blendEquation | ( | uint32_t | mode | ) |
Set the blend equation mode.
mode |
void vdp_blendFunc | ( | uint32_t | srcFactor, |
uint32_t | dstFactor | ||
) |
Set the blend equation factors.
srcFactor | |
dstFactor |
void vdp_clearColor | ( | const vdp_Color32 * | color | ) |
Clear framebuffer to the given color value.
color |
void vdp_clearDepth | ( | float | depth | ) |
Clear depth buffer to the given depth value.
depth |
Copy a portion of the framebuffer into a texture.
srcRect | Source rectangle of the framebuffer to copy |
dstRect | Destination rectangle of the texture to copy into |
textureHandle | The destination texture to copy into |
void vdp_depthFunc | ( | uint32_t | comparison | ) |
Set the depth test function.
comparison |
void vdp_depthWrite | ( | uint8_t | enable | ) |
Set whether depth writes are enabled or disabled.
enable |
void vdp_drawGeometry | ( | uint32_t | topology, |
uint32_t | first, | ||
uint32_t | count, | ||
const vdp_Vertex * | vertexData | ||
) |
Draw geometry to the screen.
topology | |
first | |
count | |
vertexData |
uint32_t vdp_getDepthQueryResult | ( | ) |
Get the results of the previously submitted depth query.
uint32_t vdp_getUsage | ( | ) |
Report total texture memory usage in bytes.
void vdp_releaseTexture | ( | uint32_t | textureHandle | ) |
Release previously allocated texture.
textureHandle |
void vdp_setCulling | ( | uint8_t | enabled | ) |
Set whether backface culling is enabled or disabled.
enabled |
void vdp_setSampleParams | ( | uint32_t | filter, |
uint32_t | wrapU, | ||
uint32_t | wrapV | ||
) |
Set texture sampling params.
filter | |
wrapU | |
wrapV |
void vdp_setTextureData | ( | uint32_t | textureHandle, |
uint32_t | level, | ||
const void * | data, | ||
uint32_t | dataLen | ||
) |
Upload data to an allocated texture.
textureHandle | |
level | |
data | |
dataLen |
void vdp_setVsyncHandler | ( | const vsync_handler_t | handler | ) |
Set a callback handler for vsync.
handler |
void vdp_setWinding | ( | uint32_t | windingOrder | ) |
Set the winding order of vertices for backface culling.
windingOrder |
void vdp_submitDepthQuery | ( | float | refVal, |
uint32_t | comparison, | ||
uint32_t | x, | ||
uint32_t | y, | ||
uint32_t | w, | ||
uint32_t | h | ||
) |
Submit a depth query of a portion of the framebuffer, comparing a region of it against a specified value.
refVal | The reference value to compare against |
comparison | The comparison to use |
x | The x coordinate of the region's top left corner |
y | The y coordinate of the region's top left corner |
w | The width of the region |
h | The height of the region |
void vdp_viewport | ( | uint32_t | x, |
uint32_t | y, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
Set the current viewport rect.
x | |
y | |
width | |
height |