RetroArch
rglgen_headers.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------
4  * The following license statement only applies to this libretro SDK code part (glsym).
5  * ---------------------------------------------------------------------------------------
6  *
7  * Permission is hereby granted, free of charge,
8  * to any person obtaining a copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation the rights to
10  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef RGLGEN_HEADERS_H__
24 #define RGLGEN_HEADERS_H__
25 
26 #ifdef HAVE_EGL
27 #include <EGL/egl.h>
28 #include <EGL/eglext.h>
29 #endif
30 
31 #if defined(IOS)
32 
33 #if defined(HAVE_OPENGLES3)
34 #include <OpenGLES/ES3/gl.h>
35 #include <OpenGLES/ES3/glext.h>
36 #else
37 #include <OpenGLES/ES2/gl.h>
38 #include <OpenGLES/ES2/glext.h>
39 #endif
40 
41 #elif defined(__APPLE__)
42 #include <OpenGL/gl.h>
43 #include <OpenGL/glext.h>
44 #elif defined(HAVE_PSGL)
45 #include <PSGL/psgl.h>
46 #include <GLES/glext.h>
47 #elif defined(HAVE_OPENGL_MODERN)
48 #include <GL3/gl3.h>
49 #include <GL3/gl3ext.h>
50 #elif defined(HAVE_OPENGLES3)
51 #include <GLES3/gl3.h>
52 #define __gl2_h_
53 #include <GLES2/gl2ext.h>
54 #elif defined(HAVE_OPENGLES2)
55 #include <GLES2/gl2.h>
56 #include <GLES2/gl2ext.h>
57 #elif defined(HAVE_OPENGLES1)
58 #include <GLES/gl.h>
59 #include <GLES/glext.h>
60 #else
61 #if defined(_WIN32) && !defined(_XBOX)
62 #define WIN32_LEAN_AND_MEAN
63 #include <windows.h>
64 #endif
65 #ifndef HAVE_LIBNX
66 #include <GL/gl.h>
67 #include <GL/glext.h>
68 #else
69 /* We need to avoid including <GL/gl.h> on this platform */
70 #include "switch/nx_gl.h"
71 #include <GL/glext.h>
72 #endif /* SWITCH */
73 #endif
74 
75 #ifndef GL_MAP_WRITE_BIT
76 #define GL_MAP_WRITE_BIT 0x0002
77 #endif
78 
79 #ifndef GL_MAP_INVALIDATE_BUFFER_BIT
80 #define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
81 #endif
82 
83 #ifndef GL_RED_INTEGER
84 #define GL_RED_INTEGER 0x8D94
85 #endif
86 
87 #endif