blob: b36f8a2884f2af35446cd9db52d47e9d64f728c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*
* GemGL: openGL includes for GEM
*
* include this file if you want to include the
* openGL-headers installed on your system
*
* tasks:
*
* + this file hides the peculiarities of the various platforms
* (like "OpenGL/gl.h" vs "GL/gl.h")
*
* + define some pre-processor defines that are missing in the GL-headers
*
* + try to exclude parts of the GL-headers based on GemConfig.h
*
*/
#ifndef _INCLUDE__GEM_GEM_GEMGL_H_
#define _INCLUDE__GEM_GEM_GEMGL_H_
#include "Gem/ExportDef.h"
// I hate Microsoft...I shouldn't have to do this!
#ifdef _WIN32
# include <windows.h>
#endif
#ifdef GLEW_MX
# define GEM_MULTICONTEXT
#endif
#define GLEW_STATIC
#include "Gem/glew.h"
#ifdef __APPLE__
# include <OpenGL/OpenGL.h>
#elif defined _WIN32
# include "Gem/wglew.h"
#elif defined __linux__ || defined HAVE_GL_GLX_H
# include "Gem/glxew.h"
#endif /* OS */
#ifdef GEM_MULTICONTEXT
GEM_EXTERN GLEWContext*glewGetContext(void);
# ifdef __APPLE__
# elif defined _WIN32
GEM_EXTERN WGLEWContext*wglewGetContext(void);
# elif defined __linux__
GEM_EXTERN GLXEWContext*glxewGetContext(void);
# endif
#endif /* GEM_MULTICONTEXT */
#ifndef GL_YUV422_GEM
# define GL_YCBCR_422_GEM GL_YCBCR_422_APPLE
# define GL_YUV422_GEM GL_YCBCR_422_GEM
#endif /* GL_YUV422_GEM */
#ifndef GL_RGBA_GEM
# ifdef __APPLE__
# define GL_RGBA_GEM GL_BGRA_EXT
# else
# define GL_RGBA_GEM GL_RGBA
# endif
#endif /* GL_RGBA_GEM */
/* default draw-style */
#ifndef GL_DEFAULT_GEM
# define GL_DEFAULT_GEM 0xFFFF
#endif
/* uäh: in OSX10.3 we only have CGL-1.1 and
* all the functions are using "long*" rather than "GLint*")
* only CGL-1.2 got it right
*/
#ifdef CGL_VERSION_1_0
# ifdef CGL_VERSION_1_2
# define GemCGLint GLint
# else
# define GemCGLint long
# endif
#endif
#endif /* _INCLUDE__GEM_GEM_GEMGL_H_ */
|