My Project
Loading...
Searching...
No Matches
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
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_bool last_depth_test;
51 GPU_bool last_depth_write;
52 GPU_ComparisonEnum last_depth_function;
53
54 GPU_Image* last_image;
55 float* blit_buffer; // Holds sets of 4 vertices and 4 tex coords interleaved (e.g. [x0, y0, z0, s0, t0, ...]).
56 unsigned short blit_buffer_num_vertices;
57 unsigned short blit_buffer_max_num_vertices;
58 unsigned short* index_buffer; // Indexes into the blit buffer so we can use 4 vertices for every 2 triangles (1 quad)
59 unsigned int index_buffer_num_vertices;
60 unsigned int index_buffer_max_num_vertices;
62
64{
65 int refcount;
66 GPU_bool owns_handle;
67 Uint32 handle;
68 Uint32 format;
70
72{
73 int refcount;
74 Uint32 handle;
75 Uint32 format;
77
78
79
80#endif
GPU_ComparisonEnum
Definition: SDL_gpu.h:183
Definition: SDL_gpu_OpenGL_1_BASE.h:40
Definition: SDL_gpu.h:227
Definition: SDL_gpu.h:380
Definition: SDL_gpu.h:334
Definition: SDL_gpu.h:138
Definition: SDL_gpu_OpenGL_1_BASE.h:64
Definition: SDL_gpu_OpenGL_1_BASE.h:72