Classes | |
struct | GPU_Rect |
Typedefs | |
typedef struct GPU_Rect | GPU_Rect |
typedef Uint32 | GPU_BatchFlagEnum |
DECLSPEC void SDLCALL | GPU_Clear (GPU_Target *target) |
DECLSPEC void SDLCALL | GPU_ClearColor (GPU_Target *target, SDL_Color color) |
DECLSPEC void SDLCALL | GPU_ClearRGB (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b) |
DECLSPEC void SDLCALL | GPU_ClearRGBA (GPU_Target *target, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
DECLSPEC void SDLCALL | GPU_Blit (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y) |
DECLSPEC void SDLCALL | GPU_BlitRotate (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees) |
DECLSPEC void SDLCALL | GPU_BlitScale (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float scaleX, float scaleY) |
DECLSPEC void SDLCALL | GPU_BlitTransform (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float degrees, float scaleX, float scaleY) |
DECLSPEC void SDLCALL | GPU_BlitTransformX (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, float x, float y, float pivot_x, float pivot_y, float degrees, float scaleX, float scaleY) |
DECLSPEC void SDLCALL | GPU_BlitRect (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, GPU_Rect *dest_rect) |
DECLSPEC void SDLCALL | GPU_BlitRectX (GPU_Image *image, GPU_Rect *src_rect, GPU_Target *target, GPU_Rect *dest_rect, float degrees, float pivot_x, float pivot_y, GPU_FlipEnum flip_direction) |
DECLSPEC void SDLCALL | GPU_TriangleBatch (GPU_Image *image, GPU_Target *target, unsigned short num_vertices, float *values, unsigned int num_indices, unsigned short *indices, GPU_BatchFlagEnum flags) |
DECLSPEC void SDLCALL | GPU_TriangleBatchX (GPU_Image *image, GPU_Target *target, unsigned short num_vertices, void *values, unsigned int num_indices, unsigned short *indices, GPU_BatchFlagEnum flags) |
DECLSPEC void SDLCALL | GPU_FlushBlitBuffer (void) |
DECLSPEC void SDLCALL | GPU_Flip (GPU_Target *target) |
typedef Uint32 GPU_BatchFlagEnum |
Bit flags for geometry batching.
A struct representing a rectangular area with floating point precision.
DECLSPEC void SDLCALL GPU_Blit | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
float | x, | ||
float | y | ||
) |
Draws the given image to the given render target.
src_rect | The region of the source image to use. Pass NULL for the entire image. |
x | Destination x-position |
y | Destination y-position |
DECLSPEC void SDLCALL GPU_BlitRect | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
GPU_Rect * | dest_rect | ||
) |
Draws the given image to the given render target, scaling it to fit the destination region.
src_rect | The region of the source image to use. Pass NULL for the entire image. |
dest_rect | The region of the destination target image to draw upon. Pass NULL for the entire target. |
DECLSPEC void SDLCALL GPU_BlitRectX | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
GPU_Rect * | dest_rect, | ||
float | degrees, | ||
float | pivot_x, | ||
float | pivot_y, | ||
GPU_FlipEnum | flip_direction | ||
) |
Draws the given image to the given render target, scaling it to fit the destination region.
src_rect | The region of the source image to use. Pass NULL for the entire image. |
dest_rect | The region of the destination target image to draw upon. Pass NULL for the entire target. |
degrees | Rotation angle (in degrees) |
pivot_x | Pivot x-position (in image coordinates) |
pivot_y | Pivot y-position (in image coordinates) |
flip_direction | A GPU_FlipEnum value (or bitwise OR'd combination) that specifies which direction the image should be flipped. |
DECLSPEC void SDLCALL GPU_BlitRotate | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
float | x, | ||
float | y, | ||
float | degrees | ||
) |
Rotates and draws the given image to the given render target.
src_rect | The region of the source image to use. Pass NULL for the entire image. |
x | Destination x-position |
y | Destination y-position |
degrees | Rotation angle (in degrees) |
DECLSPEC void SDLCALL GPU_BlitScale | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
float | x, | ||
float | y, | ||
float | scaleX, | ||
float | scaleY | ||
) |
Scales and draws the given image to the given render target.
src_rect | The region of the source image to use. Pass NULL for the entire image. |
x | Destination x-position |
y | Destination y-position |
scaleX | Horizontal stretch factor |
scaleY | Vertical stretch factor |
DECLSPEC void SDLCALL GPU_BlitTransform | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
float | x, | ||
float | y, | ||
float | degrees, | ||
float | scaleX, | ||
float | scaleY | ||
) |
Scales, rotates, and draws the given image to the given render target.
src_rect | The region of the source image to use. Pass NULL for the entire image. |
x | Destination x-position |
y | Destination y-position |
degrees | Rotation angle (in degrees) |
scaleX | Horizontal stretch factor |
scaleY | Vertical stretch factor |
DECLSPEC void SDLCALL GPU_BlitTransformX | ( | GPU_Image * | image, |
GPU_Rect * | src_rect, | ||
GPU_Target * | target, | ||
float | x, | ||
float | y, | ||
float | pivot_x, | ||
float | pivot_y, | ||
float | degrees, | ||
float | scaleX, | ||
float | scaleY | ||
) |
Scales, rotates around a pivot point, and draws the given image to the given render target. The drawing point (x, y) coincides with the pivot point on the src image (pivot_x, pivot_y).
src_rect | The region of the source image to use. Pass NULL for the entire image. |
x | Destination x-position |
y | Destination y-position |
pivot_x | Pivot x-position (in image coordinates) |
pivot_y | Pivot y-position (in image coordinates) |
degrees | Rotation angle (in degrees) |
scaleX | Horizontal stretch factor |
scaleY | Vertical stretch factor |
DECLSPEC void SDLCALL GPU_Clear | ( | GPU_Target * | target | ) |
Clears the contents of the given render target. Fills the target with color {0, 0, 0, 0}.
DECLSPEC void SDLCALL GPU_ClearColor | ( | GPU_Target * | target, |
SDL_Color | color | ||
) |
Fills the given render target with a color.
DECLSPEC void SDLCALL GPU_ClearRGB | ( | GPU_Target * | target, |
Uint8 | r, | ||
Uint8 | g, | ||
Uint8 | b | ||
) |
Fills the given render target with a color (alpha is 255, fully opaque).
DECLSPEC void SDLCALL GPU_ClearRGBA | ( | GPU_Target * | target, |
Uint8 | r, | ||
Uint8 | g, | ||
Uint8 | b, | ||
Uint8 | a | ||
) |
Fills the given render target with a color.
DECLSPEC void SDLCALL GPU_Flip | ( | GPU_Target * | target | ) |
Updates the given target's associated window. For non-context targets (e.g. image targets), this will flush the blit buffer.
DECLSPEC void SDLCALL GPU_FlushBlitBuffer | ( | void | ) |
Send all buffered blitting data to the current context target.
DECLSPEC void SDLCALL GPU_TriangleBatch | ( | GPU_Image * | image, |
GPU_Target * | target, | ||
unsigned short | num_vertices, | ||
float * | values, | ||
unsigned int | num_indices, | ||
unsigned short * | indices, | ||
GPU_BatchFlagEnum | flags | ||
) |
Renders triangles from the given set of vertices. This lets you render arbitrary 2D geometry. It is a direct path to the GPU, so the format is different than typical SDL_gpu calls.
values | A tightly-packed array of vertex position (e.g. x,y), texture coordinates (e.g. s,t), and color (e.g. r,g,b,a) values. Texture coordinates and color values are expected to be already normalized to 0.0 - 1.0. Pass NULL to render with only custom shader attributes. |
indices | If not NULL, this is used to specify which vertices to use and in what order (i.e. it indexes the vertices in the 'values' array). |
flags | Bit flags to control the interpretation of the 'values' array parameters. |
DECLSPEC void SDLCALL GPU_TriangleBatchX | ( | GPU_Image * | image, |
GPU_Target * | target, | ||
unsigned short | num_vertices, | ||
void * | values, | ||
unsigned int | num_indices, | ||
unsigned short * | indices, | ||
GPU_BatchFlagEnum | flags | ||
) |
Renders triangles from the given set of vertices. This lets you render arbitrary 2D geometry. It is a direct path to the GPU, so the format is different than typical SDL_gpu calls.
values | A tightly-packed array of vertex position (e.g. x,y), texture coordinates (e.g. s,t), and color (e.g. r,g,b,a) values. Texture coordinates and color values are expected to be already normalized to 0.0 - 1.0 (or 0 - 255 for 8-bit color components). Pass NULL to render with only custom shader attributes. |
indices | If not NULL, this is used to specify which vertices to use and in what order (i.e. it indexes the vertices in the 'values' array). |
flags | Bit flags to control the interpretation of the 'values' array parameters. |