Panda3D
glesgsg.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file glesgsg.h
10  * @author rdb
11  * @date 2009-05-21
12  */
13 
14 #ifndef GLESGSG_H
15 #define GLESGSG_H
16 
17 // This header file compiles a GSG for the limited subset of OpenGL that is
18 // OpenGL ES.
19 
20 #include "pandabase.h"
21 #include "config_glesgsg.h"
22 
23 #define GLP(name) gl##name
24 
25 // OpenGL ES does not support double-precision.
26 #define GLPf(name) gl ## name ## f
27 #define GLPfv(name) gl ## name ## fv
28 
29 #define CLP(name) GLES##name
30 #define GLPREFIX_QUOTED "gl"
31 #define CLASSPREFIX_QUOTED "GLES"
32 #define GLSYSTEM_NAME "OpenGL ES"
33 #define CONFIGOBJ config_glesgsg
34 #define GLCAT glesgsg_cat
35 #define EXPCL_GL EXPCL_PANDAGLES
36 #define EXPTP_GL EXPTP_PANDAGLES
37 #ifndef OPENGLES
38  #define OPENGLES
39 #endif
40 #ifndef OPENGLES_1
41  #define OPENGLES_1
42 #endif
43 #ifdef OPENGLES_2
44  #error OPENGLES_2 should not be defined!
45 #endif
46 
47 // OpenGL ES 1 has only the fixed-function pipeline.
48 #ifndef SUPPORT_FIXED_FUNCTION
49 #define SUPPORT_FIXED_FUNCTION
50 #endif
51 
52 // This prevents glext.h from getting included by gl.h That way, we can
53 // provide our own, better version.
54 #define __glext_h_
55 #define ES1_GLEXT_H_GUARD
56 
57 #ifdef BUILD_IPHONE
58  #include <OpenGLES/ES1/gl.h>
59 // #include <OpenGLESES1glext.h>
60 #else
61  #include <GLES/gl.h>
62 // #include <GLESglext.h>
63 #endif
64 
65 // Some implementations (Arch Linux) set this in glext.h
66 typedef char GLchar;
67 
68 #include "panda_esglext.h"
69 
70 // This helps to keep the source clean of hundreds of ifdefs.
71 #define GL_NONE GL_NONE_OES
72 #define GL_RENDERBUFFER_EXT GL_RENDERBUFFER_OES
73 #define GL_RENDERBUFFER_RED_SIZE_EXT GL_RENDERBUFFER_RED_SIZE_OES
74 #define GL_RENDERBUFFER_GREEN_SIZE_EXT GL_RENDERBUFFER_GREEN_SIZE_OES
75 #define GL_RENDERBUFFER_BLUE_SIZE_EXT GL_RENDERBUFFER_BLUE_SIZE_OES
76 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT GL_RENDERBUFFER_ALPHA_SIZE_OES
77 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT GL_RENDERBUFFER_DEPTH_SIZE_OES
78 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT GL_RENDERBUFFER_STENCIL_SIZE_OES
79 #define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES
80 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
81 #define GL_DRAW_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
82 #define GL_READ_FRAMEBUFFER_EXT GL_FRAMEBUFFER_OES
83 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0_OES
84 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT_OES
85 #define GL_STENCIL_ATTACHMENT_EXT GL_STENCIL_ATTACHMENT_OES
86 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE_OES
87 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES
88 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES
89 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES
90 #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
91 #define GL_FRAMEBUFFER_UNSUPPORTED_EXT GL_FRAMEBUFFER_UNSUPPORTED_OES
92 #define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT24_OES
93 #define GL_DEPTH_STENCIL GL_DEPTH_STENCIL_OES
94 #define GL_DEPTH_STENCIL_EXT GL_DEPTH_STENCIL_OES
95 #define GL_UNSIGNED_INT_24_8_EXT GL_UNSIGNED_INT_24_8_OES
96 #define GL_DEPTH24_STENCIL8_EXT GL_DEPTH24_STENCIL8_OES
97 #define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES
98 #define GL_DEPTH_COMPONENT16 GL_DEPTH_COMPONENT16_OES
99 #define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES
100 #define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES
101 #define GL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP_OES
102 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES
103 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES
104 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES
105 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES
106 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES
107 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES
108 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES
109 #define GL_MIRRORED_REPEAT GL_MIRRORED_REPEAT_OES
110 #define GL_RGB5_A1 GL_RGB5_A1_OES
111 #define GL_RGBA4 GL_RGBA4_OES
112 #define GL_RGB8 GL_RGB8_OES
113 #define GL_RGBA8 GL_RGBA8_OES
114 #define GL_FUNC_ADD GL_FUNC_ADD_OES
115 #define GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_OES
116 #define GL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT_OES
117 #define GL_BGRA GL_BGRA_EXT
118 #define GL_RGB16F GL_RGB16F_EXT
119 #define GL_RGBA16F GL_RGBA16F_EXT
120 #define GL_RGB32F GL_RGB32F_EXT
121 #define GL_RGBA32F GL_RGBA32F_EXT
122 #define GL_ALPHA8 GL_ALPHA8_EXT
123 #define GL_LUMINANCE8 GL_LUMINANCE8_EXT
124 #define GL_LUMINANCE8_ALPHA8 GL_LUMINANCE8_ALPHA8_EXT
125 #define GL_MAX_VERTEX_UNITS_ARB GL_MAX_VERTEX_UNITS_OES
126 #define GL_TEXTURE_MAX_LEVEL GL_TEXTURE_MAX_LEVEL_APPLE
127 
128 // These aren't technically part of OpenGL ES 1.0, but some implementations
129 // nonetheless implement it.
130 #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
131 #define GL_DEBUG_TYPE_PERFORMANCE 0x8250
132 #define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
133 #define GL_DEBUG_SEVERITY_HIGH 0x9146
134 #define GL_DEBUG_SEVERITY_MEDIUM 0x9147
135 #define GL_DEBUG_SEVERITY_LOW 0x9148
136 #define GL_DEBUG_OUTPUT 0x92E0
137 
138 #define GL_COMPRESSED_R11_EAC 0x9270
139 #define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
140 #define GL_COMPRESSED_RG11_EAC 0x9272
141 #define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
142 #define GL_COMPRESSED_RGB8_ETC2 0x9274
143 #define GL_COMPRESSED_SRGB8_ETC2 0x9275
144 #define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
145 #define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
146 #define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
147 #define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
148 
149 #undef SUPPORT_IMMEDIATE_MODE
150 #define APIENTRY
151 #define APIENTRYP *
152 
153 #include "glstuff_src.h"
154 
155 #endif // GLESGSG_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.