Main Page
Modules
Classes
Files
File List
All
Classes
Functions
Variables
Typedefs
Enumerations
Groups
include
SDL_gpu_OpenGL_1_BASE.h
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
39
typedef
struct
ContextData_OpenGL_1_BASE
40
{
41
SDL_Color last_color;
42
GPU_bool last_use_texturing;
43
unsigned
int
last_shape;
44
GPU_bool last_use_blending;
45
GPU_BlendMode
last_blend_mode;
46
GPU_Rect
last_viewport;
47
GPU_Camera
last_camera;
48
GPU_bool last_camera_inverted;
49
50
GPU_Image
* last_image;
51
GPU_Target
* last_target;
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;
54
unsigned
short
blit_buffer_max_num_vertices;
55
unsigned
short
* index_buffer;
// Indexes into the blit buffer so we can use 4 vertices for every 2 triangles (1 quad)
56
unsigned
int
index_buffer_num_vertices;
57
unsigned
int
index_buffer_max_num_vertices;
58
}
ContextData_OpenGL_1_BASE
;
59
60
typedef
struct
ImageData_OpenGL_1_BASE
61
{
62
int
refcount;
63
GPU_bool owns_handle;
64
Uint32 handle;
65
Uint32 format;
66
}
ImageData_OpenGL_1_BASE
;
67
68
typedef
struct
TargetData_OpenGL_1_BASE
69
{
70
int
refcount;
71
Uint32 handle;
72
Uint32 format;
73
}
TargetData_OpenGL_1_BASE
;
74
75
76
77
#endif
TargetData_OpenGL_1_BASE
Definition:
SDL_gpu_OpenGL_1_BASE.h:68
GPU_Camera
Definition:
SDL_gpu.h:300
ImageData_OpenGL_1_BASE
Definition:
SDL_gpu_OpenGL_1_BASE.h:60
ContextData_OpenGL_1_BASE
Definition:
SDL_gpu_OpenGL_1_BASE.h:39
GPU_BlendMode
Definition:
SDL_gpu.h:159
GPU_Target
Definition:
SDL_gpu.h:398
GPU_Image
Definition:
SDL_gpu.h:263
GPU_Rect
Definition:
SDL_gpu.h:89
Generated by
1.8.6