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