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.h
Go to the documentation of this file.
1 #ifndef _SDL_GPU_OPENGL_1_BASE_H__
2 #define _SDL_GPU_OPENGL_1_BASE_H__
3 
4 #include "SDL_gpu.h"
5 
6 #if !defined(SDL_GPU_DISABLE_OPENGL) && !defined(SDL_GPU_DISABLE_OPENGL_1_BASE)
7 
8  // Hacks to fix compile errors due to polluted namespace
9  #ifdef _WIN32
10  #define _WINUSER_H
11  #define _WINGDI_H
12  #endif
13 
14  #include "glew.h"
15 
16  #if defined(GL_EXT_bgr) && !defined(GL_BGR)
17  #define GL_BGR GL_BGR_EXT
18  #endif
19  #if defined(GL_EXT_bgra) && !defined(GL_BGRA)
20  #define GL_BGRA GL_BGRA_EXT
21  #endif
22  #if defined(GL_EXT_abgr) && !defined(GL_ABGR)
23  #define GL_ABGR GL_ABGR_EXT
24  #endif
25 
26  #undef GL_MIRRORED_REPEAT
27  #define GL_MIRRORED_REPEAT GL_MIRRORED_REPEAT_ARB
28 #endif
29 
30 
31 
32 #define GPU_CONTEXT_DATA ContextData_OpenGL_1_BASE
33 #define GPU_IMAGE_DATA ImageData_OpenGL_1_BASE
34 #define GPU_TARGET_DATA TargetData_OpenGL_1_BASE
35 
36 
37 
38 
40 {
41  SDL_Color last_color;
43  unsigned int last_shape;
49 
52  float* blit_buffer; // Holds sets of 4 vertices and 4 tex coords interleaved (e.g. [x0, y0, z0, s0, t0, ...]).
53  unsigned short blit_buffer_num_vertices;
55  unsigned short* index_buffer; // Indexes into the blit buffer so we can use 4 vertices for every 2 triangles (1 quad)
59 
61 {
62  int refcount;
63  Uint32 handle;
64  Uint32 format;
66 
68 {
69  int refcount;
70  Uint32 handle;
71  Uint32 format;
73 
74 
75 
76 #endif
struct ContextData_OpenGL_1_BASE ContextData_OpenGL_1_BASE
unsigned short blit_buffer_max_num_vertices
struct ImageData_OpenGL_1_BASE ImageData_OpenGL_1_BASE
struct TargetData_OpenGL_1_BASE TargetData_OpenGL_1_BASE