The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SDL_gpu_OpenGL_1_BASE.c
Go to the documentation of this file.
2 
3 
4 #if defined(SDL_GPU_DISABLE_OPENGL) || defined(SDL_GPU_DISABLE_OPENGL_1_BASE)
5 
6 // Dummy implementations
9 
10 #else
11 
12 // Most of the code pulled in from here...
13 #define SDL_GPU_USE_OPENGL
14 #define SDL_GPU_DISABLE_SHADERS
15 #define SDL_GPU_USE_GL_TIER1
16 #define SDL_GPU_GL_TIER 1
17 #define SDL_GPU_GL_MAJOR_VERSION 1
18 #define SDL_GPU_APPLY_TRANSFORMS_TO_GL_STACK
19 #define SDL_GPU_NO_VAO
20 #include "../GL_common/SDL_gpu_GL_common.inl"
21 #include "../GL_common/SDL_gpuShapes_GL_common.inl"
22 
23 
25 {
26  GPU_Renderer* renderer = (GPU_Renderer*)malloc(sizeof(GPU_Renderer));
27  if(renderer == NULL)
28  return NULL;
29 
30  memset(renderer, 0, sizeof(GPU_Renderer));
31 
32  renderer->id = request;
33  renderer->id.id = GPU_RENDERER_OPENGL_1_BASE;
35  renderer->shader_version = 0;
36 
37  renderer->current_context_target = NULL;
38 
39  SET_COMMON_FUNCTIONS(renderer);
40 
41  return renderer;
42 }
43 
45 {
46  if(renderer == NULL)
47  return;
48 
49  free(renderer);
50 }
51 
52 #endif
GPU_Target * current_context_target
Definition: SDL_gpu.h:494
#define SET_COMMON_FUNCTIONS(renderer)
GPU_RendererEnum id
Definition: SDL_gpu.h:55
void GPU_FreeRenderer_OpenGL_1_BASE(GPU_Renderer *renderer)
GPU_RendererID id
Definition: SDL_gpu.h:484
GPU_Renderer * GPU_CreateRenderer_OpenGL_1_BASE(GPU_RendererID request)
GPU_ShaderLanguageEnum shader_language
Definition: SDL_gpu.h:489
static const GPU_RendererEnum GPU_RENDERER_OPENGL_1_BASE
Definition: SDL_gpu.h:37
int shader_version
Definition: SDL_gpu.h:490