Adjust the position of the partial Frame
[platform/framework/native/uifw.git] / inc / gl2ext.h
1 #ifndef __gl2ext_h_
2 #define __gl2ext_h_
3
4 #include "gl2platform.h"
5
6 #if defined(FEATURE_SAMSUNG_LSI) && !defined(_WIN32)
7 #include "GLES2/GL2_OGL2.h"
8 #endif
9
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 /*
16  * This document is licensed under the SGI Free Software B License Version
17  * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
18  */
19
20 #ifndef GL_APIENTRYP
21 #define GL_APIENTRYP GL_APIENTRY *
22 #endif
23
24 #define GL_GLEXT_PROTOTYPES
25
26 /*------------------------------------------------------------------------*
27  * OES extension tokens
28  *------------------------------------------------------------------------*/
29
30 /* GL_OES_compressed_ETC1_RGB8_texture */
31 #ifndef GL_OES_compressed_ETC1_RGB8_texture
32 #define GL_ETC1_RGB8_OES                                        0x8D64
33 #endif
34
35 /* GL_OES_compressed_paletted_texture */
36 #ifndef GL_OES_compressed_paletted_texture
37 #define GL_PALETTE4_RGB8_OES                                    0x8B90
38 #define GL_PALETTE4_RGBA8_OES                                   0x8B91
39 #define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
40 #define GL_PALETTE4_RGBA4_OES                                   0x8B93
41 #define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
42 #define GL_PALETTE8_RGB8_OES                                    0x8B95
43 #define GL_PALETTE8_RGBA8_OES                                   0x8B96
44 #define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
45 #define GL_PALETTE8_RGBA4_OES                                   0x8B98
46 #define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
47 #endif
48
49 /* GL_OES_depth24 */
50 #ifndef GL_OES_depth24
51 #define GL_DEPTH_COMPONENT24_OES                                0x81A6
52 #endif
53
54 /* GL_OES_depth32 */
55 #ifndef GL_OES_depth32
56 #define GL_DEPTH_COMPONENT32_OES                                0x81A7
57 #endif
58
59 /* GL_OES_depth_texture */
60 /* No new tokens introduced by this extension. */
61
62 /* GL_OES_EGL_image */
63 #ifndef GL_OES_EGL_image
64 typedef void* GLeglImageOES;
65 #endif
66
67 /* GL_OES_get_program_binary */
68 #ifndef GL_OES_get_program_binary
69 #define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
70 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
71 #define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
72 #endif
73
74 /* GL_OES_mapbuffer */
75 #ifndef GL_OES_mapbuffer
76 #define GL_WRITE_ONLY_OES                                       0x88B9
77 #define GL_BUFFER_ACCESS_OES                                    0x88BB
78 #define GL_BUFFER_MAPPED_OES                                    0x88BC
79 #define GL_BUFFER_MAP_POINTER_OES                               0x88BD
80 #endif
81
82 /* GL_OES_packed_depth_stencil */
83 #ifndef GL_OES_packed_depth_stencil
84 #define GL_DEPTH_STENCIL_OES                                    0x84F9
85 #define GL_UNSIGNED_INT_24_8_OES                                0x84FA
86 #define GL_DEPTH24_STENCIL8_OES                                 0x88F0
87 #endif
88
89 /* GL_OES_rgb8_rgba8 */
90 #ifndef GL_OES_rgb8_rgba8
91 #define GL_RGB8_OES                                             0x8051
92 #define GL_RGBA8_OES                                            0x8058
93 #endif
94
95 /* GL_OES_standard_derivatives */
96 #ifndef GL_OES_standard_derivatives
97 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
98 #endif
99
100 /* GL_OES_stencil1 */
101 #ifndef GL_OES_stencil1
102 #define GL_STENCIL_INDEX1_OES                                   0x8D46
103 #endif
104
105 /* GL_OES_stencil4 */
106 #ifndef GL_OES_stencil4
107 #define GL_STENCIL_INDEX4_OES                                   0x8D47
108 #endif
109
110 /* GL_OES_texture3D */
111 #ifndef GL_OES_texture3D
112 #define GL_TEXTURE_WRAP_R_OES                                   0x8072
113 #define GL_TEXTURE_3D_OES                                       0x806F
114 #define GL_TEXTURE_BINDING_3D_OES                               0x806A
115 #define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
116 #define GL_SAMPLER_3D_OES                                       0x8B5F
117 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
118 #endif
119
120 /* GL_OES_texture_half_float */
121 #ifndef GL_OES_texture_half_float
122 #define GL_HALF_FLOAT_OES                                       0x8D61
123 #endif
124
125 /* GL_OES_vertex_half_float */
126 /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
127
128 /* GL_OES_vertex_type_10_10_10_2 */
129 #ifndef GL_OES_vertex_type_10_10_10_2
130 #define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
131 #define GL_INT_10_10_10_2_OES                                   0x8DF7
132 #endif
133
134 /*------------------------------------------------------------------------*
135  * AMD extension tokens
136  *------------------------------------------------------------------------*/
137
138 /* GL_AMD_compressed_3DC_texture */
139 #ifndef GL_AMD_compressed_3DC_texture
140 #define GL_3DC_X_AMD                                            0x87F9
141 #define GL_3DC_XY_AMD                                           0x87FA
142 #endif
143
144 /* GL_AMD_compressed_ATC_texture */
145 #ifndef GL_AMD_compressed_ATC_texture
146 #define GL_ATC_RGB_AMD                                          0x8C92
147 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
148 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
149 #endif
150
151 /* GL_AMD_program_binary_Z400 */
152 #ifndef GL_AMD_program_binary_Z400
153 #define GL_Z400_BINARY_AMD                                      0x8740
154 #endif
155
156 /* GL_AMD_performance_monitor */
157 #ifndef GL_AMD_performance_monitor
158 #define GL_COUNTER_TYPE_AMD                                     0x8BC0
159 #define GL_COUNTER_RANGE_AMD                                    0x8BC1
160 #define GL_UNSIGNED_INT64_AMD                                   0x8BC2
161 #define GL_PERCENTAGE_AMD                                       0x8BC3
162 #define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
163 #define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
164 #define GL_PERFMON_RESULT_AMD                                   0x8BC6
165 #endif
166
167 /*------------------------------------------------------------------------*
168  * EXT extension tokens
169  *------------------------------------------------------------------------*/
170
171 /* GL_EXT_texture_filter_anisotropic */
172 #ifndef GL_EXT_texture_filter_anisotropic
173 #define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
174 #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
175 #endif
176
177 /* GL_EXT_texture_type_2_10_10_10_REV */
178 #ifndef GL_EXT_texture_type_2_10_10_10_REV
179 #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
180 #endif
181
182 /* GL_EXT_texture_format_BGRA8888 */
183 #ifndef GL_EXT_texture_format_BGRA8888
184 #define GL_BGRA                                                 0x80E1
185 #endif
186
187 /*------------------------------------------------------------------------*
188  * IMG extension tokens
189  *------------------------------------------------------------------------*/
190
191 /* GL_IMG_read_format */
192 #ifndef GL_IMG_read_format
193 #define GL_BGRA                                                 0x80E1
194 #define GL_UNSIGNED_SHORT_4_4_4_4_REV                           0x8365
195 #define GL_UNSIGNED_SHORT_1_5_5_5_REV                           0x8366
196 #endif
197
198 /* GL_IMG_texture_compression_pvrtc */
199 #ifndef GL_IMG_texture_compression_pvrtc
200 #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
201 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
202 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
203 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
204 #endif
205
206 /*------------------------------------------------------------------------*
207  * NV extension tokens
208  *------------------------------------------------------------------------*/
209
210 /* GL_NV_fence */
211 #ifndef GL_NV_fence
212 #define GL_ALL_COMPLETED_NV                                     0x84F2
213 #define GL_FENCE_STATUS_NV                                      0x84F3
214 #define GL_FENCE_CONDITION_NV                                   0x84F4
215 #endif
216
217 /*------------------------------------------------------------------------*
218  * QCOM extension tokens
219  *------------------------------------------------------------------------*/
220
221 /* GL_QCOM_driver_control */
222 /* No new tokens introduced by this extension. */
223
224 /* GL_QCOM_perfmon_global_mode */
225 #ifndef GL_QCOM_perfmon_global_mode
226 #define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
227 #endif
228
229 /*------------------------------------------------------------------------*
230  * End of extension tokens, start of corresponding extension functions
231  *------------------------------------------------------------------------*/
232
233 /*------------------------------------------------------------------------*
234  * OES extension functions
235  *------------------------------------------------------------------------*/
236
237 /* GL_OES_compressed_ETC1_RGB8_texture */
238 #ifndef GL_OES_compressed_ETC1_RGB8_texture
239 #define GL_OES_compressed_ETC1_RGB8_texture 1
240 #endif
241
242 /* GL_OES_compressed_paletted_texture */
243 #ifndef GL_OES_compressed_paletted_texture
244 #define GL_OES_compressed_paletted_texture 1
245 #endif
246
247 /* GL_OES_EGL_image */
248 #ifndef GL_OES_EGL_image
249 #define GL_OES_EGL_image 1
250 #ifdef GL_GLEXT_PROTOTYPES
251 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
252 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
253 #endif
254 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)(GLenum target, GLeglImageOES image);
255 typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)(GLenum target, GLeglImageOES image);
256 #endif
257
258 /* GL_OES_depth24 */
259 #ifndef GL_OES_depth24
260 #define GL_OES_depth24 1
261 #endif
262
263 /* GL_OES_depth32 */
264 #ifndef GL_OES_depth32
265 #define GL_OES_depth32 1
266 #endif
267
268 /* GL_OES_depth_texture */
269 #ifndef GL_OES_depth_texture
270 #define GL_OES_depth_texture 1
271 #endif
272
273 /* GL_OES_element_index_uint */
274 #ifndef GL_OES_element_index_uint
275 #define GL_OES_element_index_uint 1
276 #endif
277
278 /* GL_OES_fbo_render_mipmap */
279 #ifndef GL_OES_fbo_render_mipmap
280 #define GL_OES_fbo_render_mipmap 1
281 #endif
282
283 /* GL_OES_fragment_precision_high */
284 #ifndef GL_OES_fragment_precision_high
285 #define GL_OES_fragment_precision_high 1
286 #endif
287
288 /* GL_OES_get_program_binary */
289 #ifndef GL_OES_get_program_binary
290 #define GL_OES_get_program_binary 1
291 #if 0 // not supported
292 #ifdef GL_GLEXT_PROTOTYPES
293 GL_APICALL void GL_APIENTRY glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary);
294 GL_APICALL void GL_APIENTRY glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void* binary, GLint length);
295 #endif
296 #endif // not supported
297 typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC)(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat,
298                                                                                                                  void* binary);
299 typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC)(GLuint program, GLenum binaryFormat, const void* binary, GLint length);
300 #endif
301
302 /* GL_OES_mapbuffer */
303 #ifndef GL_OES_mapbuffer
304 #define GL_OES_mapbuffer 1
305 #if 0 // not supported
306 #ifdef GL_GLEXT_PROTOTYPES
307 GL_APICALL void* GL_APIENTRY glMapBufferOES(GLenum target, GLenum access);
308 GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES(GLenum target);
309 GL_APICALL void GL_APIENTRY glGetBufferPointervOES(GLenum target, GLenum pname, void** params);
310 #endif
311 #endif // not supported
312 typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC)(GLenum target, GLenum access);
313 typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC)(GLenum target);
314 typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC)(GLenum target, GLenum pname, void** params);
315 #endif
316
317 /* GL_OES_packed_depth_stencil */
318 #ifndef GL_OES_packed_depth_stencil
319 #define GL_OES_packed_depth_stencil 1
320 #endif
321
322 /* GL_OES_rgb8_rgba8 */
323 #ifndef GL_OES_rgb8_rgba8
324 #define GL_OES_rgb8_rgba8 1
325 #endif
326
327 /* GL_OES_standard_derivatives */
328 #ifndef GL_OES_standard_derivatives
329 #define GL_OES_standard_derivatives 1
330 #endif
331
332 /* GL_OES_stencil1 */
333 #ifndef GL_OES_stencil1
334 #define GL_OES_stencil1 1
335 #endif
336
337 /* GL_OES_stencil4 */
338 #ifndef GL_OES_stencil4
339 #define GL_OES_stencil4 1
340 #endif
341
342 /* GL_OES_texture_3D */
343 #ifndef GL_OES_texture_3D
344 #define GL_OES_texture_3D 1
345 #ifdef GL_GLEXT_PROTOTYPES
346 GL_APICALL void GL_APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
347 GL_APICALL void GL_APIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
348 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
349 GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
350 GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
351 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
352 #endif
353 typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width,
354                                                                                                    GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type,
355                                                                                                    const GLvoid* pixels);
356 typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
357                                                                                                           GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
358                                                                                                           const void* pixels);
359 typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
360                                                                                                                   GLint x, GLint y, GLsizei width, GLsizei height);
361 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC)(GLenum target, GLint level, GLenum internalformat, GLsizei width,
362                                                                                                                          GLsizei height, GLsizei depth, GLint border, GLsizei imageSize,
363                                                                                                                          const void* data);
364 typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC)(GLenum target, GLint level, GLint xoffset, GLint yoffset,
365                                                                                                                                 GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
366                                                                                                                                 GLenum format, GLsizei imageSize, const void* data);
367 typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
368                                                                                                                  GLint level, GLint zoffset);
369 #endif
370
371 /* GL_OES_texture_float_linear */
372 #ifndef GL_OES_texture_float_linear
373 #define GL_OES_texture_float_linear 1
374 #endif
375
376 /* GL_OES_texture_half_float_linear */
377 #ifndef GL_OES_texture_half_float_linear
378 #define GL_OES_texture_half_float_linear 1
379 #endif
380
381 /* GL_OES_texture_float */
382 #ifndef GL_OES_texture_float
383 #define GL_OES_texture_float 1
384 #endif
385
386 /* GL_OES_texture_half_float */
387 #ifndef GL_OES_texture_half_float
388 #define GL_OES_texture_half_float 1
389 #endif
390
391 /* GL_OES_texture_npot */
392 #ifndef GL_OES_texture_npot
393 #define GL_OES_texture_npot 1
394 #endif
395
396 /* GL_OES_vertex_half_float */
397 #ifndef GL_OES_vertex_half_float
398 #define GL_OES_vertex_half_float 1
399 #endif
400
401 /* GL_OES_vertex_type_10_10_10_2 */
402 #ifndef GL_OES_vertex_type_10_10_10_2
403 #define GL_OES_vertex_type_10_10_10_2 1
404 #endif
405
406 /*------------------------------------------------------------------------*
407  * AMD extension functions
408  *------------------------------------------------------------------------*/
409
410 /* GL_AMD_compressed_3DC_texture */
411 #ifndef GL_AMD_compressed_3DC_texture
412 #define GL_AMD_compressed_3DC_texture 1
413 #endif
414
415 /* GL_AMD_compressed_ATC_texture */
416 #ifndef GL_AMD_compressed_ATC_texture
417 #define GL_AMD_compressed_ATC_texture 1
418 #endif
419
420 /* GL_AMD_program_binary_Z400 */
421 #ifndef GL_AMD_program_binary_Z400
422 #define GL_AMD_program_binary_Z400 1
423 #endif
424
425 /* AMD_performance_monitor */
426 #ifndef GL_AMD_performance_monitor
427 #define GL_AMD_performance_monitor 1
428 #if 0 // not supported
429 #ifdef GL_GLEXT_PROTOTYPES
430 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD(GLint* numGroups, GLsizei groupsSize, GLuint* groups);
431 GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD(GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters);
432 GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei* length, char* groupString);
433 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString);
434 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, void* data);
435 GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD(GLsizei n, GLuint* monitors);
436 GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD(GLsizei n, GLuint* monitors);
437 GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList);
438 GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD(GLuint monitor);
439 GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD(GLuint monitor);
440 GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten);
441 #endif
442 #endif // not supported
443 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC)(GLint* numGroups, GLsizei groupsSize, GLuint* groups);
444 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC)(GLuint group, GLint* numCounters, GLint* maxActiveCounters,
445                                                                                                                            GLsizei counterSize, GLuint* counters);
446 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC)(GLuint group, GLsizei bufSize, GLsizei* length,
447                                                                                                                                   char* groupString);
448 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC)(GLuint group, GLuint counter, GLsizei bufSize,
449                                                                                                                                         GLsizei* length, char* counterString);
450 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC)(GLuint group, GLuint counter, GLenum pname, void* data);
451 typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC)(GLsizei n, GLuint* monitors);
452 typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC)(GLsizei n, GLuint* monitors);
453 typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC)(GLuint monitor, GLboolean enable, GLuint group,
454                                                                                                                                   GLint numCounters, GLuint* countersList);
455 typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC)(GLuint monitor);
456 typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC)(GLuint monitor);
457 typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data,
458                                                                                                                                   GLint* bytesWritten);
459 #endif
460
461 /*------------------------------------------------------------------------*
462  * EXT extension functions
463  *------------------------------------------------------------------------*/
464
465 /* GL_EXT_texture_filter_anisotropic */
466 #ifndef GL_EXT_texture_filter_anisotropic
467 #define GL_EXT_texture_filter_anisotropic 1
468 #endif
469
470 /* GL_EXT_texture_type_2_10_10_10_REV */
471 #ifndef GL_EXT_texture_type_2_10_10_10_REV
472 #define GL_EXT_texture_type_2_10_10_10_REV 1
473 #endif
474
475 /* GL_EXT_texture_format_BGRA8888 */
476 #ifndef GL_EXT_texture_format_BGRA8888
477 #define GL_EXT_texture_format_BGRA8888 1
478 #endif
479
480 /*------------------------------------------------------------------------*
481  * IMG extension functions
482  *------------------------------------------------------------------------*/
483
484 /* GL_IMG_read_format */
485 #ifndef GL_IMG_read_format
486 #define GL_IMG_read_format 1
487 #endif
488
489 /* GL_IMG_texture_compression_pvrtc */
490 #ifndef GL_IMG_texture_compression_pvrtc
491 #define GL_IMG_texture_compression_pvrtc 1
492 #endif
493
494 /*------------------------------------------------------------------------*
495  * NV extension functions
496  *------------------------------------------------------------------------*/
497
498 /* GL_NV_fence */
499 #ifndef GL_NV_fence
500 #define GL_NV_fence 1
501 #ifdef GL_GLEXT_PROTOTYPES
502 GL_APICALL void GL_APIENTRY glDeleteFencesNV(GLsizei, const GLuint*);
503 GL_APICALL void GL_APIENTRY glGenFencesNV(GLsizei, GLuint*);
504 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV(GLuint);
505 GL_APICALL GLboolean GL_APIENTRY glTestFenceNV(GLuint);
506 GL_APICALL void GL_APIENTRY glGetFenceivNV(GLuint, GLenum, GLint*);
507 GL_APICALL void GL_APIENTRY glFinishFenceNV(GLuint);
508 GL_APICALL void GL_APIENTRY glSetFenceNV(GLuint, GLenum);
509 #endif
510 typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC)(GLsizei n, const GLuint* fences);
511 typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC)(GLsizei n, GLuint* fences);
512 typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC)(GLuint fence);
513 typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC)(GLuint fence);
514 typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC)(GLuint fence, GLenum pname, GLint* params);
515 typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC)(GLuint fence);
516 typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC)(GLuint fence, GLenum condition);
517 #endif
518
519 /*------------------------------------------------------------------------*
520  * QCOM extension functions
521  *------------------------------------------------------------------------*/
522
523 /* GL_QCOM_driver_control */
524 #ifndef GL_QCOM_driver_control
525 #define GL_QCOM_driver_control 1
526 #ifdef GL_GLEXT_PROTOTYPES
527 GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM(GLint* num, GLsizei size, GLuint* driverControls);
528 GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString);
529 GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM(GLuint driverControl);
530 GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM(GLuint driverControl);
531 #endif
532 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC)(GLint* num, GLsizei size, GLuint* driverControls);
533 typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC)(GLuint driverControl, GLsizei bufSize, GLsizei* length,
534                                                                                                                                 char* driverControlString);
535 typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC)(GLuint driverControl);
536 typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC)(GLuint driverControl);
537 #endif
538
539 /* GL_QCOM_perfmon_global_mode */
540 #ifndef GL_QCOM_perfmon_global_mode
541 #define GL_QCOM_perfmon_global_mode 1
542 #endif
543
544 /*------------------------------------------------------------------------*
545  * Samsung extension functions
546  *------------------------------------------------------------------------*/
547
548 #define GL_BGRA                           0x80E1
549
550 /* Binary Shader(C110) */
551 #define GL_S5PC110_BINARY_SHADER          0x8C0A
552
553 /* ErrorCode */
554 #define GL_STACK_OVERFLOW                 0x0503
555 #define GL_STACK_UNDERFLOW                0x0504
556
557 /* Get PName */
558 #define GL_MAX_ELEMENTS_VERTICES          0x80E8
559 #define GL_MAX_ELEMENTS_INDICES           0x80E9
560 #define GL_MAX_TEXTURE_UNITS              0x84E2
561
562 //sanvd added this extension for supporting s3tc
563 //OES_texture_compression_S3TC
564 #define GL_RGB_S3TC_OES                   0x83F0
565 #define GL_RGBA_S3TC_OES                  0x83F1
566
567 /* PointSize */
568 #define GL_POINT_SIZE                     0x0B11
569 #define GL_POINT_SIZE_MIN                 0x8126
570 #define GL_POINT_SIZE_MAX                 0x8127
571
572 GL_APICALL void GL_APIENTRY glPointSize(GLfloat size);
573
574
575 /* EN_EXT */
576 #define EN_EXT_ALPHA_TEST_EXP
577 #define EN_EXT_VARYING_INTERPOLATION_EXP
578 #define EN_EXT_LOGIC_OP_EXP
579 #define EN_EXT_POINT_SPRITE_EXP
580
581 #ifdef EN_EXT_ALPHA_TEST_EXP
582 #define GL_ALPHA_TEST_EXP                  0x0BC0
583 #define GL_ALPHA_TEST_FUNC_EXP             0x0BC1
584 #define GL_ALPHA_TEST_REF_EXP              0x0BC2
585 #ifdef GL_GLEXT_PROTOTYPES
586 GL_APICALL void GL_APIENTRY glAlphaFuncEXP(GLenum func, GLclampf ref);
587 #else
588 typedef void (GL_APIENTRYP PFNGLALPHAFUNCPROC)(GLenum func, GLclampf ref);
589 #endif
590 #endif //EN_EXT_ALPHA_TEST_EXP
591
592 #ifdef EN_EXT_VARYING_INTERPOLATION_EXP
593 #define GL_FLAT_EXP                        0x1D00
594 #define GL_SMOOTH_EXP                      0x1D01
595 #ifdef GL_GLEXT_PROTOTYPES
596 GL_APICALL void GL_APIENTRY glVaryingInterpolationEXP(const char* name, GLenum mode);
597 GL_APICALL void GL_APIENTRY glGetVaryingInterpolationEXP(const char* name, GLint* params);
598 #else
599 typedef void (GL_APIENTRYP PFNGLVARYINGINTERPOLATIONPROC)(const char* name, GLenum mode);
600 typedef void (GL_APIENTRYP PFNGLGETVARYINGINTERPOLATIONPROC)(const char* name, GLint* params);
601 #endif
602 #endif //EN_EXT_VARYING_INTERPOLATION_EXP
603
604 #ifdef EN_EXT_LOGIC_OP_EXP
605 #define GL_LOGIC_OP_MODE_EXP               0x0BF0
606 #define GL_COLOR_LOGIC_OP_EXP              0x0BF2
607 #define GL_CLEAR_EXP                        0x1500
608 #define GL_AND_EXP                          0x1501
609 #define GL_AND_REVERSE_EXP                  0x1502
610 #define GL_COPY_EXP                         0x1503
611 #define GL_AND_INVERTED_EXP                 0x1504
612 #define GL_NOOP_EXP                         0x1505
613 #define GL_XOR_EXP                          0x1506
614 #define GL_OR_EXP                           0x1507
615 #define GL_NOR_EXP                          0x1508
616 #define GL_EQUIV_EXP                        0x1509
617 #define GL_INVERT_EXP                       0x150A
618 #define GL_OR_REVERSE_EXP                   0x150B
619 #define GL_COPY_INVERTED_EXP                0x150C
620 #define GL_OR_INVERTED_EXP                  0x150D
621 #define GL_NAND_EXP                         0x150E
622 #define GL_SET_EXP                          0x150F
623 #endif //EN_EXT_LOGIC_OP_EXP
624
625 #ifdef EN_EXT_ALPHA_TEST_EXP
626 #define GL_ALPHA_TEST_EXP                  0x0BC0
627 #define GL_ALPHA_TEST_FUNC_EXP             0x0BC1
628 #define GL_ALPHA_TEST_REF_EXP              0x0BC2
629 #endif //EN_EXT_ALPHA_TEST_EXP
630
631 #ifdef EN_EXT_POINT_SPRITE_EXP
632 #define GL_POINT_SPRITE_OES_EXP         0x8861
633 #endif
634
635 #ifdef GL_GLEXT_PROTOTYPES
636 GL_APICALL void GL_APIENTRY glLogicOpEXP(GLenum op);
637 #else
638 typedef void (GL_APIENTRYP PFNGLLOGICOPPROC)(GLenum op);
639 #endif
640
641 /* zepplin 2008.05.08 added */
642 GL_APICALL void GL_APIENTRY glDrawArraysWrap(GLenum mode, GLint first, GLsizei count, GLint MatPos, const GLfloat* Matdt, /*GLsizei MatSize, GLboolean MatBool,*/
643                                                                                          GLint BoolPos, GLint Boolptr, GLuint shaderNum, void* shaderStr);
644 GL_APICALL void GL_APIENTRY glDrawElementsWrap(GLenum mode, GLsizei count, GLenum type, const void* indices, GLint MatPos, const GLfloat* Matdt, /*GLsizei MatSize, GLboolean MatBool,*/
645                                                                                            GLint BoolPos, GLint Boolptr, GLuint shaderNum, void* shaderStr);
646
647
648 #ifdef CHIP_VERIFY_ACTIVATE
649 GL_APICALL GLuint GL_APIENTRY glChipVerification(GLuint key);
650 #endif
651
652 #ifdef __cplusplus
653 }
654 #endif
655
656 #endif /* __gl2ext_h_ */