xoreos  0.0.5
types.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef GRAPHICS_TYPES_H
26 #define GRAPHICS_TYPES_H
27 
28 #include <vector>
29 
30 #include "src/common/fallthrough.h"
32 #include <SDL.h>
34 
35 #include "src/common/types.h"
36 
37 #ifdef XOREOS_INTERNAL_GLEW
38  #include "glew/glew.h"
39 #else
40  #include <GL/glew.h>
41 #endif
42 
43 namespace Graphics {
44 
45 typedef GLuint TextureID;
46 typedef GLuint ListID;
47 
49  kPixelFormatRGB = GL_RGB ,
50  kPixelFormatRGBA = GL_RGBA,
51  kPixelFormatBGR = GL_BGR ,
52  kPixelFormatBGRA = GL_BGRA
53 };
54 
56  kPixelFormatRGBA8 = GL_RGBA8,
57  kPixelFormatRGB8 = GL_RGB8,
58  kPixelFormatRGB5A1 = GL_RGB5_A1,
59  kPixelFormatRGB5 = GL_RGB5,
60  kPixelFormatDXT1 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT,
61  kPixelFormatDXT3 = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,
62  kPixelFormatDXT5 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
63 };
64 
66  kPixelDataType8 = GL_UNSIGNED_BYTE,
67  kPixelDataType1555 = GL_UNSIGNED_SHORT_1_5_5_5_REV,
68  kPixelDataType565 = GL_UNSIGNED_SHORT_5_6_5
69 };
70 
71 enum QueueType {
87 };
88 
95 };
96 
97 enum RenderPass {
101 };
102 
104  size_t position;
105 
107 
108  float r;
109  float g;
110  float b;
111  float a;
112 };
113 
114 typedef std::vector<ColorPosition> ColorPositions;
115 
116 #undef glCompressedTexImage2D
117 // Aliased to either glCompressedTexImage2D or glCompressedTexImage2DARB, whichever is available
118 extern PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D;
119 
120 } // End of namespace Graphics
121 
122 #endif // GRAPHICS_TYPES_H
A newly created texture.
Definition: types.h:73
Only render transparent parts.
Definition: types.h:99
A GUI object, behind the world objects.
Definition: types.h:77
An object containing shader information.
Definition: types.h:85
RenderableType
Definition: types.h:89
#define START_IGNORE_IMPLICIT_FALLTHROUGH
Definition: fallthrough.h:79
An object containing OpenGL structures.
Definition: types.h:84
For range checks.
Definition: types.h:86
A visible Debug Console object, in front of the Front GUI.
Definition: types.h:81
A visible GUI object, in front of the world objects.
Definition: types.h:79
An object in 3D space.
Definition: types.h:74
PixelDataType
Definition: types.h:65
PixelFormatRaw
Definition: types.h:55
A Debug Console object, in front of the Front GUI.
Definition: types.h:78
GLuint TextureID
Definition: types.h:45
A GUI object, in front of the world objects.
Definition: types.h:76
RenderPass
Definition: types.h:97
Render all parts.
Definition: types.h:100
GLuint ListID
Definition: types.h:46
QueueType
Definition: types.h:71
std::vector< ColorPosition > ColorPositions
Definition: types.h:114
A visible object in 3D space.
Definition: types.h:75
Low-level type definitions to handle fixed width types portably.
A currently playing video.
Definition: types.h:83
#define STOP_IGNORE_IMPLICIT_FALLTHROUGH
Definition: fallthrough.h:80
PixelFormat
Definition: types.h:48
Compiler-specific defines to mark an implicit switch-case fallthrough.
A video.
Definition: types.h:82
A visible GUI object, behind the world objects.
Definition: types.h:80
Only render opaque parts.
Definition: types.h:98
A texture.
Definition: types.h:72
PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D
Definition: graphics.cpp:71