Blender  V2.93
symbol-binding.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2014 Blender Foundation.
17  * All rights reserved.
18  */
19 
31 #ifndef __SYMBOL_BINDING_H__
32 #define __SYMBOL_BINDING_H__
33 
34 #ifndef __GLEW_MX_H__
35 # error This file is meant to be included from glew-mx.h
36 #endif
37 
38 #ifdef GLEW_ES_ONLY
39 
40 /* ES does not support the GLdouble type. */
41 # ifndef GLdouble
42 # define GLdouble double
43 # endif
44 
45 /*
46  * Need stubs for these version checks if compiling with only ES support.
47  * Rely on compiler to eliminate unreachable code when version checks become constants.
48  */
49 
50 # ifndef GLEW_VERSION_1_1
51 # define GLEW_VERSION_1_1 0
52 # endif
53 
54 # ifndef GLEW_VERSION_1_2
55 # define GLEW_VERSION_1_2 0
56 # endif
57 
58 # ifndef GLEW_VERSION_1_3
59 # define GLEW_VERSION_1_3 0
60 # endif
61 
62 # ifndef GLEW_VERSION_1_4
63 # define GLEW_VERSION_1_4 0
64 # endif
65 
66 # ifndef GLEW_VERSION_1_5
67 # define GLEW_VERSION_1_5 0
68 # endif
69 
70 # ifndef GLEW_VERSION_2_0
71 # define GLEW_VERSION_2_0 0
72 # endif
73 
74 # ifndef GLEW_VERSION_3_0
75 # define GLEW_VERSION_3_0 0
76 # endif
77 
78 # ifndef GLEW_ARB_shader_objects
79 # define GLEW_ARB_shader_objects 0
80 # endif
81 
82 # ifndef GLEW_ARB_vertex_shader
83 # define GLEW_ARB_vertex_shader 0
84 # endif
85 
86 # ifndef GLEW_ARB_vertex_program
87 # define GLEW_ARB_vertex_program 0
88 # endif
89 
90 # ifndef GLEW_ARB_fragment_program
91 # define GLEW_ARB_fragment_program 0
92 # endif
93 
94 # ifndef GLEW_ARB_vertex_buffer_object
95 # define GLEW_ARB_vertex_buffer_object 0
96 # endif
97 
98 # ifndef GLEW_ARB_framebuffer_object
99 # define GLEW_ARB_framebuffer_object 0
100 # endif
101 
102 # ifndef GLEW_ARB_multitexture
103 # define GLEW_ARB_multitexture 0
104 # endif
105 
106 # ifndef GLEW_EXT_framebuffer_object
107 # define GLEW_EXT_framebuffer_object 0
108 # endif
109 
110 # ifndef GLEW_ARB_depth_texture
111 # define GLEW_ARB_depth_texture 0
112 # endif
113 
114 # ifndef GLEW_ARB_shadow
115 # define GLEW_ARB_shadow 0
116 # endif
117 
118 # ifndef GLEW_ARB_texture_float
119 # define GLEW_ARB_texture_float 0
120 # endif
121 
122 # ifndef GLEW_ARB_texture_non_power_of_two
123 # define GLEW_ARB_texture_non_power_of_two 0
124 # endif
125 
126 # ifndef GLEW_ARB_texture3D
127 # define GLEW_ARB_texture3D 0
128 # endif
129 
130 # ifndef GLEW_EXT_texture3D
131 # define GLEW_EXT_texture3D 0
132 # endif
133 
134 # ifndef GLEW_ARB_texture_rg
135 # define GLEW_ARB_texture_rg 0
136 # endif
137 
138 # ifndef GLEW_ARB_texture_query_lod
139 # define GLEW_ARB_texture_query_lod 0
140 # endif
141 
142 /*
143  * The following symbolic constants are missing from an ES only header,
144  * so alias them to their (same valued) extension versions which are available in the header.
145  *
146  * Be careful that this does not lead to unguarded use of what are extensions in ES!
147  *
148  * Some of these may be here simply to patch inconsistencies in the header files.
149  */
150 
151 # ifndef GL_TEXTURE_3D
152 # define GL_TEXTURE_3D GL_TEXTURE_3D_OES
153 # endif
154 
155 # ifndef GL_TEXTURE_WRAP_R
156 # define GL_TEXTURE_WRAP_R GL_TEXTURE_WRAP_R_OES
157 # endif
158 
159 # ifndef GL_TEXTURE_COMPARE_MODE
160 # define GL_TEXTURE_COMPARE_MODE GL_TEXTURE_COMPARE_MODE_EXT
161 # endif
162 
163 # ifndef GL_COMPARE_REF_TO_TEXTURE
164 # define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_REF_TO_TEXTURE_EXT
165 # endif
166 
167 # ifndef GL_TEXTURE_COMPARE_FUNC
168 # define GL_TEXTURE_COMPARE_FUNC GL_TEXTURE_COMPARE_FUNC_EXT
169 # endif
170 
171 # ifndef GL_RGBA8
172 # define GL_RGBA8 GL_RGBA8_OES
173 # endif
174 
175 # ifndef GL_RGBA16F
176 # define GL_RGBA16F GL_RGBA16F_EXT
177 # endif
178 
179 # ifndef GL_RG32F
180 # define GL_RG32F GL_RG32F_EXT
181 # endif
182 
183 # ifndef GL_RGB8
184 # define GL_RGB8 GL_RGB8_OES
185 # endif
186 
187 # ifndef GL_RG
188 # define GL_RG GL_RG_EXT
189 # endif
190 
191 # ifndef GL_RED
192 # define GL_RED GL_RED_EXT
193 # endif
194 
195 # ifndef GL_FRAMEBUFFER_INCOMPLETE_FORMATS
196 # define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES
197 # endif
198 
199 # ifndef GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER
200 # define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES
201 # endif
202 
203 # ifndef GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER
204 # define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES
205 # endif
206 
207 # ifndef GL_WRITE_ONLY
208 # define GL_WRITE_ONLY GL_WRITE_ONLY_OES
209 # endif
210 
211 # ifndef GLEW_ARB_vertex_array_object
212 # define GLEW_ARB_vertex_array_object 0
213 # endif
214 
215 /* end of ifdef GLEW_ES_ONLY */
216 #elif defined(GLEW_NO_ES)
217 
218 /*
219  * Need stubs for these version checks if compiling without any support.
220  * Rely on compiler to eliminate unreachable code when version checks become constants
221  */
222 
223 # ifndef GLEW_ES_VERSION_2_0
224 # define GLEW_ES_VERSION_2_0 0
225 # endif
226 
227 # ifndef GLEW_EXT_texture_storage
228 # define GLEW_EXT_texture_storage 0
229 # endif
230 
231 # ifndef GLEW_OES_framebuffer_object
232 # define GLEW_OES_framebuffer_object 0
233 # endif
234 
235 # ifndef GLEW_OES_mapbuffer
236 # define GLEW_OES_mapbuffer 0
237 # endif
238 
239 # ifndef GLEW_OES_required_internalformat
240 # define GLEW_OES_required_internalformat 0
241 # endif
242 
243 # ifndef GLEW_EXT_color_buffer_half_float
244 # define GLEW_EXT_color_buffer_half_float 0
245 # endif
246 
247 # ifndef GLEW_OES_depth_texture
248 # define GLEW_OES_depth_texture 0
249 # endif
250 
251 # ifndef GLEW_EXT_shadow_samplers
252 # define GLEW_EXT_shadow_samplers 0
253 # endif
254 
255 # ifndef GLEW_ARB_texture3D
256 # define GLEW_ARB_texture3D 0
257 # endif
258 
259 # ifndef GLEW_OES_texture_3D
260 # define GLEW_OES_texture_3D 0
261 # endif
262 
263 # ifndef GLEW_EXT_texture_rg
264 # define GLEW_EXT_texture_rg 0
265 # endif
266 
267 # ifndef GLEW_OES_vertex_array_object
268 # define GLEW_OES_vertex_array_object 0
269 # endif
270 
271 /*
272  * The following symbolic constants are missing when there is no ES support,
273  * so alias them to their (same valued) extension versions which are available in the header.
274  *
275  * Desktop GL typically does not have any extensions that originated from ES,
276  * unlike ES which has many extensions to replace what was taken out.
277  *
278  * For that reason these aliases are more likely just patching inconsistencies in the header files.
279  */
280 
281 # ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
282 # define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT
283 # endif
284 
285 # ifndef GL_FRAMEBUFFER_INCOMPLETE_FORMATS
286 # define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT
287 # endif
288 
289 #endif /* ifdef GLEW_NO_ES */
290 
291 #endif /* __SYMBOL_BINDING_H__*/