Go to the source code of this file.
Classes | |
struct | RendererRegistration |
Macros | |
#define | MAX_ACTIVE_RENDERERS 20 |
#define | MAX_REGISTERED_RENDERERS 10 |
Typedefs | |
typedef struct RendererRegistration | RendererRegistration |
Variables | |
static Uint8 | initialized = 0 |
static GPU_Renderer * | rendererMap [MAX_ACTIVE_RENDERERS] |
static RendererRegistration | rendererRegister [MAX_REGISTERED_RENDERERS] |
static int | renderer_order_size = 0 |
static GPU_RendererID | renderer_order [GPU_RENDERER_ORDER_MAX] |
#define MAX_ACTIVE_RENDERERS 20 |
Definition at line 11 of file SDL_gpu_Renderer.c.
Referenced by GPU_AddRenderer(), GPU_GetActiveRendererList(), GPU_GetNumActiveRenderers(), GPU_GetRenderer(), GPU_InitRendererRegister(), and GPU_RemoveRenderer().
#define MAX_REGISTERED_RENDERERS 10 |
Definition at line 12 of file SDL_gpu_Renderer.c.
Referenced by GPU_CreateRenderer(), GPU_FreeRenderer(), GPU_GetNumRegisteredRenderers(), GPU_GetRegisteredRendererList(), GPU_GetRendererID(), GPU_InitRendererRegister(), and GPU_RegisterRenderers().
typedef struct RendererRegistration RendererRegistration |
GPU_Renderer* GPU_AddRenderer | ( | GPU_RendererID | id | ) |
Creates a new renderer matching the given identifier.
Definition at line 364 of file SDL_gpu_Renderer.c.
References GPU_CreateRenderer(), GPU_ERROR_BACKEND_ERROR, GPU_PushErrorCode(), i, GPU_Renderer::id, GPU_RendererID::index, and MAX_ACTIVE_RENDERERS.
Referenced by GPU_InitRendererByID().
GPU_Renderer* GPU_CreateRenderer | ( | GPU_RendererID | id | ) |
Definition at line 317 of file SDL_gpu_Renderer.c.
References RendererRegistration::createFn, GPU_ERROR_DATA_ERROR, GPU_PushErrorCode(), GPU_RENDERER_UNKNOWN, i, and MAX_REGISTERED_RENDERERS.
Referenced by GPU_AddRenderer().
GPU_Renderer* GPU_CreateRenderer_GLES_1 | ( | GPU_RendererID | request | ) |
Definition at line 24 of file SDL_gpu_GLES_1.c.
References GPU_Renderer::current_context_target, GPU_LANGUAGE_NONE, GPU_RENDERER_GLES_1, GPU_RendererID::id, GPU_Renderer::id, SET_COMMON_FUNCTIONS, GPU_Renderer::shader_language, and GPU_Renderer::shader_version.
Referenced by GPU_RegisterRenderers().
GPU_Renderer* GPU_CreateRenderer_GLES_2 | ( | GPU_RendererID | request | ) |
Definition at line 24 of file SDL_gpu_GLES_2.c.
References GPU_Renderer::current_context_target, GPU_LANGUAGE_GLSLES, GPU_RENDERER_GLES_2, GPU_RendererID::id, GPU_Renderer::id, SDL_GPU_GLSL_VERSION, SET_COMMON_FUNCTIONS, GPU_Renderer::shader_language, and GPU_Renderer::shader_version.
Referenced by GPU_RegisterRenderers().
GPU_Renderer* GPU_CreateRenderer_OpenGL_1 | ( | GPU_RendererID | request | ) |
Definition at line 23 of file SDL_gpu_OpenGL_1.c.
References GPU_Renderer::current_context_target, GPU_LANGUAGE_GLSL, GPU_RENDERER_OPENGL_1, GPU_RendererID::id, GPU_Renderer::id, SDL_GPU_GLSL_VERSION, SET_COMMON_FUNCTIONS, GPU_Renderer::shader_language, and GPU_Renderer::shader_version.
Referenced by GPU_RegisterRenderers().
GPU_Renderer* GPU_CreateRenderer_OpenGL_1_BASE | ( | GPU_RendererID | request | ) |
Definition at line 24 of file SDL_gpu_OpenGL_1_BASE.c.
References GPU_Renderer::current_context_target, GPU_LANGUAGE_NONE, GPU_RENDERER_OPENGL_1_BASE, GPU_RendererID::id, GPU_Renderer::id, SET_COMMON_FUNCTIONS, GPU_Renderer::shader_language, and GPU_Renderer::shader_version.
Referenced by GPU_RegisterRenderers().
GPU_Renderer* GPU_CreateRenderer_OpenGL_2 | ( | GPU_RendererID | request | ) |
Definition at line 23 of file SDL_gpu_OpenGL_2.c.
References GPU_Renderer::current_context_target, GPU_LANGUAGE_GLSL, GPU_RENDERER_OPENGL_2, GPU_RendererID::id, GPU_Renderer::id, SDL_GPU_GLSL_VERSION, SET_COMMON_FUNCTIONS, GPU_Renderer::shader_language, and GPU_Renderer::shader_version.
Referenced by GPU_RegisterRenderers().
GPU_Renderer* GPU_CreateRenderer_OpenGL_3 | ( | GPU_RendererID | request | ) |
Definition at line 23 of file SDL_gpu_OpenGL_3.c.
References GPU_Renderer::current_context_target, GPU_LANGUAGE_GLSL, GPU_RENDERER_OPENGL_3, GPU_RendererID::id, GPU_Renderer::id, SDL_GPU_GLSL_VERSION, SET_COMMON_FUNCTIONS, GPU_Renderer::shader_language, and GPU_Renderer::shader_version.
Referenced by GPU_RegisterRenderers().
void GPU_FreeRenderer | ( | GPU_Renderer * | renderer | ) |
Definition at line 390 of file SDL_gpu_Renderer.c.
References RendererRegistration::freeFn, GPU_RENDERER_UNKNOWN, i, RendererRegistration::id, GPU_RendererID::id, GPU_Renderer::id, and MAX_REGISTERED_RENDERERS.
Referenced by GPU_RemoveRenderer().
void GPU_FreeRenderer_GLES_1 | ( | GPU_Renderer * | renderer | ) |
Definition at line 44 of file SDL_gpu_GLES_1.c.
Referenced by GPU_RegisterRenderers().
void GPU_FreeRenderer_GLES_2 | ( | GPU_Renderer * | renderer | ) |
Definition at line 44 of file SDL_gpu_GLES_2.c.
Referenced by GPU_RegisterRenderers().
void GPU_FreeRenderer_OpenGL_1 | ( | GPU_Renderer * | renderer | ) |
Definition at line 43 of file SDL_gpu_OpenGL_1.c.
Referenced by GPU_RegisterRenderers().
void GPU_FreeRenderer_OpenGL_1_BASE | ( | GPU_Renderer * | renderer | ) |
Definition at line 44 of file SDL_gpu_OpenGL_1_BASE.c.
Referenced by GPU_RegisterRenderers().
void GPU_FreeRenderer_OpenGL_2 | ( | GPU_Renderer * | renderer | ) |
Definition at line 43 of file SDL_gpu_OpenGL_2.c.
Referenced by GPU_RegisterRenderers().
void GPU_FreeRenderer_OpenGL_3 | ( | GPU_Renderer * | renderer | ) |
Definition at line 43 of file SDL_gpu_OpenGL_3.c.
Referenced by GPU_RegisterRenderers().
void GPU_GetActiveRendererList | ( | GPU_RendererID * | renderers_array | ) |
Gets an array of identifiers for the active renderers.
Definition at line 53 of file SDL_gpu_Renderer.c.
References GPU_InitRendererRegister(), i, GPU_Renderer::id, and MAX_ACTIVE_RENDERERS.
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 267 of file SDL_gpu_Renderer.c.
References GPU_MakeRendererID(), GPU_RENDERER_GLES_1, GPU_RENDERER_GLES_2, GPU_RENDERER_OPENGL_1, GPU_RENDERER_OPENGL_2, GPU_RENDERER_OPENGL_3, and GPU_RENDERER_ORDER_MAX.
Referenced by GPU_InitRendererRegister(), and GPU_SetRendererOrder().
Gets the number of active (created) renderers.
Definition at line 37 of file SDL_gpu_Renderer.c.
References GPU_InitRendererRegister(), i, and MAX_ACTIVE_RENDERERS.
Referenced by GPU_Quit(), and init_SDL().
Gets the number of registered (available) renderers.
Definition at line 72 of file SDL_gpu_Renderer.c.
References GPU_InitRendererRegister(), GPU_RENDERER_UNKNOWN, i, and MAX_REGISTERED_RENDERERS.
void GPU_GetRegisteredRendererList | ( | GPU_RendererID * | renderers_array | ) |
Gets an array of identifiers for the registered (available) renderers.
Definition at line 88 of file SDL_gpu_Renderer.c.
References GPU_InitRendererRegister(), GPU_RENDERER_UNKNOWN, i, RendererRegistration::id, and MAX_REGISTERED_RENDERERS.
GPU_Renderer* GPU_GetRenderer | ( | unsigned int | index | ) |
Gets the renderer for the given renderer index.
Definition at line 344 of file SDL_gpu_Renderer.c.
References MAX_ACTIVE_RENDERERS.
Referenced by GPU_GetRendererByID().
GPU_Renderer* GPU_GetRendererByID | ( | GPU_RendererID | id | ) |
Definition at line 353 of file SDL_gpu_Renderer.c.
References GPU_GetRenderer(), and GPU_InitRendererRegister().
Referenced by GPU_SetCurrentRenderer().
const char* GPU_GetRendererEnumString | ( | GPU_RendererEnum | id | ) |
Translates a GPU_RendererEnum into a string.
Definition at line 288 of file SDL_gpu_Renderer.c.
References GPU_RENDERER_D3D10, GPU_RENDERER_D3D11, GPU_RENDERER_D3D9, GPU_RENDERER_GLES_1, GPU_RENDERER_GLES_2, GPU_RENDERER_GLES_3, GPU_RENDERER_OPENGL_1, GPU_RENDERER_OPENGL_1_BASE, GPU_RENDERER_OPENGL_2, GPU_RENDERER_OPENGL_3, and GPU_RENDERER_OPENGL_4.
GPU_RendererID GPU_GetRendererID | ( | unsigned int | index | ) |
Gets the renderer identifier for the given registration index.
Definition at line 107 of file SDL_gpu_Renderer.c.
References GPU_RENDERER_UNKNOWN, RendererRegistration::id, makeRendererID(), and MAX_REGISTERED_RENDERERS.
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 231 of file SDL_gpu_Renderer.c.
References renderer_order_size.
Referenced by GPU_Init().
Definition at line 204 of file SDL_gpu_Renderer.c.
References RendererRegistration::createFn, RendererRegistration::freeFn, GPU_GetDefaultRendererOrder(), GPU_RegisterRenderers(), GPU_RENDERER_UNKNOWN, i, RendererRegistration::id, GPU_RendererID::id, GPU_RendererID::index, initialized, MAX_ACTIVE_RENDERERS, MAX_REGISTERED_RENDERERS, and renderer_order_size.
Referenced by GPU_GetActiveRendererList(), GPU_GetNumActiveRenderers(), GPU_GetNumRegisteredRenderers(), GPU_GetRegisteredRendererList(), GPU_GetRendererByID(), GPU_Init(), and GPU_InitRendererByID().
void GPU_RegisterRenderers | ( | ) |
Definition at line 128 of file SDL_gpu_Renderer.c.
References RendererRegistration::createFn, RendererRegistration::freeFn, GPU_CreateRenderer_GLES_1(), GPU_CreateRenderer_GLES_2(), GPU_CreateRenderer_OpenGL_1(), GPU_CreateRenderer_OpenGL_1_BASE(), GPU_CreateRenderer_OpenGL_2(), GPU_CreateRenderer_OpenGL_3(), GPU_FreeRenderer_GLES_1(), GPU_FreeRenderer_GLES_2(), GPU_FreeRenderer_OpenGL_1(), GPU_FreeRenderer_OpenGL_1_BASE(), GPU_FreeRenderer_OpenGL_2(), GPU_FreeRenderer_OpenGL_3(), GPU_RENDERER_GLES_1, GPU_RENDERER_GLES_2, GPU_RENDERER_OPENGL_1, GPU_RENDERER_OPENGL_1_BASE, GPU_RENDERER_OPENGL_2, GPU_RENDERER_OPENGL_3, i, RendererRegistration::id, makeRendererID(), and MAX_REGISTERED_RENDERERS.
Referenced by GPU_InitRendererRegister().
void GPU_RemoveRenderer | ( | GPU_RendererID | id | ) |
Deletes the renderer matching the given identifier.
Definition at line 407 of file SDL_gpu_Renderer.c.
References GPU_FreeRenderer(), i, and MAX_ACTIVE_RENDERERS.
Referenced by GPU_CloseCurrentRenderer(), and GPU_Quit().
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 240 of file SDL_gpu_Renderer.c.
References GPU_ERROR_USER_ERROR, GPU_GetDefaultRendererOrder(), GPU_PushErrorCode(), GPU_RENDERER_ORDER_MAX, and renderer_order_size.
|
static |
Definition at line 28 of file SDL_gpu_Renderer.c.
Referenced by GPU_GetRendererID(), and GPU_RegisterRenderers().
|
static |
Definition at line 21 of file SDL_gpu_Renderer.c.
Referenced by GPU_InitRendererRegister(), and toptions::singleton().
|
static |
Definition at line 202 of file SDL_gpu_Renderer.c.
Referenced by GPU_Init().
|
static |
Definition at line 201 of file SDL_gpu_Renderer.c.
Referenced by GPU_GetRendererOrder(), GPU_Init(), GPU_InitRendererRegister(), and GPU_SetRendererOrder().
|
static |
Definition at line 23 of file SDL_gpu_Renderer.c.
|
static |
Definition at line 24 of file SDL_gpu_Renderer.c.