SDL_gpu  0.11.0
A hardware-accelerated, cross-platform 2D graphics API
Data Structures | Macros | Functions
SDL_gpu_renderer.c File Reference
#include "SDL_gpu.h"
#include "SDL_platform.h"
#include <string.h>
#include <strings.h>

Go to the source code of this file.

Data Structures

struct  GPU_RendererRegistration
 

Macros

#define GPU_MAX_ACTIVE_RENDERERS   20
 
#define GPU_MAX_REGISTERED_RENDERERS   10
 

Functions

void gpu_init_renderer_register (void)
 
void gpu_free_renderer_register (void)
 
GPU_RendererEnum GPU_ReserveNextRendererEnum (void)
 
int GPU_GetNumActiveRenderers (void)
 
void GPU_GetActiveRendererList (GPU_RendererID *renderers_array)
 
int GPU_GetNumRegisteredRenderers (void)
 
void GPU_GetRegisteredRendererList (GPU_RendererID *renderers_array)
 
GPU_RendererID GPU_GetRendererID (GPU_RendererEnum renderer)
 
GPU_RendererGPU_CreateRenderer_OpenGL_1_BASE (GPU_RendererID request)
 
void GPU_FreeRenderer_OpenGL_1_BASE (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_OpenGL_1 (GPU_RendererID request)
 
void GPU_FreeRenderer_OpenGL_1 (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_OpenGL_2 (GPU_RendererID request)
 
void GPU_FreeRenderer_OpenGL_2 (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_OpenGL_3 (GPU_RendererID request)
 
void GPU_FreeRenderer_OpenGL_3 (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_OpenGL_4 (GPU_RendererID request)
 
void GPU_FreeRenderer_OpenGL_4 (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_GLES_1 (GPU_RendererID request)
 
void GPU_FreeRenderer_GLES_1 (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_GLES_2 (GPU_RendererID request)
 
void GPU_FreeRenderer_GLES_2 (GPU_Renderer *renderer)
 
GPU_RendererGPU_CreateRenderer_GLES_3 (GPU_RendererID request)
 
void GPU_FreeRenderer_GLES_3 (GPU_Renderer *renderer)
 
void GPU_RegisterRenderer (GPU_RendererID id, GPU_Renderer *(*create_renderer)(GPU_RendererID request), void(*free_renderer)(GPU_Renderer *renderer))
 
void gpu_register_built_in_renderers (void)
 
void GPU_GetRendererOrder (int *order_size, GPU_RendererID *order)
 
void GPU_SetRendererOrder (int order_size, GPU_RendererID *order)
 
void GPU_GetDefaultRendererOrder (int *order_size, GPU_RendererID *order)
 
GPU_RendererGPU_CreateRenderer (GPU_RendererID id)
 
GPU_RendererGPU_GetRenderer (GPU_RendererID id)
 
GPU_Renderergpu_create_and_add_renderer (GPU_RendererID id)
 
void gpu_free_renderer_memory (GPU_Renderer *renderer)
 
void GPU_FreeRenderer (GPU_Renderer *renderer)
 

Macro Definition Documentation

◆ GPU_MAX_ACTIVE_RENDERERS

#define GPU_MAX_ACTIVE_RENDERERS   20

Definition at line 11 of file SDL_gpu_renderer.c.

◆ GPU_MAX_REGISTERED_RENDERERS

#define GPU_MAX_REGISTERED_RENDERERS   10

Definition at line 12 of file SDL_gpu_renderer.c.

Function Documentation

◆ gpu_create_and_add_renderer()

GPU_Renderer* gpu_create_and_add_renderer ( GPU_RendererID  id)

Definition at line 433 of file SDL_gpu_renderer.c.

◆ GPU_CreateRenderer()

GPU_Renderer* GPU_CreateRenderer ( GPU_RendererID  id)

Definition at line 382 of file SDL_gpu_renderer.c.

◆ GPU_CreateRenderer_GLES_1()

GPU_Renderer* GPU_CreateRenderer_GLES_1 ( GPU_RendererID  request)

Definition at line 29 of file renderer_GLES_1.c.

◆ GPU_CreateRenderer_GLES_2()

GPU_Renderer* GPU_CreateRenderer_GLES_2 ( GPU_RendererID  request)

Definition at line 31 of file renderer_GLES_2.c.

◆ GPU_CreateRenderer_GLES_3()

GPU_Renderer* GPU_CreateRenderer_GLES_3 ( GPU_RendererID  request)

Definition at line 34 of file renderer_GLES_3.c.

◆ GPU_CreateRenderer_OpenGL_1()

GPU_Renderer* GPU_CreateRenderer_OpenGL_1 ( GPU_RendererID  request)

Definition at line 28 of file renderer_OpenGL_1.c.

◆ GPU_CreateRenderer_OpenGL_1_BASE()

GPU_Renderer* GPU_CreateRenderer_OpenGL_1_BASE ( GPU_RendererID  request)

Definition at line 27 of file renderer_OpenGL_1_BASE.c.

◆ GPU_CreateRenderer_OpenGL_2()

GPU_Renderer* GPU_CreateRenderer_OpenGL_2 ( GPU_RendererID  request)

Definition at line 26 of file renderer_OpenGL_2.c.

◆ GPU_CreateRenderer_OpenGL_3()

GPU_Renderer* GPU_CreateRenderer_OpenGL_3 ( GPU_RendererID  request)

Definition at line 31 of file renderer_OpenGL_3.c.

◆ GPU_CreateRenderer_OpenGL_4()

GPU_Renderer* GPU_CreateRenderer_OpenGL_4 ( GPU_RendererID  request)

Definition at line 29 of file renderer_OpenGL_4.c.

◆ gpu_free_renderer_memory()

void gpu_free_renderer_memory ( GPU_Renderer renderer)

Definition at line 460 of file SDL_gpu_renderer.c.

◆ gpu_free_renderer_register()

void gpu_free_renderer_register ( void  )

Definition at line 266 of file SDL_gpu_renderer.c.

◆ GPU_FreeRenderer()

void GPU_FreeRenderer ( GPU_Renderer renderer)

Definition at line 480 of file SDL_gpu_renderer.c.

◆ GPU_FreeRenderer_GLES_1()

void GPU_FreeRenderer_GLES_1 ( GPU_Renderer renderer)

Definition at line 55 of file renderer_GLES_1.c.

◆ GPU_FreeRenderer_GLES_2()

void GPU_FreeRenderer_GLES_2 ( GPU_Renderer renderer)

Definition at line 57 of file renderer_GLES_2.c.

◆ GPU_FreeRenderer_GLES_3()

void GPU_FreeRenderer_GLES_3 ( GPU_Renderer renderer)

Definition at line 66 of file renderer_GLES_3.c.

◆ GPU_FreeRenderer_OpenGL_1()

void GPU_FreeRenderer_OpenGL_1 ( GPU_Renderer renderer)

Definition at line 54 of file renderer_OpenGL_1.c.

◆ GPU_FreeRenderer_OpenGL_1_BASE()

void GPU_FreeRenderer_OpenGL_1_BASE ( GPU_Renderer renderer)

Definition at line 53 of file renderer_OpenGL_1_BASE.c.

◆ GPU_FreeRenderer_OpenGL_2()

void GPU_FreeRenderer_OpenGL_2 ( GPU_Renderer renderer)

Definition at line 52 of file renderer_OpenGL_2.c.

◆ GPU_FreeRenderer_OpenGL_3()

void GPU_FreeRenderer_OpenGL_3 ( GPU_Renderer renderer)

Definition at line 57 of file renderer_OpenGL_3.c.

◆ GPU_FreeRenderer_OpenGL_4()

void GPU_FreeRenderer_OpenGL_4 ( GPU_Renderer renderer)

Definition at line 55 of file renderer_OpenGL_4.c.

◆ GPU_GetActiveRendererList()

void 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_GetDefaultRendererOrder()

void GPU_GetDefaultRendererOrder ( int *  order_size,
GPU_RendererID order 
)

Gets the default initialization renderer IDs for the current platform copied into the 'order' array and the number of renderer IDs into 'order_size'. Pass NULL for 'order' to just get the size of the renderer order array. Will return at most GPU_RENDERER_ORDER_MAX renderers.

Definition at line 323 of file SDL_gpu_renderer.c.

◆ GPU_GetNumActiveRenderers()

int GPU_GetNumActiveRenderers ( void  )

Gets the number of active (created) renderers.

Definition at line 43 of file SDL_gpu_renderer.c.

◆ GPU_GetNumRegisteredRenderers()

int GPU_GetNumRegisteredRenderers ( void  )

Gets the number of registered (available) renderers.

Definition at line 78 of file SDL_gpu_renderer.c.

◆ GPU_GetRegisteredRendererList()

void GPU_GetRegisteredRendererList ( GPU_RendererID renderers_array)

Gets an array of identifiers for the registered (available) renderers.

Definition at line 94 of file SDL_gpu_renderer.c.

◆ GPU_GetRenderer()

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

Definition at line 411 of file SDL_gpu_renderer.c.

◆ GPU_GetRendererID()

GPU_RendererID GPU_GetRendererID ( GPU_RendererEnum  renderer)

Gets the first registered renderer identifier for the given enum value.

Definition at line 113 of file SDL_gpu_renderer.c.

◆ GPU_GetRendererOrder()

void GPU_GetRendererOrder ( int *  order_size,
GPU_RendererID order 
)

Gets the current renderer ID order for initialization copied into the 'order' array and the number of renderer IDs into 'order_size'. Pass NULL for 'order' to just get the size of the renderer order array.

Definition at line 287 of file SDL_gpu_renderer.c.

◆ gpu_init_renderer_register()

void gpu_init_renderer_register ( void  )

Definition at line 240 of file SDL_gpu_renderer.c.

◆ gpu_register_built_in_renderers()

void gpu_register_built_in_renderers ( void  )

Definition at line 173 of file SDL_gpu_renderer.c.

◆ GPU_RegisterRenderer()

void GPU_RegisterRenderer ( GPU_RendererID  id,
GPU_Renderer *(*)(GPU_RendererID request)  create_renderer,
void(*)(GPU_Renderer *renderer)  free_renderer 
)

Definition at line 145 of file SDL_gpu_renderer.c.

◆ GPU_SetRendererOrder()

void GPU_SetRendererOrder ( int  order_size,
GPU_RendererID order 
)

Sets the renderer ID order to use for initialization. If 'order' is NULL, it will restore the default order.

Definition at line 296 of file SDL_gpu_renderer.c.