SDL_gpu  0.11.0
A hardware-accelerated, cross-platform 2D graphics API
Data Structures
Renderer Controls

Data Structures

struct  GPU_RendererID
 
DECLSPEC GPU_RendererEnum SDLCALL GPU_ReserveNextRendererEnum (void)
 
DECLSPEC int SDLCALL GPU_GetNumActiveRenderers (void)
 
DECLSPEC void SDLCALL GPU_GetActiveRendererList (GPU_RendererID *renderers_array)
 
DECLSPEC GPU_Renderer *SDLCALL GPU_GetCurrentRenderer (void)
 
DECLSPEC void SDLCALL GPU_SetCurrentRenderer (GPU_RendererID id)
 
DECLSPEC GPU_Renderer *SDLCALL GPU_GetRenderer (GPU_RendererID id)
 
DECLSPEC void SDLCALL GPU_FreeRenderer (GPU_Renderer *renderer)
 
DECLSPEC void SDLCALL GPU_ResetRendererState (void)
 
DECLSPEC void SDLCALL GPU_SetCoordinateMode (GPU_bool use_math_coords)
 
DECLSPEC GPU_bool SDLCALL GPU_GetCoordinateMode (void)
 
DECLSPEC void SDLCALL GPU_SetDefaultAnchor (float anchor_x, float anchor_y)
 
DECLSPEC void SDLCALL GPU_GetDefaultAnchor (float *anchor_x, float *anchor_y)
 

Detailed Description

Function Documentation

◆ GPU_FreeRenderer()

DECLSPEC void SDLCALL GPU_FreeRenderer ( GPU_Renderer renderer)

Definition at line 480 of file SDL_gpu_renderer.c.

◆ GPU_GetActiveRendererList()

DECLSPEC void SDLCALL GPU_GetActiveRendererList ( GPU_RendererID renderers_array)

Gets an array of identifiers for the active renderers.

Definition at line 59 of file SDL_gpu_renderer.c.

◆ GPU_GetCoordinateMode()

DECLSPEC GPU_bool SDLCALL GPU_GetCoordinateMode ( void  )

Definition at line 105 of file SDL_gpu.c.

◆ GPU_GetCurrentRenderer()

DECLSPEC GPU_Renderer* SDLCALL GPU_GetCurrentRenderer ( void  )
Returns
The current renderer

Definition at line 113 of file SDL_gpu.c.

◆ GPU_GetDefaultAnchor()

DECLSPEC void SDLCALL GPU_GetDefaultAnchor ( float *  anchor_x,
float *  anchor_y 
)

Returns the default image blitting anchor through the given variables.

See also
GPU_GetAnchor

Definition at line 1915 of file SDL_gpu.c.

◆ GPU_GetNumActiveRenderers()

DECLSPEC int SDLCALL GPU_GetNumActiveRenderers ( void  )

Gets the number of active (created) renderers.

Definition at line 43 of file SDL_gpu_renderer.c.

◆ GPU_GetRenderer()

DECLSPEC GPU_Renderer* SDLCALL GPU_GetRenderer ( GPU_RendererID  id)
Returns
The renderer matching the given identifier.

Definition at line 411 of file SDL_gpu_renderer.c.

◆ GPU_ReserveNextRendererEnum()

DECLSPEC GPU_RendererEnum SDLCALL GPU_ReserveNextRendererEnum ( void  )

Gets the next enum ID that can be used for a custom renderer.

Definition at line 37 of file SDL_gpu_renderer.c.

◆ GPU_ResetRendererState()

DECLSPEC void SDLCALL GPU_ResetRendererState ( void  )

Reapplies the renderer state to the backend API (e.g. OpenGL, Direct3D). Use this if you want SDL_gpu to be able to render after you've used direct backend calls.

Definition at line 89 of file SDL_gpu.c.

◆ GPU_SetCoordinateMode()

DECLSPEC void SDLCALL GPU_SetCoordinateMode ( GPU_bool  use_math_coords)

Sets the coordinate mode for this renderer. Target and image coordinates will be either "inverted" (0,0 is the upper left corner, y increases downward) or "mathematical" (0,0 is the bottom-left corner, y increases upward). The default is inverted (0), as this is traditional for 2D graphics.

Parameters
inverted0 is for inverted coordinates, 1 is for mathematical coordinates

Definition at line 97 of file SDL_gpu.c.

◆ GPU_SetCurrentRenderer()

DECLSPEC void SDLCALL GPU_SetCurrentRenderer ( GPU_RendererID  id)

Switches the current renderer to the renderer matching the given identifier.

Definition at line 81 of file SDL_gpu.c.

◆ GPU_SetDefaultAnchor()

DECLSPEC void SDLCALL GPU_SetDefaultAnchor ( float  anchor_x,
float  anchor_y 
)

Sets the default image blitting anchor for newly created images.

See also
GPU_SetAnchor

Definition at line 1906 of file SDL_gpu.c.