Clean up GL extensions a bit to only have the stuff the engine actually uses.
[xonotic/darkplaces.git] / glquake.h
1 #ifndef GLQUAKE_H
2 #define GLQUAKE_H
3
4 #include <stddef.h>
5
6 #ifdef USE_GLES2
7 #ifdef __IPHONEOS__
8 #include <OpenGLES/ES2/gl.h>
9 #else
10 #include <SDL_opengles2.h>
11 #endif
12 #endif
13
14 // disable data conversion warnings
15
16 #ifdef _MSC_VER
17 #pragma warning(disable : 4310) // LadyHavoc: MSVC++ 2008 x86: cast truncates constant value
18 #pragma warning(disable : 4245) // LadyHavoc: MSVC++ 2008 x86: 'initializing' : conversion from 'int' to 'unsigned char', signed/unsigned mismatch
19 #pragma warning(disable : 4204) // LadyHavoc: MSVC++ 2008 x86: nonstandard extension used : non-constant aggregate initializer
20 //#pragma warning(disable : 4267) // LadyHavoc: MSVC++ 2008 x64, conversion from 'size_t' to 'int', possible loss of data
21 //#pragma warning(disable : 4244) // LadyHavoc: MSVC++ 4 x86, double/float
22 //#pragma warning(disable : 4305) // LadyHavoc: MSVC++ 6 x86, double/float
23 //#pragma warning(disable : 4706) // LadyHavoc: MSVC++ 2008 x86, assignment within conditional expression
24 //#pragma warning(disable : 4127) // LadyHavoc: MSVC++ 2008 x86, conditional expression is constant
25 //#pragma warning(disable : 4100) // LadyHavoc: MSVC++ 2008 x86, unreferenced formal parameter
26 //#pragma warning(disable : 4055) // LadyHavoc: MSVC++ 2008 x86, 'type cast' from data pointer   to function pointer
27 //#pragma warning(disable : 4054) // LadyHavoc: MSVC++ 2008 x86, 'type cast' from function pointer   to data pointer
28 #endif
29
30
31 //====================================================
32
33 #ifndef USE_GLES2
34 // on Windows this is WINAPI
35 #ifndef APIENTRY
36 #define APIENTRY
37 #endif
38
39 // for platforms (wgl) that do not use GLAPIENTRY
40 #ifndef GLAPIENTRY
41 #define GLAPIENTRY APIENTRY
42 #endif
43
44 #ifndef GL_ZERO
45 typedef unsigned int GLenum;
46 typedef unsigned char GLboolean;
47 typedef unsigned int GLbitfield;
48 typedef void GLvoid;
49 typedef signed char GLbyte;
50 typedef short GLshort;
51 typedef int GLint;
52 typedef unsigned char GLubyte;
53 typedef unsigned short GLushort;
54 typedef unsigned int GLuint;
55 typedef int GLsizei;
56 typedef float GLfloat;
57 typedef float GLclampf;
58 typedef double GLdouble;
59 typedef double GLclampd;
60 typedef ptrdiff_t GLintptrARB;
61 typedef ptrdiff_t GLsizeiptrARB;
62
63 #define GL_STEREO                                       0x0C33
64 #define GL_DONT_CARE                            0x1100
65 #define GL_FASTEST                                      0x1101
66 #define GL_NICEST                                       0x1102
67 #define GL_DEPTH_TEST                           0x0B71
68 #define GL_CULL_FACE                            0x0B44
69 #define GL_BLEND                                0x0BE2
70
71 #define GL_ZERO                                 0x0
72 #define GL_ONE                                  0x1
73 #define GL_SRC_COLOR                            0x0300
74 #define GL_ONE_MINUS_SRC_COLOR                  0x0301
75 #define GL_DST_COLOR                            0x0306
76 #define GL_ONE_MINUS_DST_COLOR                  0x0307
77 #define GL_SRC_ALPHA                            0x0302
78 #define GL_ONE_MINUS_SRC_ALPHA                  0x0303
79 #define GL_DST_ALPHA                            0x0304
80 #define GL_ONE_MINUS_DST_ALPHA                  0x0305
81 #define GL_SRC_ALPHA_SATURATE                   0x0308
82 #define GL_CONSTANT_COLOR                       0x8001
83 #define GL_ONE_MINUS_CONSTANT_COLOR             0x8002
84 #define GL_CONSTANT_ALPHA                       0x8003
85 #define GL_ONE_MINUS_CONSTANT_ALPHA             0x8004
86
87 #define GL_TEXTURE_2D                           0x0DE1
88 #define GL_TEXTURE_WRAP_S                       0x2802
89 #define GL_TEXTURE_WRAP_T                       0x2803
90 #define GL_TEXTURE_WRAP_R                       0x8072
91 #define GL_TEXTURE_MAG_FILTER                   0x2800
92 #define GL_TEXTURE_MIN_FILTER                   0x2801
93 #define GL_PACK_ALIGNMENT                       0x0D05
94 #define GL_UNPACK_ALIGNMENT                     0x0CF5
95 #define GL_TEXTURE_INTERNAL_FORMAT              0x1003
96 #define GL_TEXTURE_MAX_LEVEL                    0x813D
97
98 #define GL_NEAREST                              0x2600
99 #define GL_LINEAR                               0x2601
100 #define GL_NEAREST_MIPMAP_NEAREST               0x2700
101 #define GL_NEAREST_MIPMAP_LINEAR                0x2702
102 #define GL_LINEAR_MIPMAP_NEAREST                0x2701
103 #define GL_LINEAR_MIPMAP_LINEAR                 0x2703
104
105 #define GL_LINE                                 0x1B01
106 #define GL_FILL                                 0x1B02
107
108 #define GL_REPEAT                               0x2901
109 #define GL_CLAMP                                0x2900
110
111 #define GL_TRIANGLES                    0x0004
112
113 #define GL_FALSE                                0x0
114 #define GL_TRUE                                 0x1
115
116 #define GL_BYTE                                 0x1400
117 #define GL_UNSIGNED_BYTE                        0x1401
118 #define GL_SHORT                                0x1402
119 #define GL_UNSIGNED_SHORT                       0x1403
120 #define GL_INT                                  0x1404
121 #define GL_UNSIGNED_INT                         0x1405
122 #define GL_FLOAT                                0x1406
123 #define GL_DOUBLE                               0x140A
124
125 #define GL_NONE                                 0
126 #define GL_FRONT_LEFT                   0x0400
127 #define GL_FRONT_RIGHT                  0x0401
128 #define GL_BACK_LEFT                    0x0402
129 #define GL_BACK_RIGHT                   0x0403
130 #define GL_FRONT                                0x0404
131 #define GL_BACK                                 0x0405
132 #define GL_LEFT                                 0x0406
133 #define GL_RIGHT                                0x0407
134 #define GL_FRONT_AND_BACK               0x0408
135
136 #define GL_VENDOR                               0x1F00
137 #define GL_RENDERER                             0x1F01
138 #define GL_VERSION                              0x1F02
139 #define GL_EXTENSIONS                           0x1F03
140
141 #define GL_NO_ERROR                             0x0
142 #define GL_INVALID_VALUE                        0x0501
143 #define GL_INVALID_ENUM                         0x0500
144 #define GL_INVALID_OPERATION                    0x0502
145 #define GL_STACK_OVERFLOW                       0x0503
146 #define GL_STACK_UNDERFLOW                      0x0504
147 #define GL_OUT_OF_MEMORY                        0x0505
148
149 #define GL_DITHER                               0x0BD0
150 #define GL_ALPHA                                0x1906
151 #define GL_RGB                                  0x1907
152 #define GL_RGBA                                 0x1908
153
154 #define GL_MAX_TEXTURE_SIZE                     0x0D33
155
156 #define GL_NEVER                                0x0200
157 #define GL_LESS                                 0x0201
158 #define GL_EQUAL                                0x0202
159 #define GL_LEQUAL                               0x0203
160 #define GL_GREATER                              0x0204
161 #define GL_NOTEQUAL                             0x0205
162 #define GL_GEQUAL                               0x0206
163 #define GL_ALWAYS                               0x0207
164 #define GL_DEPTH_TEST                           0x0B71
165
166 #define GL_DEPTH_BUFFER_BIT                     0x00000100
167 #define GL_STENCIL_BUFFER_BIT                   0x00000400
168 #define GL_COLOR_BUFFER_BIT                     0x00004000
169
170 #define GL_STENCIL_TEST                         0x0B90
171 #define GL_KEEP                                 0x1E00
172 #define GL_REPLACE                              0x1E01
173 #define GL_INCR                                 0x1E02
174 #define GL_DECR                                 0x1E03
175
176 #define GL_POLYGON_OFFSET_FACTOR          0x8038
177 #define GL_POLYGON_OFFSET_UNITS           0x2A00
178 #define GL_POLYGON_OFFSET_POINT           0x2A01
179 #define GL_POLYGON_OFFSET_LINE            0x2A02
180 #define GL_POLYGON_OFFSET_FILL            0x8037
181
182 #define GL_CLIP_PLANE0                    0x3000
183 #define GL_CLIP_PLANE1                    0x3001
184 #define GL_CLIP_PLANE2                    0x3002
185 #define GL_CLIP_PLANE3                    0x3003
186 #define GL_CLIP_PLANE4                    0x3004
187 #define GL_CLIP_PLANE5                    0x3005
188
189 #define GL_DEPTH_COMPONENT                0x1902
190 #define GL_VIEWPORT                       0x0BA2
191 #define GL_DRAW_BUFFER                    0x0C01
192 #define GL_READ_BUFFER                    0x0C02
193 #define GL_LUMINANCE                      0x1909
194 #define GL_INTENSITY                      0x8049
195
196 #endif
197
198 //GL_EXT_texture_filter_anisotropic
199 #ifndef GL_TEXTURE_MAX_ANISOTROPY_EXT
200 #define GL_TEXTURE_MAX_ANISOTROPY_EXT       0x84FE
201 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT   0x84FF
202 #endif
203
204 // GL_ARB_depth_texture
205 #ifndef GL_DEPTH_COMPONENT32_ARB
206 #define GL_DEPTH_COMPONENT16_ARB          0x81A5
207 #define GL_DEPTH_COMPONENT24_ARB          0x81A6
208 #define GL_DEPTH_COMPONENT32_ARB          0x81A7
209 #define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A
210 //#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B
211 #endif
212
213 // GL_ARB_shadow
214 #ifndef GL_TEXTURE_COMPARE_MODE_ARB
215 #define GL_TEXTURE_COMPARE_MODE_ARB       0x884C
216 #define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D
217 #define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E
218 #endif
219
220 // GL_ARB_multitexture
221 extern void (GLAPIENTRY *qglActiveTexture) (GLenum);
222 #ifndef GL_ACTIVE_TEXTURE
223 #define GL_ACTIVE_TEXTURE                       0x84E0
224 #define GL_MAX_TEXTURE_UNITS            0x84E2
225 #define GL_TEXTURE0                                     0x84C0
226 #define GL_TEXTURE1                                     0x84C1
227 #define GL_TEXTURE2                                     0x84C2
228 #define GL_TEXTURE3                                     0x84C3
229 #define GL_TEXTURE4                                     0x84C4
230 #define GL_TEXTURE5                                     0x84C5
231 #define GL_TEXTURE6                                     0x84C6
232 #define GL_TEXTURE7                                     0x84C7
233 #define GL_TEXTURE8                                     0x84C8
234 #define GL_TEXTURE9                                     0x84C9
235 #define GL_TEXTURE10                            0x84CA
236 #define GL_TEXTURE11                            0x84CB
237 #define GL_TEXTURE12                            0x84CC
238 #define GL_TEXTURE13                            0x84CD
239 #define GL_TEXTURE14                            0x84CE
240 #define GL_TEXTURE15                            0x84CF
241 #define GL_TEXTURE16                            0x84D0
242 #define GL_TEXTURE17                            0x84D1
243 #define GL_TEXTURE18                            0x84D2
244 #define GL_TEXTURE19                            0x84D3
245 #define GL_TEXTURE20                            0x84D4
246 #define GL_TEXTURE21                            0x84D5
247 #define GL_TEXTURE22                            0x84D6
248 #define GL_TEXTURE23                            0x84D7
249 #define GL_TEXTURE24                            0x84D8
250 #define GL_TEXTURE25                            0x84D9
251 #define GL_TEXTURE26                            0x84DA
252 #define GL_TEXTURE27                            0x84DB
253 #define GL_TEXTURE28                            0x84DC
254 #define GL_TEXTURE29                            0x84DD
255 #define GL_TEXTURE30                            0x84DE
256 #define GL_TEXTURE31                            0x84DF
257 #endif
258
259 #ifndef GL_MAX_ELEMENTS_VERTICES
260 #define GL_MAX_ELEMENTS_VERTICES                0x80E8
261 #endif
262 #ifndef GL_MAX_ELEMENTS_INDICES
263 #define GL_MAX_ELEMENTS_INDICES                 0x80E9
264 #endif
265
266
267 #ifndef GL_TEXTURE_3D
268 #define GL_PACK_SKIP_IMAGES                     0x806B
269 #define GL_PACK_IMAGE_HEIGHT                    0x806C
270 #define GL_UNPACK_SKIP_IMAGES                   0x806D
271 #define GL_UNPACK_IMAGE_HEIGHT                  0x806E
272 #define GL_TEXTURE_3D                           0x806F
273 #define GL_PROXY_TEXTURE_3D                     0x8070
274 #define GL_TEXTURE_DEPTH                        0x8071
275 #define GL_TEXTURE_WRAP_R                       0x8072
276 #define GL_MAX_3D_TEXTURE_SIZE                  0x8073
277 #define GL_TEXTURE_BINDING_3D                   0x806A
278 extern void (GLAPIENTRY *qglTexImage3D)(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
279 extern void (GLAPIENTRY *qglTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
280 extern void (GLAPIENTRY *qglCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
281 #endif
282
283 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
284 #define GL_NORMAL_MAP                       0x8511
285 #define GL_REFLECTION_MAP                   0x8512
286 #define GL_TEXTURE_CUBE_MAP                 0x8513
287 #define GL_TEXTURE_BINDING_CUBE_MAP         0x8514
288 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X     0x8515
289 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X     0x8516
290 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y     0x8517
291 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y     0x8518
292 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z     0x8519
293 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z     0x851A
294 #define GL_PROXY_TEXTURE_CUBE_MAP           0x851B
295 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE            0x851C
296 #endif
297
298 #ifndef GL_DEPTH_COMPONENT16_ARB
299 #define GL_DEPTH_COMPONENT16_ARB       0x81A5
300 #define GL_DEPTH_COMPONENT24_ARB       0x81A6
301 #define GL_DEPTH_COMPONENT32_ARB       0x81A7
302 #define GL_TEXTURE_DEPTH_SIZE_ARB      0x884A
303 //#define GL_DEPTH_TEXTURE_MODE_ARB      0x884B
304 #endif
305
306 #ifndef GL_SCISSOR_TEST
307 #define GL_SCISSOR_TEST                         0x0C11
308 #define GL_SCISSOR_BOX                          0x0C10
309 #endif
310
311 // GL_SGIS_texture_edge_clamp or GL_EXT_texture_edge_clamp
312 #ifndef GL_CLAMP_TO_EDGE
313 #define GL_CLAMP_TO_EDGE 0x812F
314 #endif
315
316 //GL_EXT_blend_minmax
317 #ifndef GL_FUNC_ADD
318 #define GL_FUNC_ADD                   0x8006 // also supplied by GL_blend_subtract
319 #define GL_MIN                        0x8007
320 #define GL_MAX                        0x8008
321 #define GL_BLEND_EQUATION             0x8009 // also supplied by GL_blend_subtract
322 extern void (GLAPIENTRY *qglBlendEquationEXT)(GLenum); // also supplied by GL_blend_subtract
323 #endif
324
325 //GL_EXT_blend_subtract
326 #ifndef GL_FUNC_SUBTRACT
327 #define GL_FUNC_SUBTRACT              0x800A
328 #define GL_FUNC_REVERSE_SUBTRACT      0x800B
329 extern void (GLAPIENTRY *qglBlendEquationEXT)(GLenum); // also supplied by GL_blend_subtract
330 #endif
331
332 //GL_ARB_texture_non_power_of_two
333
334 //GL_ARB_vertex_buffer_object
335 #ifndef GL_ARRAY_BUFFER
336 #define GL_ARRAY_BUFFER               0x8892
337 #define GL_ELEMENT_ARRAY_BUFFER       0x8893
338 #define GL_ARRAY_BUFFER_BINDING       0x8894
339 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
340 #define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896
341 #define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897
342 #define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898
343 #define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899
344 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A
345 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B
346 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C
347 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D
348 #define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E
349 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
350 #define GL_STREAM_DRAW                0x88E0
351 #define GL_STREAM_READ                0x88E1
352 #define GL_STREAM_COPY                0x88E2
353 #define GL_STATIC_DRAW                0x88E4
354 #define GL_STATIC_READ                0x88E5
355 #define GL_STATIC_COPY                0x88E6
356 #define GL_DYNAMIC_DRAW               0x88E8
357 #define GL_DYNAMIC_READ               0x88E9
358 #define GL_DYNAMIC_COPY               0x88EA
359 #define GL_READ_ONLY                  0x88B8
360 #define GL_WRITE_ONLY                 0x88B9
361 #define GL_READ_WRITE                 0x88BA
362 #define GL_BUFFER_SIZE                0x8764
363 #define GL_BUFFER_USAGE               0x8765
364 #define GL_BUFFER_ACCESS              0x88BB
365 #define GL_BUFFER_MAPPED              0x88BC
366 #define GL_BUFFER_MAP_POINTER         0x88BD
367 #endif
368 extern void (GLAPIENTRY *qglBindBuffer) (GLenum target, GLuint buffer);
369 extern void (GLAPIENTRY *qglDeleteBuffers) (GLsizei n, const GLuint *buffers);
370 extern void (GLAPIENTRY *qglGenBuffers) (GLsizei n, GLuint *buffers);
371 extern GLboolean (GLAPIENTRY *qglIsBuffer) (GLuint buffer);
372 extern GLvoid* (GLAPIENTRY *qglMapBuffer) (GLenum target, GLenum access);
373 extern GLboolean (GLAPIENTRY *qglUnmapBuffer) (GLenum target);
374 extern void (GLAPIENTRY *qglBufferData) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
375 extern void (GLAPIENTRY *qglBufferSubData) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
376
377 //GL_ARB_framebuffer_object
378 // (slight differences from GL_EXT_framebuffer_object as this integrates GL_EXT_packed_depth_stencil)
379 #ifndef GL_FRAMEBUFFER
380 #define GL_FRAMEBUFFER                     0x8D40
381 #define GL_READ_FRAMEBUFFER                0x8CA8
382 #define GL_DRAW_FRAMEBUFFER                0x8CA9
383 #define GL_RENDERBUFFER                    0x8D41
384 #define GL_STENCIL_INDEX1                  0x8D46
385 #define GL_STENCIL_INDEX4                  0x8D47
386 #define GL_STENCIL_INDEX8                  0x8D48
387 #define GL_STENCIL_INDEX16                 0x8D49
388 #define GL_RENDERBUFFER_WIDTH              0x8D42
389 #define GL_RENDERBUFFER_HEIGHT             0x8D43
390 #define GL_RENDERBUFFER_INTERNAL_FORMAT    0x8D44
391 #define GL_RENDERBUFFER_RED_SIZE           0x8D50
392 #define GL_RENDERBUFFER_GREEN_SIZE         0x8D51
393 #define GL_RENDERBUFFER_BLUE_SIZE          0x8D52
394 #define GL_RENDERBUFFER_ALPHA_SIZE         0x8D53
395 #define GL_RENDERBUFFER_DEPTH_SIZE         0x8D54
396 #define GL_RENDERBUFFER_STENCIL_SIZE       0x8D55
397 #define GL_RENDERBUFFER_SAMPLES            0x8CAB
398 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE            0x8CD0
399 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME            0x8CD1
400 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL          0x8CD2
401 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE  0x8CD3
402 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER          0x8CD4
403 #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING         0x8210
404 #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE         0x8211
405 #define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE               0x8212
406 #define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE             0x8213
407 #define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE              0x8214
408 #define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE             0x8215
409 #define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE             0x8216
410 #define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE           0x8217
411 #define GL_SRGB                                          0x8C40
412 #define GL_UNSIGNED_NORMALIZED                           0x8C17
413 #define GL_FRAMEBUFFER_DEFAULT                           0x8218
414 #define GL_INDEX                                         0x8222
415 #define GL_COLOR_ATTACHMENT0                0x8CE0
416 #define GL_COLOR_ATTACHMENT1                0x8CE1
417 #define GL_COLOR_ATTACHMENT2                0x8CE2
418 #define GL_COLOR_ATTACHMENT3                0x8CE3
419 #define GL_COLOR_ATTACHMENT4                0x8CE4
420 #define GL_COLOR_ATTACHMENT5                0x8CE5
421 #define GL_COLOR_ATTACHMENT6                0x8CE6
422 #define GL_COLOR_ATTACHMENT7                0x8CE7
423 #define GL_COLOR_ATTACHMENT8                0x8CE8
424 #define GL_COLOR_ATTACHMENT9                0x8CE9
425 #define GL_COLOR_ATTACHMENT10               0x8CEA
426 #define GL_COLOR_ATTACHMENT11               0x8CEB
427 #define GL_COLOR_ATTACHMENT12               0x8CEC
428 #define GL_COLOR_ATTACHMENT13               0x8CED
429 #define GL_COLOR_ATTACHMENT14               0x8CEE
430 #define GL_COLOR_ATTACHMENT15               0x8CEF
431 #define GL_DEPTH_ATTACHMENT                 0x8D00
432 #define GL_STENCIL_ATTACHMENT               0x8D20
433 #define GL_DEPTH_STENCIL_ATTACHMENT         0x821A
434 #define GL_MAX_SAMPLES                     0x8D57
435 #define GL_FRAMEBUFFER_COMPLETE                          0x8CD5
436 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT             0x8CD6
437 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT     0x8CD7
438 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER            0x8CDB
439 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER            0x8CDC
440 #define GL_FRAMEBUFFER_UNSUPPORTED                       0x8CDD
441 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE            0x8D56
442 #define GL_FRAMEBUFFER_UNDEFINED                         0x8219
443 #define GL_FRAMEBUFFER_BINDING             0x8CA6 // alias DRAW_FRAMEBUFFER_BINDING
444 #define GL_DRAW_FRAMEBUFFER_BINDING        0x8CA6
445 #define GL_READ_FRAMEBUFFER_BINDING        0x8CAA
446 #define GL_RENDERBUFFER_BINDING            0x8CA7
447 #define GL_MAX_COLOR_ATTACHMENTS           0x8CDF
448 #define GL_MAX_RENDERBUFFER_SIZE           0x84E8
449 #define GL_INVALID_FRAMEBUFFER_OPERATION   0x0506
450 #define GL_DEPTH_STENCIL                              0x84F9
451 #define GL_UNSIGNED_INT_24_8                          0x84FA
452 #define GL_DEPTH24_STENCIL8                           0x88F0
453 #define GL_TEXTURE_STENCIL_SIZE                       0x88F1
454 #endif
455 extern GLboolean (GLAPIENTRY *qglIsRenderbuffer)(GLuint renderbuffer);
456 extern GLvoid (GLAPIENTRY *qglBindRenderbuffer)(GLenum target, GLuint renderbuffer);
457 extern GLvoid (GLAPIENTRY *qglDeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers);
458 extern GLvoid (GLAPIENTRY *qglGenRenderbuffers)(GLsizei n, GLuint *renderbuffers);
459 extern GLvoid (GLAPIENTRY *qglRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
460 extern GLvoid (GLAPIENTRY *qglRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
461 extern GLvoid (GLAPIENTRY *qglGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params);
462 extern GLboolean (GLAPIENTRY *qglIsFramebuffer)(GLuint framebuffer);
463 extern GLvoid (GLAPIENTRY *qglBindFramebuffer)(GLenum target, GLuint framebuffer);
464 extern GLvoid (GLAPIENTRY *qglDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers);
465 extern GLvoid (GLAPIENTRY *qglGenFramebuffers)(GLsizei n, GLuint *framebuffers);
466 extern GLenum (GLAPIENTRY *qglCheckFramebufferStatus)(GLenum target);
467 extern GLvoid (GLAPIENTRY *qglFramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
468 extern GLvoid (GLAPIENTRY *qglFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
469 extern GLvoid (GLAPIENTRY *qglFramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer);
470 extern GLvoid (GLAPIENTRY *qglFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
471 extern GLvoid (GLAPIENTRY *qglFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
472 extern GLvoid (GLAPIENTRY *qglGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
473 extern GLvoid (GLAPIENTRY *qglBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
474 extern GLvoid (GLAPIENTRY *qglGenerateMipmap)(GLenum target);
475
476 // GL_ARB_draw_buffers
477 #ifndef GL_MAX_DRAW_BUFFERS_ARB
478 #define GL_MAX_DRAW_BUFFERS_ARB                              0x8824
479 #define GL_DRAW_BUFFER0_ARB                                  0x8825
480 #define GL_DRAW_BUFFER1_ARB                                  0x8826
481 #define GL_DRAW_BUFFER2_ARB                                  0x8827
482 #define GL_DRAW_BUFFER3_ARB                                  0x8828
483 #define GL_DRAW_BUFFER4_ARB                                  0x8829
484 #define GL_DRAW_BUFFER5_ARB                                  0x882A
485 #define GL_DRAW_BUFFER6_ARB                                  0x882B
486 #define GL_DRAW_BUFFER7_ARB                                  0x882C
487 #define GL_DRAW_BUFFER8_ARB                                  0x882D
488 #define GL_DRAW_BUFFER9_ARB                                  0x882E
489 #define GL_DRAW_BUFFER10_ARB                                 0x882F
490 #define GL_DRAW_BUFFER11_ARB                                 0x8830
491 #define GL_DRAW_BUFFER12_ARB                                 0x8831
492 #define GL_DRAW_BUFFER13_ARB                                 0x8832
493 #define GL_DRAW_BUFFER14_ARB                                 0x8833
494 #define GL_DRAW_BUFFER15_ARB                                 0x8834
495 #endif
496 extern void (GLAPIENTRY *qglDrawBuffersARB)(GLsizei n, const GLenum *bufs);
497
498 // GL_ARB_texture_float
499 #ifndef GL_RGBA32F_ARB
500 #define GL_RGBA32F_ARB                                       0x8814
501 #define GL_RGB32F_ARB                                        0x8815
502 #define GL_ALPHA32F_ARB                                      0x8816
503 #define GL_INTENSITY32F_ARB                                  0x8817
504 #define GL_LUMINANCE32F_ARB                                  0x8818
505 #define GL_LUMINANCE_ALPHA32F_ARB                            0x8819
506 #define GL_RGBA16F_ARB                                       0x881A
507 #define GL_RGB16F_ARB                                        0x881B
508 #define GL_ALPHA16F_ARB                                      0x881C
509 #define GL_INTENSITY16F_ARB                                  0x881D
510 #define GL_LUMINANCE16F_ARB                                  0x881E
511 #define GL_LUMINANCE_ALPHA16F_ARB                            0x881F
512 #endif
513
514 // GL_ARB_half_float_pixel
515 #ifndef GL_HALF_FLOAT_ARB
516 typedef unsigned short GLhalfARB;
517 #define GL_HALF_FLOAT_ARB                                    0x140B
518 #endif
519
520 // GL_EXT_texture_sRGB
521 #ifndef GL_SRGB_EXT
522 #define GL_SRGB_EXT                                          0x8C40
523 #define GL_SRGB8_EXT                                         0x8C41
524 #define GL_SRGB_ALPHA_EXT                                    0x8C42
525 #define GL_SRGB8_ALPHA8_EXT                                  0x8C43
526 #define GL_SLUMINANCE_ALPHA_EXT                              0x8C44
527 #define GL_SLUMINANCE8_ALPHA8_EXT                            0x8C45
528 #define GL_SLUMINANCE_EXT                                    0x8C46
529 #define GL_SLUMINANCE8_EXT                                   0x8C47
530 #define GL_COMPRESSED_SRGB_EXT                               0x8C48
531 #define GL_COMPRESSED_SRGB_ALPHA_EXT                         0x8C49
532 #define GL_COMPRESSED_SLUMINANCE_EXT                         0x8C4A
533 #define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT                   0x8C4B
534 #define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT                     0x8C4C
535 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT               0x8C4D
536 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT               0x8C4E
537 #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT               0x8C4F
538 #endif
539
540 // GL_ARB_uniform_buffer_object
541 #ifndef GL_UNIFORM_BUFFER
542 #define GL_UNIFORM_BUFFER                                    0x8A11
543 #define GL_UNIFORM_BUFFER_BINDING                            0x8A28
544 #define GL_UNIFORM_BUFFER_START                              0x8A29
545 #define GL_UNIFORM_BUFFER_SIZE                               0x8A2A
546 #define GL_MAX_VERTEX_UNIFORM_BLOCKS                         0x8A2B
547 #define GL_MAX_GEOMETRY_UNIFORM_BLOCKS                       0x8A2C
548 #define GL_MAX_FRAGMENT_UNIFORM_BLOCKS                       0x8A2D
549 #define GL_MAX_COMBINED_UNIFORM_BLOCKS                       0x8A2E
550 #define GL_MAX_UNIFORM_BUFFER_BINDINGS                       0x8A2F
551 #define GL_MAX_UNIFORM_BLOCK_SIZE                            0x8A30
552 #define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS            0x8A31
553 #define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS          0x8A32
554 #define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS          0x8A33
555 #define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT                   0x8A34
556 #define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH              0x8A35
557 #define GL_ACTIVE_UNIFORM_BLOCKS                             0x8A36
558 #define GL_UNIFORM_TYPE                                      0x8A37
559 #define GL_UNIFORM_SIZE                                      0x8A38
560 #define GL_UNIFORM_NAME_LENGTH                               0x8A39
561 #define GL_UNIFORM_BLOCK_INDEX                               0x8A3A
562 #define GL_UNIFORM_OFFSET                                    0x8A3B
563 #define GL_UNIFORM_ARRAY_STRIDE                              0x8A3C
564 #define GL_UNIFORM_MATRIX_STRIDE                             0x8A3D
565 #define GL_UNIFORM_IS_ROW_MAJOR                              0x8A3E
566 #define GL_UNIFORM_BLOCK_BINDING                             0x8A3F
567 #define GL_UNIFORM_BLOCK_DATA_SIZE                           0x8A40
568 #define GL_UNIFORM_BLOCK_NAME_LENGTH                         0x8A41
569 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS                     0x8A42
570 #define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES              0x8A43
571 #define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER         0x8A44
572 #define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER       0x8A45
573 #define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER       0x8A46
574 #define GL_INVALID_INDEX                                     0xFFFFFFFFu
575 #endif
576 extern void (GLAPIENTRY *qglGetUniformIndices)(GLuint program, GLsizei uniformCount, const char** uniformNames, GLuint* uniformIndices);
577 extern void (GLAPIENTRY *qglGetActiveUniformsiv)(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
578 extern void (GLAPIENTRY *qglGetActiveUniformName)(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, char* uniformName);
579 extern GLuint (GLAPIENTRY *qglGetUniformBlockIndex)(GLuint program, const char* uniformBlockName);
580 extern void (GLAPIENTRY *qglGetActiveUniformBlockiv)(GLuint program, GLuint uniformBlockIndex, GLenum pname,  GLint* params);
581 extern void (GLAPIENTRY *qglGetActiveUniformBlockName)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, char* uniformBlockName);
582 extern void (GLAPIENTRY *qglBindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptrARB offset, GLsizeiptrARB size);
583 extern void (GLAPIENTRY *qglBindBufferBase)(GLenum target, GLuint index, GLuint buffer);
584 extern void (GLAPIENTRY *qglGetIntegeri_v)(GLenum target, GLuint index, GLint* data);
585 extern void (GLAPIENTRY *qglUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
586
587 extern void (GLAPIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
588
589 extern void (GLAPIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
590
591 extern void (GLAPIENTRY *qglClear)(GLbitfield mask);
592
593 extern void (GLAPIENTRY *qglBlendFunc)(GLenum sfactor, GLenum dfactor);
594 extern void (GLAPIENTRY *qglCullFace)(GLenum mode);
595
596 extern void (GLAPIENTRY *qglDrawBuffer)(GLenum mode);
597 extern void (GLAPIENTRY *qglReadBuffer)(GLenum mode);
598 extern void (GLAPIENTRY *qglEnable)(GLenum cap);
599 extern void (GLAPIENTRY *qglDisable)(GLenum cap);
600 extern GLboolean (GLAPIENTRY *qglIsEnabled)(GLenum cap);
601
602 extern void (GLAPIENTRY *qglGetBooleanv)(GLenum pname, GLboolean *params);
603 extern void (GLAPIENTRY *qglGetDoublev)(GLenum pname, GLdouble *params);
604 extern void (GLAPIENTRY *qglGetFloatv)(GLenum pname, GLfloat *params);
605 extern void (GLAPIENTRY *qglGetIntegerv)(GLenum pname, GLint *params);
606
607 extern GLenum (GLAPIENTRY *qglGetError)(void);
608 extern const GLubyte* (GLAPIENTRY *qglGetString)(GLenum name);
609 extern void (GLAPIENTRY *qglFinish)(void);
610 extern void (GLAPIENTRY *qglFlush)(void);
611
612 extern void (GLAPIENTRY *qglClearDepth)(GLclampd depth);
613 extern void (GLAPIENTRY *qglDepthFunc)(GLenum func);
614 extern void (GLAPIENTRY *qglDepthMask)(GLboolean flag);
615 extern void (GLAPIENTRY *qglDepthRange)(GLclampd near_val, GLclampd far_val);
616 extern void (GLAPIENTRY *qglDepthRangef)(GLclampf near_val, GLclampf far_val);
617 extern void (GLAPIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
618
619 extern void (GLAPIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
620 extern void (GLAPIENTRY *qglDrawArrays)(GLenum mode, GLint first, GLsizei count);
621
622 extern void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
623
624 extern void (GLAPIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
625
626 extern void (GLAPIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask);
627 extern void (GLAPIENTRY *qglStencilMask)(GLuint mask);
628 extern void (GLAPIENTRY *qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass);
629 extern void (GLAPIENTRY *qglClearStencil)(GLint s);
630
631 extern void (GLAPIENTRY *qglTexParameterf)(GLenum target, GLenum pname, GLfloat param);
632 extern void (GLAPIENTRY *qglTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
633 extern void (GLAPIENTRY *qglTexParameteri)(GLenum target, GLenum pname, GLint param);
634 extern void (GLAPIENTRY *qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
635 extern void (GLAPIENTRY *qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
636 extern void (GLAPIENTRY *qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
637 extern void (GLAPIENTRY *qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
638 extern void (GLAPIENTRY *qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
639 extern void (GLAPIENTRY *qglHint)(GLenum target, GLenum mode);
640
641 extern void (GLAPIENTRY *qglGenTextures)(GLsizei n, GLuint *textures);
642 extern void (GLAPIENTRY *qglDeleteTextures)(GLsizei n, const GLuint *textures);
643 extern void (GLAPIENTRY *qglBindTexture)(GLenum target, GLuint texture);
644 //extern void (GLAPIENTRY *qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities);
645 //extern GLboolean (GLAPIENTRY *qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences);
646 //extern GLboolean (GLAPIENTRY *qglIsTexture)(GLuint texture);
647 //extern void (GLAPIENTRY *qglPixelStoref)(GLenum pname, GLfloat param);
648 extern void (GLAPIENTRY *qglPixelStorei)(GLenum pname, GLint param);
649
650 //extern void (GLAPIENTRY *qglTexImage1D)(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
651 extern void (GLAPIENTRY *qglTexImage2D)(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
652 //extern void (GLAPIENTRY *qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
653 extern void (GLAPIENTRY *qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
654 //extern void (GLAPIENTRY *qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
655 extern void (GLAPIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
656 //extern void (GLAPIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
657 extern void (GLAPIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
658
659 extern void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units);
660 extern void (GLAPIENTRY *qglPolygonMode)(GLenum face, GLenum mode);
661
662 //extern void (GLAPIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation);
663 //extern void (GLAPIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation);
664
665 //[515]: added on 29.07.2005
666 extern void (GLAPIENTRY *qglPointSize)(GLfloat size);
667
668 // GL 2.0 shader objects
669 #ifndef GL_PROGRAM_OBJECT
670 // 1-byte character string
671 typedef char GLchar;
672 #endif
673 extern void (GLAPIENTRY *qglDeleteShader)(GLuint obj);
674 extern void (GLAPIENTRY *qglDeleteProgram)(GLuint obj);
675 //extern GLuint (GLAPIENTRY *qglGetHandle)(GLenum pname);
676 extern void (GLAPIENTRY *qglDetachShader)(GLuint containerObj, GLuint attachedObj);
677 extern GLuint (GLAPIENTRY *qglCreateShader)(GLenum shaderType);
678 extern void (GLAPIENTRY *qglShaderSource)(GLuint shaderObj, GLsizei count, const GLchar **string, const GLint *length);
679 extern void (GLAPIENTRY *qglCompileShader)(GLuint shaderObj);
680 extern GLuint (GLAPIENTRY *qglCreateProgram)(void);
681 extern void (GLAPIENTRY *qglAttachShader)(GLuint containerObj, GLuint obj);
682 extern void (GLAPIENTRY *qglLinkProgram)(GLuint programObj);
683 extern void (GLAPIENTRY *qglUseProgram)(GLuint programObj);
684 extern void (GLAPIENTRY *qglValidateProgram)(GLuint programObj);
685 extern void (GLAPIENTRY *qglUniform1f)(GLint location, GLfloat v0);
686 extern void (GLAPIENTRY *qglUniform2f)(GLint location, GLfloat v0, GLfloat v1);
687 extern void (GLAPIENTRY *qglUniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
688 extern void (GLAPIENTRY *qglUniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
689 extern void (GLAPIENTRY *qglUniform1i)(GLint location, GLint v0);
690 extern void (GLAPIENTRY *qglUniform2i)(GLint location, GLint v0, GLint v1);
691 extern void (GLAPIENTRY *qglUniform3i)(GLint location, GLint v0, GLint v1, GLint v2);
692 extern void (GLAPIENTRY *qglUniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
693 extern void (GLAPIENTRY *qglUniform1fv)(GLint location, GLsizei count, const GLfloat *value);
694 extern void (GLAPIENTRY *qglUniform2fv)(GLint location, GLsizei count, const GLfloat *value);
695 extern void (GLAPIENTRY *qglUniform3fv)(GLint location, GLsizei count, const GLfloat *value);
696 extern void (GLAPIENTRY *qglUniform4fv)(GLint location, GLsizei count, const GLfloat *value);
697 extern void (GLAPIENTRY *qglUniform1iv)(GLint location, GLsizei count, const GLint *value);
698 extern void (GLAPIENTRY *qglUniform2iv)(GLint location, GLsizei count, const GLint *value);
699 extern void (GLAPIENTRY *qglUniform3iv)(GLint location, GLsizei count, const GLint *value);
700 extern void (GLAPIENTRY *qglUniform4iv)(GLint location, GLsizei count, const GLint *value);
701 extern void (GLAPIENTRY *qglUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
702 extern void (GLAPIENTRY *qglUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
703 extern void (GLAPIENTRY *qglUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
704 extern void (GLAPIENTRY *qglGetShaderiv)(GLuint obj, GLenum pname, GLint *params);
705 extern void (GLAPIENTRY *qglGetProgramiv)(GLuint obj, GLenum pname, GLint *params);
706 extern void (GLAPIENTRY *qglGetShaderInfoLog)(GLuint obj, GLsizei maxLength, GLsizei *length, GLchar *infoLog);
707 extern void (GLAPIENTRY *qglGetProgramInfoLog)(GLuint obj, GLsizei maxLength, GLsizei *length, GLchar *infoLog);
708 extern void (GLAPIENTRY *qglGetAttachedShaders)(GLuint containerObj, GLsizei maxCount, GLsizei *count, GLuint *obj);
709 extern GLint (GLAPIENTRY *qglGetUniformLocation)(GLuint programObj, const GLchar *name);
710 extern void (GLAPIENTRY *qglGetActiveUniform)(GLuint programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
711 extern void (GLAPIENTRY *qglGetUniformfv)(GLuint programObj, GLint location, GLfloat *params);
712 extern void (GLAPIENTRY *qglGetUniformiv)(GLuint programObj, GLint location, GLint *params);
713 extern void (GLAPIENTRY *qglGetShaderSource)(GLuint obj, GLsizei maxLength, GLsizei *length, GLchar *source);
714 #ifndef GL_PROGRAM_OBJECT
715 #define GL_PROGRAM_OBJECT                                       0x8B40
716 #define GL_DELETE_STATUS                                        0x8B80
717 #define GL_COMPILE_STATUS                                       0x8B81
718 #define GL_LINK_STATUS                                          0x8B82
719 #define GL_VALIDATE_STATUS                                      0x8B83
720 #define GL_INFO_LOG_LENGTH                                      0x8B84
721 #define GL_ATTACHED_SHADERS                                     0x8B85
722 #define GL_ACTIVE_UNIFORMS                                      0x8B86
723 #define GL_ACTIVE_UNIFORM_MAX_LENGTH            0x8B87
724 #define GL_SHADER_SOURCE_LENGTH                         0x8B88
725 #define GL_SHADER_OBJECT                                        0x8B48
726 #define GL_SHADER_TYPE                                          0x8B4F
727 #define GL_FLOAT                                                        0x1406
728 #define GL_FLOAT_VEC2                                           0x8B50
729 #define GL_FLOAT_VEC3                                           0x8B51
730 #define GL_FLOAT_VEC4                                           0x8B52
731 #define GL_INT                                                          0x1404
732 #define GL_INT_VEC2                                                     0x8B53
733 #define GL_INT_VEC3                                                     0x8B54
734 #define GL_INT_VEC4                                                     0x8B55
735 #define GL_BOOL                                                         0x8B56
736 #define GL_BOOL_VEC2                                            0x8B57
737 #define GL_BOOL_VEC3                                            0x8B58
738 #define GL_BOOL_VEC4                                            0x8B59
739 #define GL_FLOAT_MAT2                                           0x8B5A
740 #define GL_FLOAT_MAT3                                           0x8B5B
741 #define GL_FLOAT_MAT4                                           0x8B5C
742 #define GL_SAMPLER_1D                                           0x8B5D
743 #define GL_SAMPLER_2D                                           0x8B5E
744 #define GL_SAMPLER_3D                                           0x8B5F
745 #define GL_SAMPLER_CUBE                                         0x8B60
746 #define GL_SAMPLER_1D_SHADOW                            0x8B61
747 #define GL_SAMPLER_2D_SHADOW                            0x8B62
748 #define GL_SAMPLER_2D_RECT                                      0x8B63
749 #define GL_SAMPLER_2D_RECT_SHADOW                       0x8B64
750 #endif
751
752 // GL 2.0 vertex shader
753 extern void (GLAPIENTRY *qglVertexAttrib1f)(GLuint index, GLfloat v0);
754 extern void (GLAPIENTRY *qglVertexAttrib1s)(GLuint index, GLshort v0);
755 extern void (GLAPIENTRY *qglVertexAttrib1d)(GLuint index, GLdouble v0);
756 extern void (GLAPIENTRY *qglVertexAttrib2f)(GLuint index, GLfloat v0, GLfloat v1);
757 extern void (GLAPIENTRY *qglVertexAttrib2s)(GLuint index, GLshort v0, GLshort v1);
758 extern void (GLAPIENTRY *qglVertexAttrib2d)(GLuint index, GLdouble v0, GLdouble v1);
759 extern void (GLAPIENTRY *qglVertexAttrib3f)(GLuint index, GLfloat v0, GLfloat v1, GLfloat v2);
760 extern void (GLAPIENTRY *qglVertexAttrib3s)(GLuint index, GLshort v0, GLshort v1, GLshort v2);
761 extern void (GLAPIENTRY *qglVertexAttrib3d)(GLuint index, GLdouble v0, GLdouble v1, GLdouble v2);
762 extern void (GLAPIENTRY *qglVertexAttrib4f)(GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
763 extern void (GLAPIENTRY *qglVertexAttrib4s)(GLuint index, GLshort v0, GLshort v1, GLshort v2, GLshort v3);
764 extern void (GLAPIENTRY *qglVertexAttrib4d)(GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
765 extern void (GLAPIENTRY *qglVertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
766 extern void (GLAPIENTRY *qglVertexAttrib1fv)(GLuint index, const GLfloat *v);
767 extern void (GLAPIENTRY *qglVertexAttrib1sv)(GLuint index, const GLshort *v);
768 extern void (GLAPIENTRY *qglVertexAttrib1dv)(GLuint index, const GLdouble *v);
769 extern void (GLAPIENTRY *qglVertexAttrib2fv)(GLuint index, const GLfloat *v);
770 extern void (GLAPIENTRY *qglVertexAttrib2sv)(GLuint index, const GLshort *v);
771 extern void (GLAPIENTRY *qglVertexAttrib2dv)(GLuint index, const GLdouble *v);
772 extern void (GLAPIENTRY *qglVertexAttrib3fv)(GLuint index, const GLfloat *v);
773 extern void (GLAPIENTRY *qglVertexAttrib3sv)(GLuint index, const GLshort *v);
774 extern void (GLAPIENTRY *qglVertexAttrib3dv)(GLuint index, const GLdouble *v);
775 extern void (GLAPIENTRY *qglVertexAttrib4fv)(GLuint index, const GLfloat *v);
776 extern void (GLAPIENTRY *qglVertexAttrib4sv)(GLuint index, const GLshort *v);
777 extern void (GLAPIENTRY *qglVertexAttrib4dv)(GLuint index, const GLdouble *v);
778 extern void (GLAPIENTRY *qglVertexAttrib4iv)(GLuint index, const GLint *v);
779 extern void (GLAPIENTRY *qglVertexAttrib4bv)(GLuint index, const GLbyte *v);
780 extern void (GLAPIENTRY *qglVertexAttrib4ubv)(GLuint index, const GLubyte *v);
781 extern void (GLAPIENTRY *qglVertexAttrib4usv)(GLuint index, const GLushort *v);
782 extern void (GLAPIENTRY *qglVertexAttrib4uiv)(GLuint index, const GLuint *v);
783 extern void (GLAPIENTRY *qglVertexAttrib4Nbv)(GLuint index, const GLbyte *v);
784 extern void (GLAPIENTRY *qglVertexAttrib4Nsv)(GLuint index, const GLshort *v);
785 extern void (GLAPIENTRY *qglVertexAttrib4Niv)(GLuint index, const GLint *v);
786 extern void (GLAPIENTRY *qglVertexAttrib4Nubv)(GLuint index, const GLubyte *v);
787 extern void (GLAPIENTRY *qglVertexAttrib4Nusv)(GLuint index, const GLushort *v);
788 extern void (GLAPIENTRY *qglVertexAttrib4Nuiv)(GLuint index, const GLuint *v);
789 extern void (GLAPIENTRY *qglVertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
790 extern void (GLAPIENTRY *qglEnableVertexAttribArray)(GLuint index);
791 extern void (GLAPIENTRY *qglDisableVertexAttribArray)(GLuint index);
792 extern void (GLAPIENTRY *qglBindAttribLocation)(GLuint programObj, GLuint index, const GLchar *name);
793 extern void (GLAPIENTRY *qglBindFragDataLocation)(GLuint programObj, GLuint index, const GLchar *name);
794 extern void (GLAPIENTRY *qglGetActiveAttrib)(GLuint programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
795 extern GLint (GLAPIENTRY *qglGetAttribLocation)(GLuint programObj, const GLchar *name);
796 extern void (GLAPIENTRY *qglGetVertexAttribdv)(GLuint index, GLenum pname, GLdouble *params);
797 extern void (GLAPIENTRY *qglGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params);
798 extern void (GLAPIENTRY *qglGetVertexAttribiv)(GLuint index, GLenum pname, GLint *params);
799 extern void (GLAPIENTRY *qglGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid **pointer);
800 #ifndef GL_VERTEX_SHADER
801 #define GL_VERTEX_SHADER                                                0x8B31
802 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS                0x8B4A
803 #define GL_MAX_VARYING_FLOATS                                   0x8B4B
804 #define GL_MAX_VERTEX_ATTRIBS                                   0x8869
805 #define GL_MAX_TEXTURE_IMAGE_UNITS                              0x8872
806 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS               0x8B4C
807 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS             0x8B4D
808 #define GL_MAX_TEXTURE_COORDS                                   0x8871
809 #define GL_VERTEX_PROGRAM_POINT_SIZE                    0x8642
810 #define GL_VERTEX_PROGRAM_TWO_SIDE                              0x8643
811 #define GL_ACTIVE_ATTRIBUTES                                    0x8B89
812 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH                  0x8B8A
813 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED                  0x8622
814 #define GL_VERTEX_ATTRIB_ARRAY_SIZE                             0x8623
815 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE                   0x8624
816 #define GL_VERTEX_ATTRIB_ARRAY_TYPE                             0x8625
817 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED               0x886A
818 #define GL_CURRENT_VERTEX_ATTRIB                                0x8626
819 #define GL_VERTEX_ATTRIB_ARRAY_POINTER                  0x8645
820 #define GL_FLOAT                                                                0x1406
821 #define GL_FLOAT_VEC2                                                   0x8B50
822 #define GL_FLOAT_VEC3                                                   0x8B51
823 #define GL_FLOAT_VEC4                                                   0x8B52
824 #define GL_FLOAT_MAT2                                                   0x8B5A
825 #define GL_FLOAT_MAT3                                                   0x8B5B
826 #define GL_FLOAT_MAT4                                                   0x8B5C
827 #endif
828
829 // GL 2.0 fragment shader
830 #ifndef GL_FRAGMENT_SHADER
831 #define GL_FRAGMENT_SHADER                                              0x8B30
832 #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS              0x8B49
833 #define GL_MAX_TEXTURE_COORDS                                   0x8871
834 #define GL_MAX_TEXTURE_IMAGE_UNITS                              0x8872
835 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT              0x8B8B
836 #endif
837
838 // GL 2.0 shading language 100
839 #ifndef GL_SHADING_LANGUAGE_VERSION
840 #define GL_SHADING_LANGUAGE_VERSION                             0x8B8C
841 #endif
842
843 // GL_ARB_texture_compression
844 extern void (GLAPIENTRY *qglCompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
845 extern void (GLAPIENTRY *qglCompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border,  GLsizei imageSize, const void *data);
846 //extern void (GLAPIENTRY *qglCompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);
847 extern void (GLAPIENTRY *qglCompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
848 extern void (GLAPIENTRY *qglCompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
849 //extern void (GLAPIENTRY *qglCompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
850 extern void (GLAPIENTRY *qglGetCompressedTexImageARB)(GLenum target, GLint lod, void *img);
851 #ifndef GL_COMPRESSED_RGB_ARB
852 #define GL_COMPRESSED_ALPHA_ARB                                         0x84E9
853 #define GL_COMPRESSED_LUMINANCE_ARB                                     0x84EA
854 #define GL_COMPRESSED_LUMINANCE_ALPHA_ARB                       0x84EB
855 #define GL_COMPRESSED_INTENSITY_ARB                                     0x84EC
856 #define GL_COMPRESSED_RGB_ARB                                           0x84ED
857 #define GL_COMPRESSED_RGBA_ARB                                          0x84EE
858 #define GL_TEXTURE_COMPRESSION_HINT_ARB                         0x84EF
859 #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB            0x86A0
860 #define GL_TEXTURE_COMPRESSED_ARB                                       0x86A1
861 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB           0x86A2
862 #define GL_COMPRESSED_TEXTURE_FORMATS_ARB                       0x86A3
863 #endif
864
865 // GL_EXT_texture_compression_s3tc
866 #ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
867 #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                   0x83F0
868 #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                  0x83F1
869 #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT                  0x83F2
870 #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT                  0x83F3
871 #endif
872
873 // GL_ARB_occlusion_query
874 extern void (GLAPIENTRY *qglGenQueriesARB)(GLsizei n, GLuint *ids);
875 extern void (GLAPIENTRY *qglDeleteQueriesARB)(GLsizei n, const GLuint *ids);
876 extern GLboolean (GLAPIENTRY *qglIsQueryARB)(GLuint qid);
877 extern void (GLAPIENTRY *qglBeginQueryARB)(GLenum target, GLuint qid);
878 extern void (GLAPIENTRY *qglEndQueryARB)(GLenum target);
879 extern void (GLAPIENTRY *qglGetQueryivARB)(GLenum target, GLenum pname, GLint *params);
880 extern void (GLAPIENTRY *qglGetQueryObjectivARB)(GLuint qid, GLenum pname, GLint *params);
881 extern void (GLAPIENTRY *qglGetQueryObjectuivARB)(GLuint qid, GLenum pname, GLuint *params);
882 #ifndef GL_SAMPLES_PASSED_ARB
883 #define GL_SAMPLES_PASSED_ARB                             0x8914
884 #define GL_QUERY_COUNTER_BITS_ARB                         0x8864
885 #define GL_CURRENT_QUERY_ARB                              0x8865
886 #define GL_QUERY_RESULT_ARB                               0x8866
887 #define GL_QUERY_RESULT_AVAILABLE_ARB                     0x8867
888 #endif
889
890 // GL_ARB_query_buffer_object
891 #ifndef GL_QUERY_BUFFER_ARB
892 #define GL_QUERY_BUFFER_ARB                               0x9192
893 #define GL_QUERY_BUFFER_BINDING_ARB                       0x9193
894 #define GL_QUERY_RESULT_NO_WAIT_ARB                       0x9194
895 #define GL_QUERY_BUFFER_BARRIER_BIT_ARB                   0x00008000
896 #endif
897
898 // GL_EXT_bgr
899 #define GL_BGR                                  0x80E0
900
901 // GL_EXT_bgra
902 #define GL_BGRA                                 0x80E1
903
904 //GL_AMD_texture_texture4
905
906 //GL_ARB_texture_gather
907
908 //GL_ARB_multisample
909 #define GL_MULTISAMPLE_ARB              0x809D
910 #define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
911 #define GL_SAMPLE_ALPHA_TO_ONE_ARB      0x809F
912 #define GL_SAMPLE_COVERAGE_ARB          0x80A0
913 #define GL_SAMPLE_BUFFERS_ARB           0x80A8
914 #define GL_SAMPLES_ARB                  0x80A9
915 #define GL_SAMPLE_COVERAGE_VALUE_ARB    0x80AA
916 #define GL_SAMPLE_COVERAGE_INVERT_ARB   0x80AB
917 #define GL_MULTISAMPLE_BIT_ARB          0x20000000
918 extern void (GLAPIENTRY *qglSampleCoverageARB)(GLclampf value, GLboolean invert);
919
920 extern void (GLAPIENTRY *qglPointSize)(GLfloat size);
921
922 //GL_EXT_packed_depth_stencil
923 #define GL_DEPTH_STENCIL_EXT            0x84F9
924 #define GL_UNSIGNED_INT_24_8_EXT        0x84FA
925 #define GL_DEPTH24_STENCIL8_EXT         0x88F0
926
927 //GL_EXT_blend_func_separate
928 #ifndef GL_BLEND_DST_RGB
929 #define GL_BLEND_DST_RGB                  0x80C8
930 #define GL_BLEND_SRC_RGB                  0x80C9
931 #define GL_BLEND_DST_ALPHA                0x80CA
932 #define GL_BLEND_SRC_ALPHA                0x80CB
933 #endif
934 extern void (GLAPIENTRY *qglBlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
935
936 #endif
937
938 #define DEBUGGL
939
940 #ifdef DEBUGGL
941 #ifdef USE_GLES2
942 #define CHECKGLERROR {if (gl_paranoid.integer){if (gl_printcheckerror.integer) Con_Printf("CHECKGLERROR at %s:%d\n", __FILE__, __LINE__);gl_errornumber = glGetError();if (gl_errornumber) GL_PrintError(gl_errornumber, __FILE__, __LINE__);}}
943 #else
944 #define CHECKGLERROR {if (gl_paranoid.integer){if (gl_printcheckerror.integer) Con_Printf("CHECKGLERROR at %s:%d\n", __FILE__, __LINE__);gl_errornumber = qglGetError ? qglGetError() : 0;if (gl_errornumber) GL_PrintError(gl_errornumber, __FILE__, __LINE__);}}
945 #endif
946 extern int gl_errornumber;
947 void GL_PrintError(int errornumber, const char *filename, int linenumber);
948 #else
949 #define CHECKGLERROR
950 #endif
951
952 #ifdef USE_GLES2
953 #define qglIsBufferARB glIsBuffer
954 #define qglIsEnabled glIsEnabled
955 #define qglIsFramebufferEXT glIsFramebuffer
956 //#define qglIsQueryARB glIsQuery
957 #define qglIsRenderbufferEXT glIsRenderbuffer
958 //#define qglUnmapBufferARB glUnmapBuffer
959 #define qglCheckFramebufferStatus glCheckFramebufferStatus
960 #define qglGetError glGetError
961 #define qglCreateProgram glCreateProgram
962 #define qglCreateShader glCreateShader
963 //#define qglGetHandleARB glGetHandle
964 #define qglGetAttribLocation glGetAttribLocation
965 #define qglGetUniformLocation glGetUniformLocation
966 //#define qglMapBufferARB glMapBuffer
967 #define qglGetString glGetString
968 //#define qglActiveStencilFaceEXT glActiveStencilFace
969 #define qglActiveTexture glActiveTexture
970 #define qglAttachShader glAttachShader
971 //#define qglBeginQueryARB glBeginQuery
972 #define qglBindAttribLocation glBindAttribLocation
973 //#define qglBindFragDataLocation glBindFragDataLocation
974 #define qglBindBuffer glBindBuffer
975 #define qglBindFramebuffer glBindFramebuffer
976 #define qglBindRenderbuffer glBindRenderbuffer
977 #define qglBindTexture glBindTexture
978 #define qglBlendEquationEXT glBlendEquation
979 #define qglBlendFunc glBlendFunc
980 #define qglBlendFuncSeparate glBlendFuncSeparate
981 #define qglBufferDataARB glBufferData
982 #define qglBufferSubDataARB glBufferSubData
983 #define qglClear glClear
984 #define qglClearColor glClearColor
985 #define qglClearDepthf glClearDepthf
986 #define qglClearStencil glClearStencil
987 #define qglColorMask glColorMask
988 #define qglCompileShader glCompileShader
989 #define qglCompressedTexImage2DARB glCompressedTexImage2D
990 #define qglCompressedTexImage3DARB glCompressedTexImage3D
991 #define qglCompressedTexSubImage2DARB glCompressedTexSubImage2D
992 #define qglCompressedTexSubImage3DARB glCompressedTexSubImage3D
993 #define qglCopyTexImage2D glCopyTexImage2D
994 #define qglCopyTexSubImage2D glCopyTexSubImage2D
995 #define qglCopyTexSubImage3D glCopyTexSubImage3D
996 #define qglCullFace glCullFace
997 #define qglDeleteBuffers glDeleteBuffers
998 #define qglDeleteFramebuffers glDeleteFramebuffers
999 #define qglDeleteProgram glDeleteProgram
1000 #define qglDeleteShader glDeleteShader
1001 //#define qglDeleteQueriesARB glDeleteQueries
1002 #define qglDeleteRenderbuffers glDeleteRenderbuffers
1003 #define qglDeleteTextures glDeleteTextures
1004 #define qglDepthFunc glDepthFunc
1005 #define qglDepthMask glDepthMask
1006 #define qglDepthRangef glDepthRangef
1007 #define qglDetachShader glDetachShader
1008 #define qglDisable glDisable
1009 #define qglDisableVertexAttribArray glDisableVertexAttribArray
1010 #define qglDrawArrays glDrawArrays
1011 //#define qglDrawBuffer glDrawBuffer
1012 //#define qglDrawBuffersARB glDrawBuffers
1013 #define qglDrawElements glDrawElements
1014 #define qglEnable glEnable
1015 #define qglEnableVertexAttribArray glEnableVertexAttribArray
1016 //#define qglEndQueryARB glEndQuery
1017 #define qglFinish glFinish
1018 #define qglFlush glFlush
1019 #define qglFramebufferRenderbuffer glFramebufferRenderbuffer
1020 #define qglFramebufferTexture2D glFramebufferTexture2D
1021 #define qglFramebufferTexture3DEXT glFramebufferTexture3D
1022 #define qglGenBuffers glGenBuffers
1023 #define qglGenFramebuffers glGenFramebuffers
1024 //#define qglGenQueriesARB glGenQueries
1025 #define qglGenRenderbuffers glGenRenderbuffers
1026 #define qglGenTextures glGenTextures
1027 #define qglGenerateMipmapEXT glGenerateMipmap
1028 #define qglGetActiveAttrib glGetActiveAttrib
1029 #define qglGetActiveUniform glGetActiveUniform
1030 #define qglGetAttachedShaders glGetAttachedShaders
1031 #define qglGetBooleanv glGetBooleanv
1032 //#define qglGetCompressedTexImageARB glGetCompressedTexImage
1033 #define qglGetDoublev glGetDoublev
1034 #define qglGetFloatv glGetFloatv
1035 #define qglGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv
1036 #define qglGetProgramInfoLog glGetProgramInfoLog
1037 #define qglGetShaderInfoLog glGetShaderInfoLog
1038 #define qglGetIntegerv glGetIntegerv
1039 #define qglGetShaderiv glGetShaderiv
1040 #define qglGetProgramiv glGetProgramiv
1041 //#define qglGetQueryObjectivARB glGetQueryObjectiv
1042 //#define qglGetQueryObjectuivARB glGetQueryObjectuiv
1043 //#define qglGetQueryivARB glGetQueryiv
1044 #define qglGetRenderbufferParameterivEXT glGetRenderbufferParameteriv
1045 #define qglGetShaderSource glGetShaderSource
1046 #define qglGetTexImage glGetTexImage
1047 #define qglGetTexLevelParameterfv glGetTexLevelParameterfv
1048 #define qglGetTexLevelParameteriv glGetTexLevelParameteriv
1049 #define qglGetTexParameterfv glGetTexParameterfv
1050 #define qglGetTexParameteriv glGetTexParameteriv
1051 #define qglGetUniformfv glGetUniformfv
1052 #define qglGetUniformiv glGetUniformiv
1053 #define qglHint glHint
1054 #define qglLinkProgram glLinkProgram
1055 #define qglPixelStorei glPixelStorei
1056 #define qglPointSize glPointSize
1057 //#define qglPolygonMode glPolygonMode
1058 #define qglPolygonOffset glPolygonOffset
1059 #define qglReadBuffer glReadBuffer
1060 #define qglReadPixels glReadPixels
1061 #define qglRenderbufferStorage glRenderbufferStorage
1062 #define qglScissor glScissor
1063 #define qglShaderSource glShaderSource
1064 #define qglStencilFunc glStencilFunc
1065 #define qglStencilFuncSeparate glStencilFuncSeparate
1066 #define qglStencilMask glStencilMask
1067 #define qglStencilOp glStencilOp
1068 #define qglStencilOpSeparate glStencilOpSeparate
1069 #define qglTexImage2D glTexImage2D
1070 #define qglTexImage3D glTexImage3D
1071 #define qglTexParameterf glTexParameterf
1072 #define qglTexParameterfv glTexParameterfv
1073 #define qglTexParameteri glTexParameteri
1074 #define qglTexSubImage2D glTexSubImage2D
1075 #define qglTexSubImage3D glTexSubImage3D
1076 #define qglUniform1f glUniform1f
1077 #define qglUniform1fv glUniform1fv
1078 #define qglUniform1i glUniform1i
1079 #define qglUniform1iv glUniform1iv
1080 #define qglUniform2f glUniform2f
1081 #define qglUniform2fv glUniform2fv
1082 #define qglUniform2i glUniform2i
1083 #define qglUniform2iv glUniform2iv
1084 #define qglUniform3f glUniform3f
1085 #define qglUniform3fv glUniform3fv
1086 #define qglUniform3i glUniform3i
1087 #define qglUniform3iv glUniform3iv
1088 #define qglUniform4f glUniform4f
1089 #define qglUniform4fv glUniform4fv
1090 #define qglUniform4i glUniform4i
1091 #define qglUniform4iv glUniform4iv
1092 #define qglUniformMatrix2fv glUniformMatrix2fv
1093 #define qglUniformMatrix3fv glUniformMatrix3fv
1094 #define qglUniformMatrix4fv glUniformMatrix4fv
1095 #define qglUseProgram glUseProgram
1096 #define qglValidateProgram glValidateProgram
1097 #define qglVertexAttribPointer glVertexAttribPointer
1098 #define qglViewport glViewport
1099 #define qglVertexAttrib1f glVertexAttrib1f
1100 //#define qglVertexAttrib1s glVertexAttrib1s
1101 //#define qglVertexAttrib1d glVertexAttrib1d
1102 #define qglVertexAttrib2f glVertexAttrib2f
1103 //#define qglVertexAttrib2s glVertexAttrib2s
1104 //#define qglVertexAttrib2d glVertexAttrib2d
1105 #define qglVertexAttrib3f glVertexAttrib3f
1106 //#define qglVertexAttrib3s glVertexAttrib3s
1107 //#define qglVertexAttrib3d glVertexAttrib3d
1108 #define qglVertexAttrib4f glVertexAttrib4f
1109 //#define qglVertexAttrib4s glVertexAttrib4s
1110 //#define qglVertexAttrib4d glVertexAttrib4d
1111 //#define qglVertexAttrib4Nub glVertexAttrib4Nub
1112 #define qglVertexAttrib1fv glVertexAttrib1fv
1113 //#define qglVertexAttrib1sv glVertexAttrib1sv
1114 //#define qglVertexAttrib1dv glVertexAttrib1dv
1115 #define qglVertexAttrib2fv glVertexAttrib2fv
1116 //#define qglVertexAttrib2sv glVertexAttrib2sv
1117 //#define qglVertexAttrib2dv glVertexAttrib2dv
1118 #define qglVertexAttrib3fv glVertexAttrib3fv
1119 //#define qglVertexAttrib3sv glVertexAttrib3sv
1120 //#define qglVertexAttrib3dv glVertexAttrib3dv
1121 #define qglVertexAttrib4fv glVertexAttrib4fv
1122 //#define qglVertexAttrib4sv glVertexAttrib4sv
1123 //#define qglVertexAttrib4dv glVertexAttrib4dv
1124 //#define qglVertexAttrib4iv glVertexAttrib4iv
1125 //#define qglVertexAttrib4bv glVertexAttrib4bv
1126 //#define qglVertexAttrib4ubv glVertexAttrib4ubv
1127 //#define qglVertexAttrib4usv glVertexAttrib4usv
1128 //#define qglVertexAttrib4uiv glVertexAttrib4uiv
1129 //#define qglVertexAttrib4Nbv glVertexAttrib4Nbv
1130 //#define qglVertexAttrib4Nsv glVertexAttrib4Nsv
1131 //#define qglVertexAttrib4Niv glVertexAttrib4Niv
1132 //#define qglVertexAttrib4Nubv glVertexAttrib4Nubv
1133 //#define qglVertexAttrib4Nusv glVertexAttrib4Nusv
1134 //#define qglVertexAttrib4Nuiv glVertexAttrib4Nuiv
1135 //#define qglGetVertexAttribdv glGetVertexAttribdv
1136 #define qglGetVertexAttribfv glGetVertexAttribfv
1137 #define qglGetVertexAttribiv glGetVertexAttribiv
1138 #define qglGetVertexAttribPointerv glGetVertexAttribPointerv
1139 #endif
1140
1141 #endif