├── .gitignore ├── Makefile.am ├── README ├── configure.ac ├── egl.c ├── egl.pc.in ├── glesv2.pc.in └── include ├── EGL ├── egl.h ├── eglext.h ├── eglmesaext.h └── eglplatform.h ├── GLES2 ├── gl2.h ├── gl2ext.h └── gl2platform.h ├── KHR └── khrplatform.h └── README /.gitignore: -------------------------------------------------------------------------------- 1 | autom4te.cache/* 2 | aclocal.m4 3 | config.* 4 | configure 5 | depcomp 6 | m4/* 7 | missing 8 | */*~ 9 | *~ 10 | *.o 11 | *.lo 12 | \#*\# 13 | .deps 14 | .libs 15 | ltmain.sh 16 | stamp-h1 17 | install-sh 18 | Makefile 19 | *.pc 20 | *.la 21 | libtool 22 | Makefile.in 23 | 24 | # gnu global files 25 | GPATH 26 | GRTAGS 27 | GSYMS 28 | GTAGS 29 | HTML 30 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libEGL.la 2 | 3 | libEGL_la_SOURCES = \ 4 | egl.c 5 | 6 | libEGL_la_LIBADD = \ 7 | @LIBGBM_LIBS@ \ 8 | @WAYLAND_KMS_LIBS@ 9 | 10 | 11 | libEGL_la_CFLAGS = \ 12 | -I$(top_srcdir)/include \ 13 | @LIBGBM_CFLAGS@ \ 14 | @WAYLAND_KMS_CFLAGS@ 15 | 16 | libEGL_la_LDFLAGS = -version-info 1:0:0 17 | 18 | egldir = $(includedir)/EGL 19 | egl_HEADERS = \ 20 | $(top_srcdir)/include/EGL/eglmesaext.h \ 21 | $(top_srcdir)/include/EGL/egl.h \ 22 | $(top_srcdir)/include/EGL/eglplatform.h \ 23 | $(top_srcdir)/include/EGL/eglext.h 24 | 25 | khrdir = $(includedir)/KHR 26 | khr_HEADERS = \ 27 | $(top_srcdir)/include/KHR/khrplatform.h 28 | 29 | gles2dir = $(includedir)/GLES2 30 | gles2_HEADERS = \ 31 | $(top_srcdir)/include/GLES2/gl2ext.h \ 32 | $(top_srcdir)/include/GLES2/gl2platform.h \ 33 | $(top_srcdir)/include/GLES2/gl2.h 34 | 35 | pkgconfigdir = $(libdir)/pkgconfig 36 | pkgconfig_DATA = egl.pc glesv2.pc 37 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | EGL wrapper library for Wayland. 2 | 3 | This EGL library wraps IMG's OpenGL/ES library. 4 | 5 | This library assumes that the real EGL library is either set in the environment 6 | variable LIBEGL or the name is libEGL-pvr.so for now. Yes, it's hard coded. 7 | 8 | It also assumes that the EGL library could be loaded with dlopen(). Make sure 9 | that the library exists in the search path. 10 | 11 | This package behaves as a Mesa library. In order to support various wayland-egl 12 | apps we also install the following package configs: 13 | 14 | - egl.pc (has to be >= 7.10) 15 | - glesv2.pc 16 | 17 | The package configs above will refer IMG library and this library. 18 | 19 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2005 Red Hat, Inc. 3 | # 4 | # Permission to use, copy, modify, distribute, and sell this software and its 5 | # documentation for any purpose is hereby granted without fee, provided that 6 | # the above copyright notice appear in all copies and that both that 7 | # copyright notice and this permission notice appear in supporting 8 | # documentation, and that the name of Red Hat not be used in 9 | # advertising or publicity pertaining to distribution of the software without 10 | # specific, written prior permission. Red Hat makes no 11 | # representations about the suitability of this software for any purpose. It 12 | # is provided "as is" without express or implied warranty. 13 | # 14 | # RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15 | # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16 | # EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17 | # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18 | # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19 | # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20 | # PERFORMANCE OF THIS SOFTWARE. 21 | # 22 | 23 | # Initialize Autoconf 24 | AC_PREREQ([2.60]) 25 | AC_INIT([egl], [9.3.0], 26 | [http://www.renesas.com/], [egl]) 27 | AC_CONFIG_SRCDIR([Makefile.am]) 28 | AC_CONFIG_HEADERS([config.h]) 29 | 30 | # Initialize Automake 31 | AM_INIT_AUTOMAKE([foreign dist-bzip2]) 32 | #AM_MAINTAINER_MODE 33 | 34 | # Initialize libtool 35 | AC_PROG_LIBTOOL 36 | 37 | # Check for dlopen 38 | AC_SEARCH_LIBS([dlopen], [dl dld], [], 39 | [AC_MSG_FAILURE([Dynamic linking loader missing])]) 40 | 41 | # Obtain compiler/linker options for dependencies 42 | PKG_CHECK_MODULES([LIBGBM], [gbm]) 43 | PKG_CHECK_MODULES([WAYLAND_KMS], [wayland-kms]) 44 | 45 | AC_CONFIG_FILES([Makefile egl.pc glesv2.pc]) 46 | AC_OUTPUT 47 | -------------------------------------------------------------------------------- /egl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Renesas Solutions Corp. 3 | * Copyright (c) 2012 Carsten Munk 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * Takanari Hayama 19 | * 20 | */ 21 | 22 | /* EGL function pointers */ 23 | #define EGL_EGLEXT_PROTOTYPES 24 | #include 25 | #include 26 | 27 | #define IMG_LIBEGL_PATH "libEGL-pvr.so" 28 | 29 | #if defined(DEBUG) 30 | # define EGL_DEBUG(s, x...) { printf(s, ## x); } 31 | #else 32 | # define EGL_DEBUG(s, x...) { } 33 | #endif 34 | 35 | #ifndef EGL_WAYLAND_BUFFER_WL 36 | /* TI headers don't define this */ 37 | #define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ 38 | #endif 39 | 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #include 47 | #include 48 | #include 49 | 50 | #define WANT_WAYLAND 51 | 52 | #ifdef WANT_WAYLAND 53 | #include 54 | #include 55 | #include 56 | #endif 57 | 58 | static EGLint(*_eglGetError) (void); 59 | 60 | static EGLDisplay(*_eglGetDisplay) (EGLNativeDisplayType display_id); 61 | static EGLBoolean(*_eglInitialize) (EGLDisplay dpy, EGLint * major, 62 | EGLint * minor); 63 | static EGLBoolean(*_eglTerminate) (EGLDisplay dpy); 64 | 65 | static const char *(*_eglQueryString) (EGLDisplay dpy, EGLint name); 66 | 67 | static EGLBoolean(*_eglGetConfigs) (EGLDisplay dpy, EGLConfig * configs, 68 | EGLint config_size, EGLint * num_config); 69 | static EGLBoolean(*_eglChooseConfig) (EGLDisplay dpy, 70 | const EGLint * attrib_list, 71 | EGLConfig * configs, 72 | EGLint config_size, EGLint * num_config); 73 | static EGLBoolean(*_eglGetConfigAttrib) (EGLDisplay dpy, 74 | EGLConfig config, 75 | EGLint attribute, EGLint * value); 76 | 77 | static EGLSurface(*_eglCreateWindowSurface) (EGLDisplay dpy, 78 | EGLConfig config, 79 | EGLNativeWindowType win, 80 | const EGLint * attrib_list); 81 | static EGLSurface(*_eglCreatePbufferSurface) (EGLDisplay dpy, 82 | EGLConfig config, 83 | const EGLint * attrib_list); 84 | static EGLSurface(*_eglCreatePixmapSurface) (EGLDisplay dpy, 85 | EGLConfig config, 86 | EGLNativePixmapType pixmap, 87 | const EGLint * attrib_list); 88 | static EGLBoolean(*_eglDestroySurface) (EGLDisplay dpy, EGLSurface surface); 89 | static EGLBoolean(*_eglQuerySurface) (EGLDisplay dpy, EGLSurface surface, 90 | EGLint attribute, EGLint * value); 91 | 92 | static EGLBoolean(*_eglBindAPI) (EGLenum api); 93 | static EGLenum(*_eglQueryAPI) (void); 94 | 95 | static EGLBoolean(*_eglWaitClient) (void); 96 | 97 | static EGLBoolean(*_eglReleaseThread) (void); 98 | 99 | static EGLSurface(*_eglCreatePbufferFromClientBuffer) (EGLDisplay dpy, 100 | EGLenum buftype, 101 | EGLClientBuffer 102 | buffer, 103 | EGLConfig config, 104 | const EGLint * 105 | attrib_list); 106 | 107 | static EGLBoolean(*_eglSurfaceAttrib) (EGLDisplay dpy, 108 | EGLSurface surface, 109 | EGLint attribute, EGLint value); 110 | static EGLBoolean(*_eglBindTexImage) (EGLDisplay dpy, EGLSurface surface, 111 | EGLint buffer); 112 | static EGLBoolean(*_eglReleaseTexImage) (EGLDisplay dpy, 113 | EGLSurface surface, EGLint buffer); 114 | 115 | static EGLBoolean(*_eglSwapInterval) (EGLDisplay dpy, EGLint interval); 116 | 117 | static EGLContext(*_eglCreateContext) (EGLDisplay dpy, EGLConfig config, 118 | EGLContext share_context, 119 | const EGLint * attrib_list); 120 | static EGLBoolean(*_eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); 121 | static EGLBoolean(*_eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, 122 | EGLSurface read, EGLContext ctx); 123 | 124 | static EGLContext(*_eglGetCurrentContext) (void); 125 | static EGLSurface(*_eglGetCurrentSurface) (EGLint readdraw); 126 | static EGLDisplay(*_eglGetCurrentDisplay) (void); 127 | static EGLBoolean(*_eglQueryContext) (EGLDisplay dpy, EGLContext ctx, 128 | EGLint attribute, EGLint * value); 129 | 130 | static EGLBoolean(*_eglWaitGL) (void); 131 | static EGLBoolean(*_eglWaitNative) (EGLint engine); 132 | static EGLBoolean(*_eglSwapBuffers) (EGLDisplay dpy, EGLSurface surface); 133 | static EGLBoolean(*_eglCopyBuffers) (EGLDisplay dpy, EGLSurface surface, 134 | EGLNativePixmapType target); 135 | 136 | static EGLImageKHR(*_eglCreateImageKHR) (EGLDisplay dpy, EGLContext ctx, 137 | EGLenum target, 138 | EGLClientBuffer buffer, 139 | const EGLint * attrib_list); 140 | static EGLBoolean(*_eglDestroyImageKHR) (EGLDisplay dpy, EGLImageKHR image); 141 | 142 | static __eglMustCastToProperFunctionPointerType(*_eglGetProcAddress) (const char *procname); 143 | 144 | static void *_libegl = NULL; 145 | 146 | static void _init_egl() 147 | { 148 | const char *filename = (getenv("LIBEGL")) ? getenv("LIBEGL") : IMG_LIBEGL_PATH; 149 | _libegl = dlopen(filename, RTLD_LAZY); 150 | } 151 | 152 | #define EGL_DLSYM(f) \ 153 | if (!_libegl) _init_egl(); \ 154 | if (!_##f) _##f = dlsym(_libegl, #f); \ 155 | 156 | EGLint eglGetError(void) 157 | { 158 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 159 | EGL_DLSYM(eglGetError); 160 | return _eglGetError(); 161 | } 162 | 163 | #ifdef WANT_WAYLAND 164 | static struct gbm_device *__gbm; 165 | static struct wl_display *__wl_display = NULL; 166 | #endif 167 | 168 | EGLDisplay eglGetDisplay(EGLNativeDisplayType display_id) 169 | { 170 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 171 | EGL_DLSYM(eglGetDisplay); 172 | 173 | #ifdef WANT_WAYLAND 174 | if (display_id) { 175 | void *head = *(void**)display_id; 176 | if (head == gbm_create_device) 177 | __gbm = (struct gbm_device*)display_id; 178 | if (head == &wl_display_interface) 179 | __wl_display = (struct wl_display*)display_id; 180 | } 181 | #endif 182 | 183 | #if 0 184 | { 185 | FILE *fp = fopen("/proc/self/maps", "r"); 186 | char buf[BUFSIZ]; 187 | int count; 188 | while(!feof(fp)) { 189 | count = fread(buf, 1, BUFSIZ, fp); 190 | fwrite(buf, count, 1, stdout); 191 | } 192 | fclose(fp); 193 | 194 | EGL_DEBUG("\n\n%s: %p\n", __func__, _eglGetDisplay); 195 | } 196 | #endif 197 | return _eglGetDisplay(display_id); 198 | } 199 | 200 | EGLBoolean eglInitialize(EGLDisplay dpy, EGLint * major, EGLint * minor) 201 | { 202 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 203 | EGL_DLSYM(eglInitialize); 204 | return _eglInitialize(dpy, major, minor); 205 | } 206 | 207 | EGLBoolean eglTerminate(EGLDisplay dpy) 208 | { 209 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 210 | EGL_DLSYM(eglTerminate); 211 | return _eglTerminate(dpy); 212 | } 213 | 214 | #define EGL_WL_EXT_STRING "EGL_WL_bind_wayland_display " 215 | 216 | const char *eglQueryString(EGLDisplay dpy, EGLint name) 217 | { 218 | static char *_eglextstr = NULL; 219 | const char *ret; 220 | 221 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 222 | EGL_DLSYM(eglQueryString); 223 | ret = _eglQueryString(dpy, name); 224 | 225 | #ifdef WANT_WAYLAND 226 | if (ret && name == EGL_EXTENSIONS) { 227 | 228 | if (!_eglextstr) { 229 | _eglextstr = calloc(1, strlen(ret) + strlen(EGL_WL_EXT_STRING) + 1); 230 | if (_eglextstr) { 231 | strcat(_eglextstr, ret); 232 | strcat(_eglextstr, EGL_WL_EXT_STRING); 233 | } else { 234 | _eglextstr = (char*)ret; 235 | } 236 | } 237 | 238 | ret = _eglextstr; 239 | } 240 | #endif 241 | return ret; 242 | } 243 | 244 | EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig * configs, 245 | EGLint config_size, EGLint * num_config) 246 | { 247 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 248 | EGL_DLSYM(eglGetConfigs); 249 | return _eglGetConfigs(dpy, configs, config_size, num_config); 250 | } 251 | 252 | EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint * attrib_list, 253 | EGLConfig * configs, EGLint config_size, 254 | EGLint * num_config) 255 | { 256 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 257 | EGL_DLSYM(eglChooseConfig); 258 | return _eglChooseConfig(dpy, attrib_list, 259 | configs, config_size, num_config); 260 | } 261 | 262 | EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, 263 | EGLint attribute, EGLint * value) 264 | { 265 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 266 | EGL_DLSYM(eglGetConfigAttrib); 267 | return _eglGetConfigAttrib(dpy, config, attribute, value); 268 | } 269 | 270 | EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, 271 | EGLNativeWindowType win, 272 | const EGLint * attrib_list) 273 | { 274 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 275 | EGL_DLSYM(eglCreateWindowSurface); 276 | return _eglCreateWindowSurface(dpy, config, win, attrib_list); 277 | } 278 | 279 | EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, 280 | const EGLint * attrib_list) 281 | { 282 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 283 | EGL_DLSYM(eglCreatePbufferSurface); 284 | return _eglCreatePbufferSurface(dpy, config, attrib_list); 285 | } 286 | 287 | EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, 288 | EGLNativePixmapType pixmap, 289 | const EGLint * attrib_list) 290 | { 291 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 292 | EGL_DLSYM(eglCreatePixmapSurface); 293 | return _eglCreatePixmapSurface(dpy, config, pixmap, attrib_list); 294 | } 295 | 296 | EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) 297 | { 298 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 299 | EGL_DLSYM(eglDestroySurface); 300 | return _eglDestroySurface(dpy, surface); 301 | } 302 | 303 | EGLBoolean eglQuerySurface(EGLDisplay dpy, EGLSurface surface, 304 | EGLint attribute, EGLint * value) 305 | { 306 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 307 | EGL_DLSYM(eglQuerySurface); 308 | return _eglQuerySurface(dpy, surface, attribute, value); 309 | } 310 | 311 | EGLBoolean eglBindAPI(EGLenum api) 312 | { 313 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 314 | EGL_DLSYM(eglBindAPI); 315 | return _eglBindAPI(api); 316 | } 317 | 318 | EGLenum eglQueryAPI(void) 319 | { 320 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 321 | EGL_DLSYM(eglQueryAPI); 322 | return _eglQueryAPI(); 323 | } 324 | 325 | EGLBoolean eglWaitClient(void) 326 | { 327 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 328 | EGL_DLSYM(eglWaitClient); 329 | return _eglWaitClient(); 330 | } 331 | 332 | EGLBoolean eglReleaseThread(void) 333 | { 334 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 335 | EGL_DLSYM(eglReleaseThread); 336 | return _eglReleaseThread(); 337 | } 338 | 339 | EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, 340 | EGLClientBuffer buffer, 341 | EGLConfig config, 342 | const EGLint * attrib_list) 343 | { 344 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 345 | EGL_DLSYM(eglCreatePbufferFromClientBuffer); 346 | return _eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, 347 | config, attrib_list); 348 | } 349 | 350 | EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, 351 | EGLint attribute, EGLint value) 352 | { 353 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 354 | EGL_DLSYM(eglSurfaceAttrib); 355 | return _eglSurfaceAttrib(dpy, surface, attribute, value); 356 | } 357 | 358 | EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) 359 | { 360 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 361 | EGL_DLSYM(eglBindTexImage); 362 | return _eglBindTexImage(dpy, surface, buffer); 363 | } 364 | 365 | EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) 366 | { 367 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 368 | EGL_DLSYM(eglReleaseTexImage); 369 | return _eglReleaseTexImage(dpy, surface, buffer); 370 | } 371 | 372 | EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) 373 | { 374 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 375 | EGL_DLSYM(eglSwapInterval); 376 | return _eglSwapInterval(dpy, interval); 377 | } 378 | 379 | EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, 380 | EGLContext share_context, 381 | const EGLint * attrib_list) 382 | { 383 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 384 | EGL_DLSYM(eglCreateContext); 385 | return _eglCreateContext(dpy, config, share_context, attrib_list); 386 | } 387 | 388 | EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) 389 | { 390 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 391 | EGL_DLSYM(eglDestroyContext); 392 | return _eglDestroyContext(dpy, ctx); 393 | } 394 | 395 | EGLBoolean eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, 396 | EGLSurface read, EGLContext ctx) 397 | { 398 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 399 | EGL_DLSYM(eglMakeCurrent); 400 | return _eglMakeCurrent(dpy, draw, read, ctx); 401 | } 402 | 403 | EGLContext eglGetCurrentContext(void) 404 | { 405 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 406 | EGL_DLSYM(eglGetCurrentContext); 407 | return _eglGetCurrentContext(); 408 | } 409 | 410 | EGLSurface eglGetCurrentSurface(EGLint readdraw) 411 | { 412 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 413 | EGL_DLSYM(eglGetCurrentSurface); 414 | return _eglGetCurrentSurface(readdraw); 415 | } 416 | 417 | EGLDisplay eglGetCurrentDisplay(void) 418 | { 419 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 420 | EGL_DLSYM(eglGetCurrentDisplay); 421 | return _eglGetCurrentDisplay(); 422 | } 423 | 424 | EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx, 425 | EGLint attribute, EGLint * value) 426 | { 427 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 428 | EGL_DLSYM(eglQueryContext); 429 | return _eglQueryContext(dpy, ctx, attribute, value); 430 | } 431 | 432 | EGLBoolean eglWaitGL(void) 433 | { 434 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 435 | EGL_DLSYM(eglWaitGL); 436 | return _eglWaitGL(); 437 | } 438 | 439 | EGLBoolean eglWaitNative(EGLint engine) 440 | { 441 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 442 | EGL_DLSYM(eglWaitNative); 443 | return _eglWaitNative(engine); 444 | } 445 | 446 | EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) 447 | { 448 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 449 | EGL_DLSYM(eglSwapBuffers); 450 | return _eglSwapBuffers(dpy, surface); 451 | } 452 | 453 | EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, 454 | EGLNativePixmapType target) 455 | { 456 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 457 | EGL_DLSYM(eglCopyBuffers); 458 | return _eglCopyBuffers(dpy, surface, target); 459 | } 460 | 461 | static EGLImageKHR __eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, 462 | EGLenum target, EGLClientBuffer buffer, 463 | const EGLint * attrib_list) 464 | { 465 | const EGLint *_attrib_list; 466 | 467 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 468 | if (!_eglCreateImageKHR) { 469 | /* we can't EGL_DLSYM this, because it doesn't exist in libEGL. 470 | * IMG's libEGL. we also can't ask ourselves for the location of 471 | * eglGetProcAddress, otherwise we'll end up calling ourselves again, so 472 | * we must look up eglGetProcAddress first and ask SGX 473 | */ 474 | EGL_DLSYM(eglGetProcAddress); 475 | _eglCreateImageKHR = (void*)_eglGetProcAddress("eglCreateImageKHR"); 476 | } 477 | 478 | /* 479 | * We consider EGL_WAYLAND_BUFFER_WL to be EGL_ANTIVE_PIXMAP_KHR. 480 | * This way IMG EGL will pass the request to underlying WSEGL. 481 | */ 482 | if (target == EGL_WAYLAND_BUFFER_WL) { 483 | EGL_DEBUG("%s: %s: mapping EGL_WAYLAND_BUFFER_WL to EGL_NATIVE_PIXMAP_KHR\n", __FILE__, __func__); 484 | target = EGL_NATIVE_PIXMAP_KHR; 485 | _attrib_list = NULL; 486 | } else { 487 | _attrib_list = attrib_list; 488 | } 489 | 490 | #if 0 491 | { 492 | int count = 0; 493 | EGLint *_attr, *_attr2, *head; 494 | 495 | _attr = attrib_list; 496 | while (*_attr != EGL_NONE) { 497 | count += 2; 498 | _attr++; _attr++; 499 | } 500 | count++; 501 | EGL_DEBUG("%s: %s: count=%d\n", __FILE__, __func__, count); 502 | head = _attr2 = alloca(sizeof(EGLint) * count); 503 | 504 | _attr = attrib_list; 505 | while (*_attr != EGL_NONE) { 506 | if (*_attr != EGL_WAYLAND_PLANE_WL) { 507 | EGL_DEBUG("%s: %s: copying %x\n", __FILE__, __func__, *_attr); 508 | *_attr2 = *_attr; 509 | _attr2++; _attr++; 510 | 511 | *_attr2 = *_attr; 512 | _attr2++; _attr++; 513 | } else { 514 | EGL_DEBUG("%s: %s: skipping %x\n", __FILE__, __func__, *_attr); 515 | _attr++; _attr++; 516 | } 517 | } 518 | *_attr2 = - EGL_NONE; 519 | attrib_list = head; 520 | } 521 | #endif 522 | 523 | EGL_DEBUG("%s: %s (target=%d, EGL_WAYLAND_BUFFER_WL=%d, EGL_NATIVE_PIXMAP_KHR=%d) : %p\n", __FILE__, __func__, target, EGL_WAYLAND_BUFFER_WL, EGL_NATIVE_PIXMAP_KHR, _eglCreateImageKHR); 524 | return _eglCreateImageKHR(dpy, ctx, target, buffer, _attrib_list); 525 | } 526 | 527 | #ifdef WANT_WAYLAND 528 | static struct wl_kms *__wl_kms = NULL; 529 | 530 | static EGLBoolean __eglBindWaylandDisplayWL(EGLDisplay dpy, 531 | struct wl_display *display) 532 | { 533 | char *device_name = "/dev/dri/card0"; 534 | int fd = -1; 535 | 536 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 537 | // TODO: create server side for wl_kms. 538 | if (__wl_kms) 539 | return EGL_FALSE; 540 | 541 | if (__gbm) { 542 | fd = gbm_device_get_fd(__gbm); 543 | device_name = _gbm_fd_get_device_name(fd); 544 | } else { 545 | fd = open(device_name, O_RDWR); 546 | if (fd < 0) 547 | return EGL_FALSE; 548 | __gbm = gbm_create_device(fd); 549 | } 550 | EGL_DEBUG("%s: decice_name=%s\n", __func__, device_name); 551 | 552 | __wl_kms = wayland_kms_init(display, __wl_display, device_name, fd); 553 | return EGL_TRUE; 554 | } 555 | 556 | static EGLBoolean __eglUnbindWaylandDisplayWL(EGLDisplay dpy, 557 | struct wl_display *display) 558 | { 559 | // TODO: destroy wl_kms? 560 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 561 | if (__wl_kms) 562 | wayland_kms_uninit(__wl_kms); 563 | 564 | return EGL_TRUE; 565 | } 566 | 567 | static EGLBoolean __eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, 568 | EGLint attribute, EGLint * value) 569 | { 570 | int ret, val; 571 | enum wl_kms_attribute attr; 572 | EGLBoolean result = EGL_FALSE; 573 | 574 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 575 | switch (attribute) { 576 | case EGL_TEXTURE_FORMAT: 577 | attr = WL_KMS_TEXTURE_FORMAT; 578 | break; 579 | case EGL_WIDTH: 580 | attr = WL_KMS_WIDTH; 581 | break; 582 | case EGL_HEIGHT: 583 | attr = WL_KMS_HEIGHT; 584 | break; 585 | default: 586 | return EGL_FALSE; 587 | } 588 | 589 | ret = wayland_kms_query_buffer(__wl_kms, buffer, attr, &val); 590 | if (!ret) { 591 | *value = (EGLint)val; 592 | result = EGL_TRUE; 593 | } 594 | 595 | return result; 596 | } 597 | #endif 598 | 599 | __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) 600 | { 601 | EGL_DLSYM(eglGetProcAddress); 602 | 603 | EGL_DEBUG("%s: %s(%s)\n", __FILE__, __func__, procname); 604 | if (strcmp(procname, "eglCreateImageKHR") == 0) { 605 | return (__eglMustCastToProperFunctionPointerType)__eglCreateImageKHR; 606 | } 607 | #ifdef WANT_WAYLAND 608 | else if (strcmp(procname, "eglBindWaylandDisplayWL") == 0) { 609 | return (__eglMustCastToProperFunctionPointerType)__eglBindWaylandDisplayWL; 610 | } else if (strcmp(procname, "eglUnbindWaylandDisplayWL") == 0) { 611 | return (__eglMustCastToProperFunctionPointerType)__eglUnbindWaylandDisplayWL; 612 | } else if (strcmp(procname, "eglQueryWaylandBufferWL") == 0) { 613 | return (__eglMustCastToProperFunctionPointerType)__eglQueryWaylandBufferWL; 614 | } 615 | #endif 616 | return _eglGetProcAddress(procname); 617 | } 618 | 619 | EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) 620 | { 621 | EGL_DEBUG("%s: %s\n", __FILE__, __func__); 622 | EGL_DLSYM(eglDestroyImageKHR); 623 | return _eglDestroyImageKHR(dpy, image); 624 | } 625 | -------------------------------------------------------------------------------- /egl.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: egl 7 | Description: EGL library with Wayland Extension 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lEGL 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /glesv2.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: glesv2 7 | Description: OpenGL/ES 2.0 Library 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lGLESv2 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /include/EGL/egl.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: c; tab-width: 8; -*- */ 2 | /* vi: set sw=4 ts=8: */ 3 | /* Reference version of egl.h for EGL 1.4. 4 | * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ 5 | */ 6 | 7 | /* 8 | ** Copyright (c) 2007-2009 The Khronos Group Inc. 9 | ** 10 | ** Permission is hereby granted, free of charge, to any person obtaining a 11 | ** copy of this software and/or associated documentation files (the 12 | ** "Materials"), to deal in the Materials without restriction, including 13 | ** without limitation the rights to use, copy, modify, merge, publish, 14 | ** distribute, sublicense, and/or sell copies of the Materials, and to 15 | ** permit persons to whom the Materials are furnished to do so, subject to 16 | ** the following conditions: 17 | ** 18 | ** The above copyright notice and this permission notice shall be included 19 | ** in all copies or substantial portions of the Materials. 20 | ** 21 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 24 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 25 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 28 | */ 29 | 30 | #ifndef __egl_h_ 31 | #define __egl_h_ 32 | 33 | /* All platform-dependent types and macro boilerplate (such as EGLAPI 34 | * and EGLAPIENTRY) should go in eglplatform.h. 35 | */ 36 | #include 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | /* EGL Types */ 43 | /* EGLint is defined in eglplatform.h */ 44 | typedef unsigned int EGLBoolean; 45 | typedef unsigned int EGLenum; 46 | typedef void *EGLConfig; 47 | typedef void *EGLContext; 48 | typedef void *EGLDisplay; 49 | typedef void *EGLSurface; 50 | typedef void *EGLClientBuffer; 51 | 52 | /* EGL Versioning */ 53 | #define EGL_VERSION_1_0 1 54 | #define EGL_VERSION_1_1 1 55 | #define EGL_VERSION_1_2 1 56 | #define EGL_VERSION_1_3 1 57 | #define EGL_VERSION_1_4 1 58 | 59 | /* EGL Enumerants. Bitmasks and other exceptional cases aside, most 60 | * enums are assigned unique values starting at 0x3000. 61 | */ 62 | 63 | /* EGL aliases */ 64 | #define EGL_FALSE 0 65 | #define EGL_TRUE 1 66 | 67 | /* Out-of-band handle values */ 68 | #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) 69 | #define EGL_NO_CONTEXT ((EGLContext)0) 70 | #define EGL_NO_DISPLAY ((EGLDisplay)0) 71 | #define EGL_NO_SURFACE ((EGLSurface)0) 72 | 73 | /* Out-of-band attribute value */ 74 | #define EGL_DONT_CARE ((EGLint)-1) 75 | 76 | /* Errors / GetError return values */ 77 | #define EGL_SUCCESS 0x3000 78 | #define EGL_NOT_INITIALIZED 0x3001 79 | #define EGL_BAD_ACCESS 0x3002 80 | #define EGL_BAD_ALLOC 0x3003 81 | #define EGL_BAD_ATTRIBUTE 0x3004 82 | #define EGL_BAD_CONFIG 0x3005 83 | #define EGL_BAD_CONTEXT 0x3006 84 | #define EGL_BAD_CURRENT_SURFACE 0x3007 85 | #define EGL_BAD_DISPLAY 0x3008 86 | #define EGL_BAD_MATCH 0x3009 87 | #define EGL_BAD_NATIVE_PIXMAP 0x300A 88 | #define EGL_BAD_NATIVE_WINDOW 0x300B 89 | #define EGL_BAD_PARAMETER 0x300C 90 | #define EGL_BAD_SURFACE 0x300D 91 | #define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ 92 | 93 | /* Reserved 0x300F-0x301F for additional errors */ 94 | 95 | /* Config attributes */ 96 | #define EGL_BUFFER_SIZE 0x3020 97 | #define EGL_ALPHA_SIZE 0x3021 98 | #define EGL_BLUE_SIZE 0x3022 99 | #define EGL_GREEN_SIZE 0x3023 100 | #define EGL_RED_SIZE 0x3024 101 | #define EGL_DEPTH_SIZE 0x3025 102 | #define EGL_STENCIL_SIZE 0x3026 103 | #define EGL_CONFIG_CAVEAT 0x3027 104 | #define EGL_CONFIG_ID 0x3028 105 | #define EGL_LEVEL 0x3029 106 | #define EGL_MAX_PBUFFER_HEIGHT 0x302A 107 | #define EGL_MAX_PBUFFER_PIXELS 0x302B 108 | #define EGL_MAX_PBUFFER_WIDTH 0x302C 109 | #define EGL_NATIVE_RENDERABLE 0x302D 110 | #define EGL_NATIVE_VISUAL_ID 0x302E 111 | #define EGL_NATIVE_VISUAL_TYPE 0x302F 112 | #define EGL_SAMPLES 0x3031 113 | #define EGL_SAMPLE_BUFFERS 0x3032 114 | #define EGL_SURFACE_TYPE 0x3033 115 | #define EGL_TRANSPARENT_TYPE 0x3034 116 | #define EGL_TRANSPARENT_BLUE_VALUE 0x3035 117 | #define EGL_TRANSPARENT_GREEN_VALUE 0x3036 118 | #define EGL_TRANSPARENT_RED_VALUE 0x3037 119 | #define EGL_NONE 0x3038 /* Attrib list terminator */ 120 | #define EGL_BIND_TO_TEXTURE_RGB 0x3039 121 | #define EGL_BIND_TO_TEXTURE_RGBA 0x303A 122 | #define EGL_MIN_SWAP_INTERVAL 0x303B 123 | #define EGL_MAX_SWAP_INTERVAL 0x303C 124 | #define EGL_LUMINANCE_SIZE 0x303D 125 | #define EGL_ALPHA_MASK_SIZE 0x303E 126 | #define EGL_COLOR_BUFFER_TYPE 0x303F 127 | #define EGL_RENDERABLE_TYPE 0x3040 128 | #define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ 129 | #define EGL_CONFORMANT 0x3042 130 | 131 | /* Reserved 0x3041-0x304F for additional config attributes */ 132 | 133 | /* Config attribute values */ 134 | #define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ 135 | #define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ 136 | #define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ 137 | #define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ 138 | #define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ 139 | 140 | /* More config attribute values, for EGL_TEXTURE_FORMAT */ 141 | #define EGL_NO_TEXTURE 0x305C 142 | #define EGL_TEXTURE_RGB 0x305D 143 | #define EGL_TEXTURE_RGBA 0x305E 144 | #define EGL_TEXTURE_2D 0x305F 145 | 146 | /* Config attribute mask bits */ 147 | #define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ 148 | #define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ 149 | #define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ 150 | #define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ 151 | #define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ 152 | #define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */ 153 | #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */ 154 | 155 | #define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ 156 | #define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ 157 | #define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ 158 | #define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ 159 | 160 | /* QueryString targets */ 161 | #define EGL_VENDOR 0x3053 162 | #define EGL_VERSION 0x3054 163 | #define EGL_EXTENSIONS 0x3055 164 | #define EGL_CLIENT_APIS 0x308D 165 | 166 | /* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */ 167 | #define EGL_HEIGHT 0x3056 168 | #define EGL_WIDTH 0x3057 169 | #define EGL_LARGEST_PBUFFER 0x3058 170 | #define EGL_TEXTURE_FORMAT 0x3080 171 | #define EGL_TEXTURE_TARGET 0x3081 172 | #define EGL_MIPMAP_TEXTURE 0x3082 173 | #define EGL_MIPMAP_LEVEL 0x3083 174 | #define EGL_RENDER_BUFFER 0x3086 175 | #define EGL_VG_COLORSPACE 0x3087 176 | #define EGL_VG_ALPHA_FORMAT 0x3088 177 | #define EGL_HORIZONTAL_RESOLUTION 0x3090 178 | #define EGL_VERTICAL_RESOLUTION 0x3091 179 | #define EGL_PIXEL_ASPECT_RATIO 0x3092 180 | #define EGL_SWAP_BEHAVIOR 0x3093 181 | #define EGL_MULTISAMPLE_RESOLVE 0x3099 182 | 183 | /* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ 184 | #define EGL_BACK_BUFFER 0x3084 185 | #define EGL_SINGLE_BUFFER 0x3085 186 | 187 | /* OpenVG color spaces */ 188 | #define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ 189 | #define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ 190 | 191 | /* OpenVG alpha formats */ 192 | #define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */ 193 | #define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */ 194 | 195 | /* Constant scale factor by which fractional display resolutions & 196 | * aspect ratio are scaled when queried as integer values. 197 | */ 198 | #define EGL_DISPLAY_SCALING 10000 199 | 200 | /* Unknown display resolution/aspect ratio */ 201 | #define EGL_UNKNOWN ((EGLint)-1) 202 | 203 | /* Back buffer swap behaviors */ 204 | #define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ 205 | #define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ 206 | 207 | /* CreatePbufferFromClientBuffer buffer types */ 208 | #define EGL_OPENVG_IMAGE 0x3096 209 | 210 | /* QueryContext targets */ 211 | #define EGL_CONTEXT_CLIENT_TYPE 0x3097 212 | 213 | /* CreateContext attributes */ 214 | #define EGL_CONTEXT_CLIENT_VERSION 0x3098 215 | 216 | /* Multisample resolution behaviors */ 217 | #define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */ 218 | #define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */ 219 | 220 | /* BindAPI/QueryAPI targets */ 221 | #define EGL_OPENGL_ES_API 0x30A0 222 | #define EGL_OPENVG_API 0x30A1 223 | #define EGL_OPENGL_API 0x30A2 224 | 225 | /* GetCurrentSurface targets */ 226 | #define EGL_DRAW 0x3059 227 | #define EGL_READ 0x305A 228 | 229 | /* WaitNative engines */ 230 | #define EGL_CORE_NATIVE_ENGINE 0x305B 231 | 232 | /* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ 233 | #define EGL_COLORSPACE EGL_VG_COLORSPACE 234 | #define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT 235 | #define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB 236 | #define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR 237 | #define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE 238 | #define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE 239 | 240 | /* EGL extensions must request enum blocks from the Khronos 241 | * API Registrar, who maintains the enumerant registry. Submit 242 | * a bug in Khronos Bugzilla against task "Registry". 243 | */ 244 | 245 | 246 | 247 | /* EGL Functions */ 248 | 249 | EGLAPI EGLint EGLAPIENTRY eglGetError(void); 250 | 251 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); 252 | EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); 253 | EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); 254 | 255 | EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); 256 | 257 | EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, 258 | EGLint config_size, EGLint *num_config); 259 | EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, 260 | EGLConfig *configs, EGLint config_size, 261 | EGLint *num_config); 262 | EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, 263 | EGLint attribute, EGLint *value); 264 | 265 | EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, 266 | EGLNativeWindowType win, 267 | const EGLint *attrib_list); 268 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, 269 | const EGLint *attrib_list); 270 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, 271 | EGLNativePixmapType pixmap, 272 | const EGLint *attrib_list); 273 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface); 274 | EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, 275 | EGLint attribute, EGLint *value); 276 | 277 | EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); 278 | EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); 279 | 280 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); 281 | 282 | EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); 283 | 284 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer( 285 | EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, 286 | EGLConfig config, const EGLint *attrib_list); 287 | 288 | EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, 289 | EGLint attribute, EGLint value); 290 | EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); 291 | EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); 292 | 293 | 294 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); 295 | 296 | 297 | EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, 298 | EGLContext share_context, 299 | const EGLint *attrib_list); 300 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); 301 | EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, 302 | EGLSurface read, EGLContext ctx); 303 | 304 | EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); 305 | EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); 306 | EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); 307 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, 308 | EGLint attribute, EGLint *value); 309 | 310 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); 311 | EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); 312 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); 313 | EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, 314 | EGLNativePixmapType target); 315 | 316 | /* This is a generic function pointer type, whose name indicates it must 317 | * be cast to the proper type *and calling convention* before use. 318 | */ 319 | typedef void (*__eglMustCastToProperFunctionPointerType)(void); 320 | 321 | /* Now, define eglGetProcAddress using the generic function ptr. type */ 322 | EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY 323 | eglGetProcAddress(const char *procname); 324 | 325 | #ifdef __cplusplus 326 | } 327 | #endif 328 | 329 | #endif /* __egl_h_ */ 330 | -------------------------------------------------------------------------------- /include/EGL/eglext.h: -------------------------------------------------------------------------------- 1 | #ifndef __eglext_h_ 2 | #define __eglext_h_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | /* 9 | ** Copyright (c) 2007-2013 The Khronos Group Inc. 10 | ** 11 | ** Permission is hereby granted, free of charge, to any person obtaining a 12 | ** copy of this software and/or associated documentation files (the 13 | ** "Materials"), to deal in the Materials without restriction, including 14 | ** without limitation the rights to use, copy, modify, merge, publish, 15 | ** distribute, sublicense, and/or sell copies of the Materials, and to 16 | ** permit persons to whom the Materials are furnished to do so, subject to 17 | ** the following conditions: 18 | ** 19 | ** The above copyright notice and this permission notice shall be included 20 | ** in all copies or substantial portions of the Materials. 21 | ** 22 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 25 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 26 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 27 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 28 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 29 | */ 30 | 31 | #include 32 | 33 | /*************************************************************/ 34 | 35 | /* Header file version number */ 36 | /* Current version at http://www.khronos.org/registry/egl/ */ 37 | /* $Revision: 21254 $ on $Date: 2013-04-25 03:11:55 -0700 (Thu, 25 Apr 2013) $ */ 38 | #define EGL_EGLEXT_VERSION 16 39 | 40 | #ifndef EGL_KHR_config_attribs 41 | #define EGL_KHR_config_attribs 1 42 | #define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ 43 | #define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ 44 | #define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ 45 | #endif 46 | 47 | #ifndef EGL_KHR_lock_surface 48 | #define EGL_KHR_lock_surface 1 49 | #define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ 50 | #define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ 51 | #define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ 52 | #define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ 53 | #define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ 54 | #define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ 55 | #define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ 56 | #define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ 57 | #define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ 58 | #define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ 59 | #define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ 60 | #define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ 61 | #define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ 62 | #define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ 63 | #define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ 64 | #define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ 65 | #define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ 66 | #define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ 67 | #define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ 68 | #define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ 69 | #define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ 70 | #ifdef EGL_EGLEXT_PROTOTYPES 71 | EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); 72 | EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); 73 | #endif /* EGL_EGLEXT_PROTOTYPES */ 74 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); 75 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); 76 | #endif 77 | 78 | #ifndef EGL_KHR_image 79 | #define EGL_KHR_image 1 80 | #define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ 81 | typedef void *EGLImageKHR; 82 | #define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) 83 | #ifdef EGL_EGLEXT_PROTOTYPES 84 | EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); 85 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); 86 | #endif /* EGL_EGLEXT_PROTOTYPES */ 87 | typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); 88 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); 89 | #endif 90 | 91 | #ifndef EGL_KHR_vg_parent_image 92 | #define EGL_KHR_vg_parent_image 1 93 | #define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ 94 | #endif 95 | 96 | #ifndef EGL_KHR_gl_texture_2D_image 97 | #define EGL_KHR_gl_texture_2D_image 1 98 | #define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ 99 | #define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ 100 | #endif 101 | 102 | #ifndef EGL_KHR_gl_texture_cubemap_image 103 | #define EGL_KHR_gl_texture_cubemap_image 1 104 | #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ 105 | #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ 106 | #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ 107 | #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ 108 | #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ 109 | #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ 110 | #endif 111 | 112 | #ifndef EGL_KHR_gl_texture_3D_image 113 | #define EGL_KHR_gl_texture_3D_image 1 114 | #define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ 115 | #define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ 116 | #endif 117 | 118 | #ifndef EGL_KHR_gl_renderbuffer_image 119 | #define EGL_KHR_gl_renderbuffer_image 1 120 | #define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ 121 | #endif 122 | 123 | #if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */ 124 | #ifndef EGL_KHR_reusable_sync 125 | #define EGL_KHR_reusable_sync 1 126 | 127 | typedef void* EGLSyncKHR; 128 | typedef khronos_utime_nanoseconds_t EGLTimeKHR; 129 | 130 | #define EGL_SYNC_STATUS_KHR 0x30F1 131 | #define EGL_SIGNALED_KHR 0x30F2 132 | #define EGL_UNSIGNALED_KHR 0x30F3 133 | #define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 134 | #define EGL_CONDITION_SATISFIED_KHR 0x30F6 135 | #define EGL_SYNC_TYPE_KHR 0x30F7 136 | #define EGL_SYNC_REUSABLE_KHR 0x30FA 137 | #define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ 138 | #define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull 139 | #define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) 140 | #ifdef EGL_EGLEXT_PROTOTYPES 141 | EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); 142 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); 143 | EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); 144 | EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); 145 | EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); 146 | #endif /* EGL_EGLEXT_PROTOTYPES */ 147 | typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); 148 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); 149 | typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); 150 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); 151 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); 152 | #endif 153 | #endif 154 | 155 | #ifndef EGL_KHR_image_base 156 | #define EGL_KHR_image_base 1 157 | /* Most interfaces defined by EGL_KHR_image_pixmap above */ 158 | #define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ 159 | #endif 160 | 161 | #ifndef EGL_KHR_image_pixmap 162 | #define EGL_KHR_image_pixmap 1 163 | /* Interfaces defined by EGL_KHR_image above */ 164 | #endif 165 | 166 | #ifndef EGL_IMG_context_priority 167 | #define EGL_IMG_context_priority 1 168 | #define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 169 | #define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 170 | #define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 171 | #define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 172 | #endif 173 | 174 | #ifndef EGL_KHR_lock_surface2 175 | #define EGL_KHR_lock_surface2 1 176 | #define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 177 | #endif 178 | 179 | #ifndef EGL_NV_coverage_sample 180 | #define EGL_NV_coverage_sample 1 181 | #define EGL_COVERAGE_BUFFERS_NV 0x30E0 182 | #define EGL_COVERAGE_SAMPLES_NV 0x30E1 183 | #endif 184 | 185 | #ifndef EGL_NV_depth_nonlinear 186 | #define EGL_NV_depth_nonlinear 1 187 | #define EGL_DEPTH_ENCODING_NV 0x30E2 188 | #define EGL_DEPTH_ENCODING_NONE_NV 0 189 | #define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 190 | #endif 191 | 192 | #if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */ 193 | #ifndef EGL_NV_sync 194 | #define EGL_NV_sync 1 195 | #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 196 | #define EGL_SYNC_STATUS_NV 0x30E7 197 | #define EGL_SIGNALED_NV 0x30E8 198 | #define EGL_UNSIGNALED_NV 0x30E9 199 | #define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 200 | #define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull 201 | #define EGL_ALREADY_SIGNALED_NV 0x30EA 202 | #define EGL_TIMEOUT_EXPIRED_NV 0x30EB 203 | #define EGL_CONDITION_SATISFIED_NV 0x30EC 204 | #define EGL_SYNC_TYPE_NV 0x30ED 205 | #define EGL_SYNC_CONDITION_NV 0x30EE 206 | #define EGL_SYNC_FENCE_NV 0x30EF 207 | #define EGL_NO_SYNC_NV ((EGLSyncNV)0) 208 | typedef void* EGLSyncNV; 209 | typedef khronos_utime_nanoseconds_t EGLTimeNV; 210 | #ifdef EGL_EGLEXT_PROTOTYPES 211 | EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); 212 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); 213 | EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); 214 | EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); 215 | EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); 216 | EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); 217 | #endif /* EGL_EGLEXT_PROTOTYPES */ 218 | typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); 219 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); 220 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); 221 | typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); 222 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); 223 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); 224 | #endif 225 | #endif 226 | 227 | #if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */ 228 | #ifndef EGL_KHR_fence_sync 229 | #define EGL_KHR_fence_sync 1 230 | /* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ 231 | #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 232 | #define EGL_SYNC_CONDITION_KHR 0x30F8 233 | #define EGL_SYNC_FENCE_KHR 0x30F9 234 | #endif 235 | #endif 236 | 237 | #ifndef EGL_HI_clientpixmap 238 | #define EGL_HI_clientpixmap 1 239 | 240 | /* Surface Attribute */ 241 | #define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 242 | /* 243 | * Structure representing a client pixmap 244 | * (pixmap's data is in client-space memory). 245 | */ 246 | struct EGLClientPixmapHI 247 | { 248 | void* pData; 249 | EGLint iWidth; 250 | EGLint iHeight; 251 | EGLint iStride; 252 | }; 253 | #ifdef EGL_EGLEXT_PROTOTYPES 254 | EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); 255 | #endif /* EGL_EGLEXT_PROTOTYPES */ 256 | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); 257 | #endif /* EGL_HI_clientpixmap */ 258 | 259 | #ifndef EGL_HI_colorformats 260 | #define EGL_HI_colorformats 1 261 | /* Config Attribute */ 262 | #define EGL_COLOR_FORMAT_HI 0x8F70 263 | /* Color Formats */ 264 | #define EGL_COLOR_RGB_HI 0x8F71 265 | #define EGL_COLOR_RGBA_HI 0x8F72 266 | #define EGL_COLOR_ARGB_HI 0x8F73 267 | #endif /* EGL_HI_colorformats */ 268 | 269 | #ifndef EGL_MESA_drm_image 270 | #define EGL_MESA_drm_image 1 271 | #define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */ 272 | #define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */ 273 | #define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */ 274 | #define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */ 275 | #define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 276 | #define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */ 277 | #define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */ 278 | #ifdef EGL_EGLEXT_PROTOTYPES 279 | EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); 280 | EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); 281 | #endif /* EGL_EGLEXT_PROTOTYPES */ 282 | typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); 283 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); 284 | #endif 285 | 286 | #ifndef EGL_NV_post_sub_buffer 287 | #define EGL_NV_post_sub_buffer 1 288 | #define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE 289 | #ifdef EGL_EGLEXT_PROTOTYPES 290 | EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); 291 | #endif /* EGL_EGLEXT_PROTOTYPES */ 292 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); 293 | #endif 294 | 295 | #ifndef EGL_ANGLE_query_surface_pointer 296 | #define EGL_ANGLE_query_surface_pointer 1 297 | #ifdef EGL_EGLEXT_PROTOTYPES 298 | EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); 299 | #endif 300 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); 301 | #endif 302 | 303 | #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle 304 | #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 305 | #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 306 | #endif 307 | 308 | #ifndef EGL_NV_coverage_sample_resolve 309 | #define EGL_NV_coverage_sample_resolve 1 310 | #define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 311 | #define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 312 | #define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 313 | #endif 314 | 315 | #if KHRONOS_SUPPORT_INT64 /* EGLuint64NV requires 64-bit uint support */ 316 | #ifndef EGL_NV_system_time 317 | #define EGL_NV_system_time 1 318 | typedef khronos_utime_nanoseconds_t EGLuint64NV; 319 | #ifdef EGL_EGLEXT_PROTOTYPES 320 | EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void); 321 | EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void); 322 | #endif /* EGL_EGLEXT_PROTOTYPES */ 323 | typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); 324 | typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); 325 | #endif 326 | #endif 327 | 328 | #if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */ 329 | #ifndef EGL_KHR_stream 330 | #define EGL_KHR_stream 1 331 | typedef void* EGLStreamKHR; 332 | typedef khronos_uint64_t EGLuint64KHR; 333 | #define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) 334 | #define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 335 | #define EGL_PRODUCER_FRAME_KHR 0x3212 336 | #define EGL_CONSUMER_FRAME_KHR 0x3213 337 | #define EGL_STREAM_STATE_KHR 0x3214 338 | #define EGL_STREAM_STATE_CREATED_KHR 0x3215 339 | #define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 340 | #define EGL_STREAM_STATE_EMPTY_KHR 0x3217 341 | #define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 342 | #define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 343 | #define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A 344 | #define EGL_BAD_STREAM_KHR 0x321B 345 | #define EGL_BAD_STATE_KHR 0x321C 346 | #ifdef EGL_EGLEXT_PROTOTYPES 347 | EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list); 348 | EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream); 349 | EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); 350 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); 351 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); 352 | #endif /* EGL_EGLEXT_PROTOTYPES */ 353 | typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list); 354 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); 355 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); 356 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); 357 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); 358 | #endif 359 | #endif 360 | 361 | #ifdef EGL_KHR_stream /* Requires KHR_stream extension */ 362 | #ifndef EGL_KHR_stream_consumer_gltexture 363 | #define EGL_KHR_stream_consumer_gltexture 1 364 | #define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E 365 | #ifdef EGL_EGLEXT_PROTOTYPES 366 | EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream); 367 | EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream); 368 | EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream); 369 | #endif /* EGL_EGLEXT_PROTOTYPES */ 370 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); 371 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); 372 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); 373 | #endif 374 | #endif 375 | 376 | #ifdef EGL_KHR_stream /* Requires KHR_stream extension */ 377 | #ifndef EGL_KHR_stream_producer_eglsurface 378 | #define EGL_KHR_stream_producer_eglsurface 1 379 | #define EGL_STREAM_BIT_KHR 0x0800 380 | #ifdef EGL_EGLEXT_PROTOTYPES 381 | EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); 382 | #endif /* EGL_EGLEXT_PROTOTYPES */ 383 | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); 384 | #endif 385 | #endif 386 | 387 | #ifdef EGL_KHR_stream /* Requires KHR_stream extension */ 388 | #ifndef EGL_KHR_stream_producer_aldatalocator 389 | #define EGL_KHR_stream_producer_aldatalocator 1 390 | #endif 391 | #endif 392 | 393 | #ifdef EGL_KHR_stream /* Requires KHR_stream extension */ 394 | #ifndef EGL_KHR_stream_fifo 395 | #define EGL_KHR_stream_fifo 1 396 | /* reuse EGLTimeKHR */ 397 | #define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC 398 | #define EGL_STREAM_TIME_NOW_KHR 0x31FD 399 | #define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE 400 | #define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF 401 | #ifdef EGL_EGLEXT_PROTOTYPES 402 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); 403 | #endif /* EGL_EGLEXT_PROTOTYPES */ 404 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); 405 | #endif 406 | #endif 407 | 408 | #ifndef EGL_EXT_create_context_robustness 409 | #define EGL_EXT_create_context_robustness 1 410 | #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF 411 | #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 412 | #define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE 413 | #define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF 414 | #endif 415 | 416 | #ifndef EGL_ANGLE_d3d_share_handle_client_buffer 417 | #define EGL_ANGLE_d3d_share_handle_client_buffer 1 418 | /* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */ 419 | #endif 420 | 421 | #ifndef EGL_KHR_create_context 422 | #define EGL_KHR_create_context 1 423 | #define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION 424 | #define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB 425 | #define EGL_CONTEXT_FLAGS_KHR 0x30FC 426 | #define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD 427 | #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD 428 | #define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE 429 | #define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF 430 | #define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 431 | #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 432 | #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 433 | #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 434 | #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 435 | #define EGL_OPENGL_ES3_BIT_KHR 0x00000040 436 | #endif 437 | 438 | #ifndef EGL_KHR_surfaceless_context 439 | #define EGL_KHR_surfaceless_context 1 440 | /* No tokens/entry points, just relaxes an error condition */ 441 | #endif 442 | 443 | #ifdef EGL_KHR_stream /* Requires KHR_stream extension */ 444 | #ifndef EGL_KHR_stream_cross_process_fd 445 | #define EGL_KHR_stream_cross_process_fd 1 446 | typedef int EGLNativeFileDescriptorKHR; 447 | #define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) 448 | #ifdef EGL_EGLEXT_PROTOTYPES 449 | EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream); 450 | EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); 451 | #endif /* EGL_EGLEXT_PROTOTYPES */ 452 | typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); 453 | typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); 454 | #endif 455 | #endif 456 | 457 | #ifndef EGL_EXT_multiview_window 458 | #define EGL_EXT_multiview_window 1 459 | #define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 460 | #endif 461 | 462 | #ifndef EGL_KHR_wait_sync 463 | #define EGL_KHR_wait_sync 1 464 | #ifdef EGL_EGLEXT_PROTOTYPES 465 | EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); 466 | #endif /* EGL_EGLEXT_PROTOTYPES */ 467 | typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); 468 | #endif 469 | 470 | #ifndef EGL_NV_post_convert_rounding 471 | #define EGL_NV_post_convert_rounding 1 472 | /* No tokens or entry points, just relaxes behavior of SwapBuffers */ 473 | #endif 474 | 475 | #ifndef EGL_NV_native_query 476 | #define EGL_NV_native_query 1 477 | #ifdef EGL_EGLEXT_PROTOTYPES 478 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV( EGLDisplay dpy, EGLNativeDisplayType* display_id); 479 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV( EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window); 480 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV( EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap); 481 | #endif /* EGL_EGLEXT_PROTOTYPES */ 482 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id); 483 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); 484 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); 485 | #endif 486 | 487 | #ifndef EGL_NV_3dvision_surface 488 | #define EGL_NV_3dvision_surface 1 489 | #define EGL_AUTO_STEREO_NV 0x3136 490 | #endif 491 | 492 | #ifndef EGL_ANDROID_framebuffer_target 493 | #define EGL_ANDROID_framebuffer_target 1 494 | #define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 495 | #endif 496 | 497 | #ifndef EGL_ANDROID_blob_cache 498 | #define EGL_ANDROID_blob_cache 1 499 | typedef khronos_ssize_t EGLsizeiANDROID; 500 | typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); 501 | typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); 502 | #ifdef EGL_EGLEXT_PROTOTYPES 503 | EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); 504 | #endif /* EGL_EGLEXT_PROTOTYPES */ 505 | typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); 506 | #endif 507 | 508 | #ifndef EGL_ANDROID_image_native_buffer 509 | #define EGL_ANDROID_image_native_buffer 1 510 | #define EGL_NATIVE_BUFFER_ANDROID 0x3140 511 | #endif 512 | 513 | #ifndef EGL_ANDROID_native_fence_sync 514 | #define EGL_ANDROID_native_fence_sync 1 515 | #define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 516 | #define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 517 | #define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 518 | #define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 519 | #ifdef EGL_EGLEXT_PROTOTYPES 520 | EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID( EGLDisplay dpy, EGLSyncKHR); 521 | #endif /* EGL_EGLEXT_PROTOTYPES */ 522 | typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR); 523 | #endif 524 | 525 | #ifndef EGL_ANDROID_recordable 526 | #define EGL_ANDROID_recordable 1 527 | #define EGL_RECORDABLE_ANDROID 0x3142 528 | #endif 529 | 530 | #ifndef EGL_EXT_buffer_age 531 | #define EGL_EXT_buffer_age 1 532 | #define EGL_BUFFER_AGE_EXT 0x313D 533 | #endif 534 | 535 | #ifndef EGL_EXT_image_dma_buf_import 536 | #define EGL_EXT_image_dma_buf_import 1 537 | #define EGL_LINUX_DMA_BUF_EXT 0x3270 538 | #define EGL_LINUX_DRM_FOURCC_EXT 0x3271 539 | #define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 540 | #define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 541 | #define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 542 | #define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 543 | #define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 544 | #define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 545 | #define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 546 | #define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 547 | #define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A 548 | #define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B 549 | #define EGL_SAMPLE_RANGE_HINT_EXT 0x327C 550 | #define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D 551 | #define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E 552 | #define EGL_ITU_REC601_EXT 0x327F 553 | #define EGL_ITU_REC709_EXT 0x3280 554 | #define EGL_ITU_REC2020_EXT 0x3281 555 | #define EGL_YUV_FULL_RANGE_EXT 0x3282 556 | #define EGL_YUV_NARROW_RANGE_EXT 0x3283 557 | #define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 558 | #define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 559 | #endif 560 | 561 | #ifndef EGL_ARM_pixmap_multisample_discard 562 | #define EGL_ARM_pixmap_multisample_discard 1 563 | #define EGL_DISCARD_SAMPLES_ARM 0x3286 564 | #endif 565 | 566 | #ifndef EGL_EXT_swap_buffers_with_damage 567 | #define EGL_EXT_swap_buffers_with_damage 1 568 | #ifdef EGL_EGLEXT_PROTOTYPES 569 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT( EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); 570 | #endif /* EGL_EGLEXT_PROTOTYPES */ 571 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); 572 | #endif 573 | 574 | #include 575 | 576 | #ifdef __cplusplus 577 | } 578 | #endif 579 | 580 | #endif /* __eglext_h_ */ 581 | -------------------------------------------------------------------------------- /include/EGL/eglmesaext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. 4 | * All Rights Reserved. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a 7 | * copy of this software and associated documentation files (the 8 | * "Software"), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sub license, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice (including the 15 | * next paragraph) shall be included in all copies or substantial portions 16 | * of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | * DEALINGS IN THE SOFTWARE. 25 | * 26 | **************************************************************************/ 27 | 28 | #ifndef __eglmesaext_h_ 29 | #define __eglmesaext_h_ 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | #include 36 | 37 | /* EGL_MESA_screen extension >>> PRELIMINARY <<< */ 38 | #ifndef EGL_MESA_screen_surface 39 | #define EGL_MESA_screen_surface 1 40 | 41 | #define EGL_BAD_SCREEN_MESA 0x4000 42 | #define EGL_BAD_MODE_MESA 0x4001 43 | #define EGL_SCREEN_COUNT_MESA 0x4002 44 | #define EGL_SCREEN_POSITION_MESA 0x4003 45 | #define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004 46 | #define EGL_MODE_ID_MESA 0x4005 47 | #define EGL_REFRESH_RATE_MESA 0x4006 48 | #define EGL_OPTIMAL_MESA 0x4007 49 | #define EGL_INTERLACED_MESA 0x4008 50 | #define EGL_SCREEN_BIT_MESA 0x08 51 | 52 | typedef khronos_uint32_t EGLScreenMESA; 53 | typedef khronos_uint32_t EGLModeMESA; 54 | 55 | #ifdef EGL_EGLEXT_PROTOTYPES 56 | EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 57 | EGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 58 | EGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); 59 | EGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); 60 | EGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); 61 | EGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); 62 | EGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); 63 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); 64 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); 65 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); 66 | EGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode); 67 | #endif /* EGL_EGLEXT_PROTOTYPES */ 68 | 69 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 70 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); 71 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); 72 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); 73 | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); 74 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); 75 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); 76 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); 77 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); 78 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); 79 | typedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode); 80 | 81 | #endif /* EGL_MESA_screen_surface */ 82 | 83 | #ifndef EGL_MESA_copy_context 84 | #define EGL_MESA_copy_context 1 85 | 86 | #ifdef EGL_EGLEXT_PROTOTYPES 87 | EGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); 88 | #endif /* EGL_EGLEXT_PROTOTYPES */ 89 | 90 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); 91 | 92 | #endif /* EGL_MESA_copy_context */ 93 | 94 | #ifndef EGL_MESA_drm_display 95 | #define EGL_MESA_drm_display 1 96 | 97 | #ifdef EGL_EGLEXT_PROTOTYPES 98 | EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd); 99 | #endif /* EGL_EGLEXT_PROTOTYPES */ 100 | 101 | typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd); 102 | 103 | #endif /* EGL_MESA_drm_display */ 104 | 105 | #ifdef EGL_MESA_drm_image 106 | /* Mesa's extension to EGL_MESA_drm_image... */ 107 | #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA 108 | #define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004 109 | #endif 110 | #endif 111 | 112 | #ifndef EGL_WL_bind_wayland_display 113 | #define EGL_WL_bind_wayland_display 1 114 | 115 | #define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ 116 | #define EGL_WAYLAND_PLANE_WL 0x31D6 /* eglCreateImageKHR target */ 117 | 118 | #define EGL_TEXTURE_Y_U_V_WL 0x31D7 119 | #define EGL_TEXTURE_Y_UV_WL 0x31D8 120 | #define EGL_TEXTURE_Y_XUXV_WL 0x31D9 121 | 122 | struct wl_display; 123 | struct wl_resource; 124 | #ifdef EGL_EGLEXT_PROTOTYPES 125 | EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); 126 | EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); 127 | EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); 128 | #endif 129 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); 130 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); 131 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); 132 | 133 | #endif 134 | 135 | #ifndef EGL_NOK_swap_region 136 | #define EGL_NOK_swap_region 1 137 | 138 | #ifdef EGL_EGLEXT_PROTOTYPES 139 | EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); 140 | #endif 141 | 142 | typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); 143 | #endif 144 | 145 | #ifndef EGL_NOK_texture_from_pixmap 146 | #define EGL_NOK_texture_from_pixmap 1 147 | 148 | #define EGL_Y_INVERTED_NOK 0x307F 149 | #endif /* EGL_NOK_texture_from_pixmap */ 150 | 151 | #ifndef EGL_ANDROID_image_native_buffer 152 | #define EGL_ANDROID_image_native_buffer 1 153 | #define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ 154 | #endif 155 | 156 | #ifdef __cplusplus 157 | } 158 | #endif 159 | 160 | #endif 161 | -------------------------------------------------------------------------------- /include/EGL/eglplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __eglplatform_h_ 2 | #define __eglplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2007-2009 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Platform-specific types and definitions for egl.h 28 | * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ 29 | * 30 | * Adopters may modify khrplatform.h and this file to suit their platform. 31 | * You are encouraged to submit all modifications to the Khronos group so that 32 | * they can be included in future versions of this file. Please submit changes 33 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 34 | * by filing a bug against product "EGL" component "Registry". 35 | */ 36 | 37 | #include 38 | 39 | /* Macros used in EGL function prototype declarations. 40 | * 41 | * EGL functions should be prototyped as: 42 | * 43 | * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); 44 | * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); 45 | * 46 | * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h 47 | */ 48 | 49 | #ifndef EGLAPI 50 | #define EGLAPI KHRONOS_APICALL 51 | #endif 52 | 53 | #ifndef EGLAPIENTRY 54 | #define EGLAPIENTRY KHRONOS_APIENTRY 55 | #endif 56 | #define EGLAPIENTRYP EGLAPIENTRY* 57 | 58 | /* The types NativeDisplayType, NativeWindowType, and NativePixmapType 59 | * are aliases of window-system-dependent types, such as X Display * or 60 | * Windows Device Context. They must be defined in platform-specific 61 | * code below. The EGL-prefixed versions of Native*Type are the same 62 | * types, renamed in EGL 1.3 so all types in the API start with "EGL". 63 | * 64 | * Khronos STRONGLY RECOMMENDS that you use the default definitions 65 | * provided below, since these changes affect both binary and source 66 | * portability of applications using EGL running on different EGL 67 | * implementations. 68 | */ 69 | 70 | #if defined(WL_EGL_PLATFORM) 71 | 72 | typedef struct wl_display *EGLNativeDisplayType; 73 | typedef struct wl_egl_pixmap *EGLNativePixmapType; 74 | typedef struct wl_egl_window *EGLNativeWindowType; 75 | 76 | #elif defined(__GBM__) 77 | 78 | typedef struct gbm_device *EGLNativeDisplayType; 79 | typedef struct gbm_bo *EGLNativePixmapType; 80 | typedef void *EGLNativeWindowType; 81 | 82 | #else 83 | 84 | typedef void *EGLNativeDisplayType; 85 | typedef khronos_uintptr_t EGLNativePixmapType; 86 | typedef khronos_uintptr_t EGLNativeWindowType; 87 | 88 | #endif 89 | 90 | /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ 91 | typedef EGLNativeDisplayType NativeDisplayType; 92 | typedef EGLNativePixmapType NativePixmapType; 93 | typedef EGLNativeWindowType NativeWindowType; 94 | 95 | 96 | /* Define EGLint. This must be a signed integral type large enough to contain 97 | * all legal attribute names and values passed into and out of EGL, whether 98 | * their type is boolean, bitmask, enumerant (symbolic constant), integer, 99 | * handle, or other. While in general a 32-bit integer will suffice, if 100 | * handles are 64 bit types, then EGLint should be defined as a signed 64-bit 101 | * integer type. 102 | */ 103 | typedef khronos_int32_t EGLint; 104 | 105 | #endif /* __eglplatform_h */ 106 | -------------------------------------------------------------------------------- /include/GLES2/gl2.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2_h_ 2 | #define __gl2_h_ 3 | 4 | /* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */ 5 | 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /* 13 | * This document is licensed under the SGI Free Software B License Version 14 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 15 | */ 16 | 17 | /*------------------------------------------------------------------------- 18 | * Data type definitions 19 | *-----------------------------------------------------------------------*/ 20 | 21 | typedef void GLvoid; 22 | typedef char GLchar; 23 | typedef unsigned int GLenum; 24 | typedef unsigned char GLboolean; 25 | typedef unsigned int GLbitfield; 26 | typedef khronos_int8_t GLbyte; 27 | typedef short GLshort; 28 | typedef int GLint; 29 | typedef int GLsizei; 30 | typedef khronos_uint8_t GLubyte; 31 | typedef unsigned short GLushort; 32 | typedef unsigned int GLuint; 33 | typedef khronos_float_t GLfloat; 34 | typedef khronos_float_t GLclampf; 35 | typedef khronos_int32_t GLfixed; 36 | 37 | /* GL types for handling large vertex buffer objects */ 38 | typedef khronos_intptr_t GLintptr; 39 | typedef khronos_ssize_t GLsizeiptr; 40 | 41 | /* OpenGL ES core versions */ 42 | #define GL_ES_VERSION_2_0 1 43 | 44 | /* ClearBufferMask */ 45 | #define GL_DEPTH_BUFFER_BIT 0x00000100 46 | #define GL_STENCIL_BUFFER_BIT 0x00000400 47 | #define GL_COLOR_BUFFER_BIT 0x00004000 48 | 49 | /* Boolean */ 50 | #define GL_FALSE 0 51 | #define GL_TRUE 1 52 | 53 | /* BeginMode */ 54 | #define GL_POINTS 0x0000 55 | #define GL_LINES 0x0001 56 | #define GL_LINE_LOOP 0x0002 57 | #define GL_LINE_STRIP 0x0003 58 | #define GL_TRIANGLES 0x0004 59 | #define GL_TRIANGLE_STRIP 0x0005 60 | #define GL_TRIANGLE_FAN 0x0006 61 | 62 | /* AlphaFunction (not supported in ES20) */ 63 | /* GL_NEVER */ 64 | /* GL_LESS */ 65 | /* GL_EQUAL */ 66 | /* GL_LEQUAL */ 67 | /* GL_GREATER */ 68 | /* GL_NOTEQUAL */ 69 | /* GL_GEQUAL */ 70 | /* GL_ALWAYS */ 71 | 72 | /* BlendingFactorDest */ 73 | #define GL_ZERO 0 74 | #define GL_ONE 1 75 | #define GL_SRC_COLOR 0x0300 76 | #define GL_ONE_MINUS_SRC_COLOR 0x0301 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 | 82 | /* BlendingFactorSrc */ 83 | /* GL_ZERO */ 84 | /* GL_ONE */ 85 | #define GL_DST_COLOR 0x0306 86 | #define GL_ONE_MINUS_DST_COLOR 0x0307 87 | #define GL_SRC_ALPHA_SATURATE 0x0308 88 | /* GL_SRC_ALPHA */ 89 | /* GL_ONE_MINUS_SRC_ALPHA */ 90 | /* GL_DST_ALPHA */ 91 | /* GL_ONE_MINUS_DST_ALPHA */ 92 | 93 | /* BlendEquationSeparate */ 94 | #define GL_FUNC_ADD 0x8006 95 | #define GL_BLEND_EQUATION 0x8009 96 | #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ 97 | #define GL_BLEND_EQUATION_ALPHA 0x883D 98 | 99 | /* BlendSubtract */ 100 | #define GL_FUNC_SUBTRACT 0x800A 101 | #define GL_FUNC_REVERSE_SUBTRACT 0x800B 102 | 103 | /* Separate Blend Functions */ 104 | #define GL_BLEND_DST_RGB 0x80C8 105 | #define GL_BLEND_SRC_RGB 0x80C9 106 | #define GL_BLEND_DST_ALPHA 0x80CA 107 | #define GL_BLEND_SRC_ALPHA 0x80CB 108 | #define GL_CONSTANT_COLOR 0x8001 109 | #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 110 | #define GL_CONSTANT_ALPHA 0x8003 111 | #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 112 | #define GL_BLEND_COLOR 0x8005 113 | 114 | /* Buffer Objects */ 115 | #define GL_ARRAY_BUFFER 0x8892 116 | #define GL_ELEMENT_ARRAY_BUFFER 0x8893 117 | #define GL_ARRAY_BUFFER_BINDING 0x8894 118 | #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 119 | 120 | #define GL_STREAM_DRAW 0x88E0 121 | #define GL_STATIC_DRAW 0x88E4 122 | #define GL_DYNAMIC_DRAW 0x88E8 123 | 124 | #define GL_BUFFER_SIZE 0x8764 125 | #define GL_BUFFER_USAGE 0x8765 126 | 127 | #define GL_CURRENT_VERTEX_ATTRIB 0x8626 128 | 129 | /* CullFaceMode */ 130 | #define GL_FRONT 0x0404 131 | #define GL_BACK 0x0405 132 | #define GL_FRONT_AND_BACK 0x0408 133 | 134 | /* DepthFunction */ 135 | /* GL_NEVER */ 136 | /* GL_LESS */ 137 | /* GL_EQUAL */ 138 | /* GL_LEQUAL */ 139 | /* GL_GREATER */ 140 | /* GL_NOTEQUAL */ 141 | /* GL_GEQUAL */ 142 | /* GL_ALWAYS */ 143 | 144 | /* EnableCap */ 145 | #define GL_TEXTURE_2D 0x0DE1 146 | #define GL_CULL_FACE 0x0B44 147 | #define GL_BLEND 0x0BE2 148 | #define GL_DITHER 0x0BD0 149 | #define GL_STENCIL_TEST 0x0B90 150 | #define GL_DEPTH_TEST 0x0B71 151 | #define GL_SCISSOR_TEST 0x0C11 152 | #define GL_POLYGON_OFFSET_FILL 0x8037 153 | #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E 154 | #define GL_SAMPLE_COVERAGE 0x80A0 155 | 156 | /* ErrorCode */ 157 | #define GL_NO_ERROR 0 158 | #define GL_INVALID_ENUM 0x0500 159 | #define GL_INVALID_VALUE 0x0501 160 | #define GL_INVALID_OPERATION 0x0502 161 | #define GL_OUT_OF_MEMORY 0x0505 162 | 163 | /* FrontFaceDirection */ 164 | #define GL_CW 0x0900 165 | #define GL_CCW 0x0901 166 | 167 | /* GetPName */ 168 | #define GL_LINE_WIDTH 0x0B21 169 | #define GL_ALIASED_POINT_SIZE_RANGE 0x846D 170 | #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E 171 | #define GL_CULL_FACE_MODE 0x0B45 172 | #define GL_FRONT_FACE 0x0B46 173 | #define GL_DEPTH_RANGE 0x0B70 174 | #define GL_DEPTH_WRITEMASK 0x0B72 175 | #define GL_DEPTH_CLEAR_VALUE 0x0B73 176 | #define GL_DEPTH_FUNC 0x0B74 177 | #define GL_STENCIL_CLEAR_VALUE 0x0B91 178 | #define GL_STENCIL_FUNC 0x0B92 179 | #define GL_STENCIL_FAIL 0x0B94 180 | #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 181 | #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 182 | #define GL_STENCIL_REF 0x0B97 183 | #define GL_STENCIL_VALUE_MASK 0x0B93 184 | #define GL_STENCIL_WRITEMASK 0x0B98 185 | #define GL_STENCIL_BACK_FUNC 0x8800 186 | #define GL_STENCIL_BACK_FAIL 0x8801 187 | #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 188 | #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 189 | #define GL_STENCIL_BACK_REF 0x8CA3 190 | #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 191 | #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 192 | #define GL_VIEWPORT 0x0BA2 193 | #define GL_SCISSOR_BOX 0x0C10 194 | /* GL_SCISSOR_TEST */ 195 | #define GL_COLOR_CLEAR_VALUE 0x0C22 196 | #define GL_COLOR_WRITEMASK 0x0C23 197 | #define GL_UNPACK_ALIGNMENT 0x0CF5 198 | #define GL_PACK_ALIGNMENT 0x0D05 199 | #define GL_MAX_TEXTURE_SIZE 0x0D33 200 | #define GL_MAX_VIEWPORT_DIMS 0x0D3A 201 | #define GL_SUBPIXEL_BITS 0x0D50 202 | #define GL_RED_BITS 0x0D52 203 | #define GL_GREEN_BITS 0x0D53 204 | #define GL_BLUE_BITS 0x0D54 205 | #define GL_ALPHA_BITS 0x0D55 206 | #define GL_DEPTH_BITS 0x0D56 207 | #define GL_STENCIL_BITS 0x0D57 208 | #define GL_POLYGON_OFFSET_UNITS 0x2A00 209 | /* GL_POLYGON_OFFSET_FILL */ 210 | #define GL_POLYGON_OFFSET_FACTOR 0x8038 211 | #define GL_TEXTURE_BINDING_2D 0x8069 212 | #define GL_SAMPLE_BUFFERS 0x80A8 213 | #define GL_SAMPLES 0x80A9 214 | #define GL_SAMPLE_COVERAGE_VALUE 0x80AA 215 | #define GL_SAMPLE_COVERAGE_INVERT 0x80AB 216 | 217 | /* GetTextureParameter */ 218 | /* GL_TEXTURE_MAG_FILTER */ 219 | /* GL_TEXTURE_MIN_FILTER */ 220 | /* GL_TEXTURE_WRAP_S */ 221 | /* GL_TEXTURE_WRAP_T */ 222 | 223 | #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 224 | #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 225 | 226 | /* HintMode */ 227 | #define GL_DONT_CARE 0x1100 228 | #define GL_FASTEST 0x1101 229 | #define GL_NICEST 0x1102 230 | 231 | /* HintTarget */ 232 | #define GL_GENERATE_MIPMAP_HINT 0x8192 233 | 234 | /* DataType */ 235 | #define GL_BYTE 0x1400 236 | #define GL_UNSIGNED_BYTE 0x1401 237 | #define GL_SHORT 0x1402 238 | #define GL_UNSIGNED_SHORT 0x1403 239 | #define GL_INT 0x1404 240 | #define GL_UNSIGNED_INT 0x1405 241 | #define GL_FLOAT 0x1406 242 | #define GL_FIXED 0x140C 243 | 244 | /* PixelFormat */ 245 | #define GL_DEPTH_COMPONENT 0x1902 246 | #define GL_ALPHA 0x1906 247 | #define GL_RGB 0x1907 248 | #define GL_RGBA 0x1908 249 | #define GL_LUMINANCE 0x1909 250 | #define GL_LUMINANCE_ALPHA 0x190A 251 | 252 | /* PixelType */ 253 | /* GL_UNSIGNED_BYTE */ 254 | #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 255 | #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 256 | #define GL_UNSIGNED_SHORT_5_6_5 0x8363 257 | 258 | /* Shaders */ 259 | #define GL_FRAGMENT_SHADER 0x8B30 260 | #define GL_VERTEX_SHADER 0x8B31 261 | #define GL_MAX_VERTEX_ATTRIBS 0x8869 262 | #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB 263 | #define GL_MAX_VARYING_VECTORS 0x8DFC 264 | #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D 265 | #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C 266 | #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 267 | #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD 268 | #define GL_SHADER_TYPE 0x8B4F 269 | #define GL_DELETE_STATUS 0x8B80 270 | #define GL_LINK_STATUS 0x8B82 271 | #define GL_VALIDATE_STATUS 0x8B83 272 | #define GL_ATTACHED_SHADERS 0x8B85 273 | #define GL_ACTIVE_UNIFORMS 0x8B86 274 | #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 275 | #define GL_ACTIVE_ATTRIBUTES 0x8B89 276 | #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A 277 | #define GL_SHADING_LANGUAGE_VERSION 0x8B8C 278 | #define GL_CURRENT_PROGRAM 0x8B8D 279 | 280 | /* StencilFunction */ 281 | #define GL_NEVER 0x0200 282 | #define GL_LESS 0x0201 283 | #define GL_EQUAL 0x0202 284 | #define GL_LEQUAL 0x0203 285 | #define GL_GREATER 0x0204 286 | #define GL_NOTEQUAL 0x0205 287 | #define GL_GEQUAL 0x0206 288 | #define GL_ALWAYS 0x0207 289 | 290 | /* StencilOp */ 291 | /* GL_ZERO */ 292 | #define GL_KEEP 0x1E00 293 | #define GL_REPLACE 0x1E01 294 | #define GL_INCR 0x1E02 295 | #define GL_DECR 0x1E03 296 | #define GL_INVERT 0x150A 297 | #define GL_INCR_WRAP 0x8507 298 | #define GL_DECR_WRAP 0x8508 299 | 300 | /* StringName */ 301 | #define GL_VENDOR 0x1F00 302 | #define GL_RENDERER 0x1F01 303 | #define GL_VERSION 0x1F02 304 | #define GL_EXTENSIONS 0x1F03 305 | 306 | /* TextureMagFilter */ 307 | #define GL_NEAREST 0x2600 308 | #define GL_LINEAR 0x2601 309 | 310 | /* TextureMinFilter */ 311 | /* GL_NEAREST */ 312 | /* GL_LINEAR */ 313 | #define GL_NEAREST_MIPMAP_NEAREST 0x2700 314 | #define GL_LINEAR_MIPMAP_NEAREST 0x2701 315 | #define GL_NEAREST_MIPMAP_LINEAR 0x2702 316 | #define GL_LINEAR_MIPMAP_LINEAR 0x2703 317 | 318 | /* TextureParameterName */ 319 | #define GL_TEXTURE_MAG_FILTER 0x2800 320 | #define GL_TEXTURE_MIN_FILTER 0x2801 321 | #define GL_TEXTURE_WRAP_S 0x2802 322 | #define GL_TEXTURE_WRAP_T 0x2803 323 | 324 | /* TextureTarget */ 325 | /* GL_TEXTURE_2D */ 326 | #define GL_TEXTURE 0x1702 327 | 328 | #define GL_TEXTURE_CUBE_MAP 0x8513 329 | #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 330 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 331 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 332 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 333 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 334 | #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 335 | #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A 336 | #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C 337 | 338 | /* TextureUnit */ 339 | #define GL_TEXTURE0 0x84C0 340 | #define GL_TEXTURE1 0x84C1 341 | #define GL_TEXTURE2 0x84C2 342 | #define GL_TEXTURE3 0x84C3 343 | #define GL_TEXTURE4 0x84C4 344 | #define GL_TEXTURE5 0x84C5 345 | #define GL_TEXTURE6 0x84C6 346 | #define GL_TEXTURE7 0x84C7 347 | #define GL_TEXTURE8 0x84C8 348 | #define GL_TEXTURE9 0x84C9 349 | #define GL_TEXTURE10 0x84CA 350 | #define GL_TEXTURE11 0x84CB 351 | #define GL_TEXTURE12 0x84CC 352 | #define GL_TEXTURE13 0x84CD 353 | #define GL_TEXTURE14 0x84CE 354 | #define GL_TEXTURE15 0x84CF 355 | #define GL_TEXTURE16 0x84D0 356 | #define GL_TEXTURE17 0x84D1 357 | #define GL_TEXTURE18 0x84D2 358 | #define GL_TEXTURE19 0x84D3 359 | #define GL_TEXTURE20 0x84D4 360 | #define GL_TEXTURE21 0x84D5 361 | #define GL_TEXTURE22 0x84D6 362 | #define GL_TEXTURE23 0x84D7 363 | #define GL_TEXTURE24 0x84D8 364 | #define GL_TEXTURE25 0x84D9 365 | #define GL_TEXTURE26 0x84DA 366 | #define GL_TEXTURE27 0x84DB 367 | #define GL_TEXTURE28 0x84DC 368 | #define GL_TEXTURE29 0x84DD 369 | #define GL_TEXTURE30 0x84DE 370 | #define GL_TEXTURE31 0x84DF 371 | #define GL_ACTIVE_TEXTURE 0x84E0 372 | 373 | /* TextureWrapMode */ 374 | #define GL_REPEAT 0x2901 375 | #define GL_CLAMP_TO_EDGE 0x812F 376 | #define GL_MIRRORED_REPEAT 0x8370 377 | 378 | /* Uniform Types */ 379 | #define GL_FLOAT_VEC2 0x8B50 380 | #define GL_FLOAT_VEC3 0x8B51 381 | #define GL_FLOAT_VEC4 0x8B52 382 | #define GL_INT_VEC2 0x8B53 383 | #define GL_INT_VEC3 0x8B54 384 | #define GL_INT_VEC4 0x8B55 385 | #define GL_BOOL 0x8B56 386 | #define GL_BOOL_VEC2 0x8B57 387 | #define GL_BOOL_VEC3 0x8B58 388 | #define GL_BOOL_VEC4 0x8B59 389 | #define GL_FLOAT_MAT2 0x8B5A 390 | #define GL_FLOAT_MAT3 0x8B5B 391 | #define GL_FLOAT_MAT4 0x8B5C 392 | #define GL_SAMPLER_2D 0x8B5E 393 | #define GL_SAMPLER_CUBE 0x8B60 394 | 395 | /* Vertex Arrays */ 396 | #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 397 | #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 398 | #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 399 | #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 400 | #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A 401 | #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 402 | #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F 403 | 404 | /* Read Format */ 405 | #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A 406 | #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B 407 | 408 | /* Shader Source */ 409 | #define GL_COMPILE_STATUS 0x8B81 410 | #define GL_INFO_LOG_LENGTH 0x8B84 411 | #define GL_SHADER_SOURCE_LENGTH 0x8B88 412 | #define GL_SHADER_COMPILER 0x8DFA 413 | 414 | /* Shader Binary */ 415 | #define GL_SHADER_BINARY_FORMATS 0x8DF8 416 | #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 417 | 418 | /* Shader Precision-Specified Types */ 419 | #define GL_LOW_FLOAT 0x8DF0 420 | #define GL_MEDIUM_FLOAT 0x8DF1 421 | #define GL_HIGH_FLOAT 0x8DF2 422 | #define GL_LOW_INT 0x8DF3 423 | #define GL_MEDIUM_INT 0x8DF4 424 | #define GL_HIGH_INT 0x8DF5 425 | 426 | /* Framebuffer Object. */ 427 | #define GL_FRAMEBUFFER 0x8D40 428 | #define GL_RENDERBUFFER 0x8D41 429 | 430 | #define GL_RGBA4 0x8056 431 | #define GL_RGB5_A1 0x8057 432 | #define GL_RGB565 0x8D62 433 | #define GL_DEPTH_COMPONENT16 0x81A5 434 | #define GL_STENCIL_INDEX8 0x8D48 435 | 436 | #define GL_RENDERBUFFER_WIDTH 0x8D42 437 | #define GL_RENDERBUFFER_HEIGHT 0x8D43 438 | #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 439 | #define GL_RENDERBUFFER_RED_SIZE 0x8D50 440 | #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 441 | #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 442 | #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 443 | #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 444 | #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 445 | 446 | #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 447 | #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 448 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 449 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 450 | 451 | #define GL_COLOR_ATTACHMENT0 0x8CE0 452 | #define GL_DEPTH_ATTACHMENT 0x8D00 453 | #define GL_STENCIL_ATTACHMENT 0x8D20 454 | 455 | #define GL_NONE 0 456 | 457 | #define GL_FRAMEBUFFER_COMPLETE 0x8CD5 458 | #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 459 | #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 460 | #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 461 | #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD 462 | 463 | #define GL_FRAMEBUFFER_BINDING 0x8CA6 464 | #define GL_RENDERBUFFER_BINDING 0x8CA7 465 | #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 466 | 467 | #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 468 | 469 | /*------------------------------------------------------------------------- 470 | * GL core functions. 471 | *-----------------------------------------------------------------------*/ 472 | 473 | GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); 474 | GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); 475 | GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); 476 | GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); 477 | GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); 478 | GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); 479 | GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); 480 | GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 481 | GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); 482 | GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); 483 | GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); 484 | GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); 485 | GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); 486 | GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); 487 | GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); 488 | GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); 489 | GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); 490 | GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); 491 | GL_APICALL void GL_APIENTRY glClearStencil (GLint s); 492 | GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); 493 | GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); 494 | GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); 495 | GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); 496 | GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); 497 | GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); 498 | GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); 499 | GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); 500 | GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); 501 | GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); 502 | GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); 503 | GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); 504 | GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); 505 | GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); 506 | GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); 507 | GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); 508 | GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); 509 | GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); 510 | GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); 511 | GL_APICALL void GL_APIENTRY glDisable (GLenum cap); 512 | GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); 513 | GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); 514 | GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); 515 | GL_APICALL void GL_APIENTRY glEnable (GLenum cap); 516 | GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); 517 | GL_APICALL void GL_APIENTRY glFinish (void); 518 | GL_APICALL void GL_APIENTRY glFlush (void); 519 | GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); 520 | GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); 521 | GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); 522 | GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); 523 | GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); 524 | GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); 525 | GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); 526 | GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); 527 | GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); 528 | GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); 529 | GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); 530 | GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); 531 | GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); 532 | GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); 533 | GL_APICALL GLenum GL_APIENTRY glGetError (void); 534 | GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); 535 | GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); 536 | GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); 537 | GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); 538 | GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); 539 | GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); 540 | GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); 541 | GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); 542 | GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); 543 | GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); 544 | GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); 545 | GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); 546 | GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); 547 | GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); 548 | GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); 549 | GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); 550 | GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); 551 | GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); 552 | GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); 553 | GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); 554 | GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); 555 | GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); 556 | GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); 557 | GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); 558 | GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); 559 | GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); 560 | GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); 561 | GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); 562 | GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); 563 | GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); 564 | GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); 565 | GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); 566 | GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); 567 | GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); 568 | GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); 569 | GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); 570 | GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); 571 | GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); 572 | GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); 573 | GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); 574 | GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); 575 | GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); 576 | GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); 577 | GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); 578 | GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); 579 | GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); 580 | GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); 581 | GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); 582 | GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); 583 | GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); 584 | GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); 585 | GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); 586 | GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); 587 | GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); 588 | GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); 589 | GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); 590 | GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); 591 | GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); 592 | GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); 593 | GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); 594 | GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); 595 | GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); 596 | GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 597 | GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); 598 | GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); 599 | GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); 600 | GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 601 | GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 602 | GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); 603 | GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); 604 | GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); 605 | GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); 606 | GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); 607 | GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); 608 | GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); 609 | GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); 610 | GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); 611 | GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 612 | GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); 613 | GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); 614 | GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); 615 | 616 | #ifdef __cplusplus 617 | } 618 | #endif 619 | 620 | #endif /* __gl2_h_ */ 621 | -------------------------------------------------------------------------------- /include/GLES2/gl2ext.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2ext_h_ 2 | #define __gl2ext_h_ 3 | 4 | /* $Revision: 22161 $ on $Date:: 2013-06-25 08:17:27 -0700 #$ */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /* 11 | * This document is licensed under the SGI Free Software B License Version 12 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 13 | */ 14 | 15 | #ifndef GL_APIENTRYP 16 | # define GL_APIENTRYP GL_APIENTRY* 17 | #endif 18 | 19 | /* New types shared by several extensions */ 20 | 21 | #ifndef __gl3_h_ 22 | /* These are defined with respect to in the 23 | * Apple extension spec, but they are also used by non-APPLE 24 | * extensions, and in the Khronos header we use the Khronos 25 | * portable types in khrplatform.h, which must be defined. 26 | */ 27 | typedef khronos_int64_t GLint64; 28 | typedef khronos_uint64_t GLuint64; 29 | typedef struct __GLsync *GLsync; 30 | #endif 31 | 32 | 33 | /*------------------------------------------------------------------------* 34 | * OES extension tokens 35 | *------------------------------------------------------------------------*/ 36 | 37 | /* GL_OES_compressed_ETC1_RGB8_texture */ 38 | #ifndef GL_OES_compressed_ETC1_RGB8_texture 39 | #define GL_ETC1_RGB8_OES 0x8D64 40 | #endif 41 | 42 | /* GL_OES_compressed_paletted_texture */ 43 | #ifndef GL_OES_compressed_paletted_texture 44 | #define GL_PALETTE4_RGB8_OES 0x8B90 45 | #define GL_PALETTE4_RGBA8_OES 0x8B91 46 | #define GL_PALETTE4_R5_G6_B5_OES 0x8B92 47 | #define GL_PALETTE4_RGBA4_OES 0x8B93 48 | #define GL_PALETTE4_RGB5_A1_OES 0x8B94 49 | #define GL_PALETTE8_RGB8_OES 0x8B95 50 | #define GL_PALETTE8_RGBA8_OES 0x8B96 51 | #define GL_PALETTE8_R5_G6_B5_OES 0x8B97 52 | #define GL_PALETTE8_RGBA4_OES 0x8B98 53 | #define GL_PALETTE8_RGB5_A1_OES 0x8B99 54 | #endif 55 | 56 | /* GL_OES_depth24 */ 57 | #ifndef GL_OES_depth24 58 | #define GL_DEPTH_COMPONENT24_OES 0x81A6 59 | #endif 60 | 61 | /* GL_OES_depth32 */ 62 | #ifndef GL_OES_depth32 63 | #define GL_DEPTH_COMPONENT32_OES 0x81A7 64 | #endif 65 | 66 | /* GL_OES_depth_texture */ 67 | /* No new tokens introduced by this extension. */ 68 | 69 | /* GL_OES_EGL_image */ 70 | #ifndef GL_OES_EGL_image 71 | typedef void* GLeglImageOES; 72 | #endif 73 | 74 | /* GL_OES_EGL_image_external */ 75 | #ifndef GL_OES_EGL_image_external 76 | /* GLeglImageOES defined in GL_OES_EGL_image already. */ 77 | #define GL_TEXTURE_EXTERNAL_OES 0x8D65 78 | #define GL_SAMPLER_EXTERNAL_OES 0x8D66 79 | #define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 80 | #define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 81 | #endif 82 | 83 | /* GL_OES_element_index_uint */ 84 | #ifndef GL_OES_element_index_uint 85 | #define GL_UNSIGNED_INT 0x1405 86 | #endif 87 | 88 | /* GL_OES_get_program_binary */ 89 | #ifndef GL_OES_get_program_binary 90 | #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 91 | #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE 92 | #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF 93 | #endif 94 | 95 | /* GL_OES_mapbuffer */ 96 | #ifndef GL_OES_mapbuffer 97 | #define GL_WRITE_ONLY_OES 0x88B9 98 | #define GL_BUFFER_ACCESS_OES 0x88BB 99 | #define GL_BUFFER_MAPPED_OES 0x88BC 100 | #define GL_BUFFER_MAP_POINTER_OES 0x88BD 101 | #endif 102 | 103 | /* GL_OES_packed_depth_stencil */ 104 | #ifndef GL_OES_packed_depth_stencil 105 | #define GL_DEPTH_STENCIL_OES 0x84F9 106 | #define GL_UNSIGNED_INT_24_8_OES 0x84FA 107 | #define GL_DEPTH24_STENCIL8_OES 0x88F0 108 | #endif 109 | 110 | /* GL_OES_required_internalformat */ 111 | #ifndef GL_OES_required_internalformat 112 | #define GL_ALPHA8_OES 0x803C 113 | #define GL_DEPTH_COMPONENT16_OES 0x81A5 114 | /* reuse GL_DEPTH_COMPONENT24_OES */ 115 | /* reuse GL_DEPTH24_STENCIL8_OES */ 116 | /* reuse GL_DEPTH_COMPONENT32_OES */ 117 | #define GL_LUMINANCE4_ALPHA4_OES 0x8043 118 | #define GL_LUMINANCE8_ALPHA8_OES 0x8045 119 | #define GL_LUMINANCE8_OES 0x8040 120 | #define GL_RGBA4_OES 0x8056 121 | #define GL_RGB5_A1_OES 0x8057 122 | #define GL_RGB565_OES 0x8D62 123 | /* reuse GL_RGB8_OES */ 124 | /* reuse GL_RGBA8_OES */ 125 | /* reuse GL_RGB10_EXT */ 126 | /* reuse GL_RGB10_A2_EXT */ 127 | #endif 128 | 129 | /* GL_OES_rgb8_rgba8 */ 130 | #ifndef GL_OES_rgb8_rgba8 131 | #define GL_RGB8_OES 0x8051 132 | #define GL_RGBA8_OES 0x8058 133 | #endif 134 | 135 | /* GL_OES_standard_derivatives */ 136 | #ifndef GL_OES_standard_derivatives 137 | #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B 138 | #endif 139 | 140 | /* GL_OES_stencil1 */ 141 | #ifndef GL_OES_stencil1 142 | #define GL_STENCIL_INDEX1_OES 0x8D46 143 | #endif 144 | 145 | /* GL_OES_stencil4 */ 146 | #ifndef GL_OES_stencil4 147 | #define GL_STENCIL_INDEX4_OES 0x8D47 148 | #endif 149 | 150 | #ifndef GL_OES_surfaceless_context 151 | #define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 152 | #endif 153 | 154 | /* GL_OES_texture_3D */ 155 | #ifndef GL_OES_texture_3D 156 | #define GL_TEXTURE_WRAP_R_OES 0x8072 157 | #define GL_TEXTURE_3D_OES 0x806F 158 | #define GL_TEXTURE_BINDING_3D_OES 0x806A 159 | #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 160 | #define GL_SAMPLER_3D_OES 0x8B5F 161 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 162 | #endif 163 | 164 | /* GL_OES_texture_float */ 165 | /* No new tokens introduced by this extension. */ 166 | 167 | /* GL_OES_texture_float_linear */ 168 | /* No new tokens introduced by this extension. */ 169 | 170 | /* GL_OES_texture_half_float */ 171 | #ifndef GL_OES_texture_half_float 172 | #define GL_HALF_FLOAT_OES 0x8D61 173 | #endif 174 | 175 | /* GL_OES_texture_half_float_linear */ 176 | /* No new tokens introduced by this extension. */ 177 | 178 | /* GL_OES_texture_npot */ 179 | /* No new tokens introduced by this extension. */ 180 | 181 | /* GL_OES_vertex_array_object */ 182 | #ifndef GL_OES_vertex_array_object 183 | #define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 184 | #endif 185 | 186 | /* GL_OES_vertex_half_float */ 187 | /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ 188 | 189 | /* GL_OES_vertex_type_10_10_10_2 */ 190 | #ifndef GL_OES_vertex_type_10_10_10_2 191 | #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 192 | #define GL_INT_10_10_10_2_OES 0x8DF7 193 | #endif 194 | 195 | /*------------------------------------------------------------------------* 196 | * KHR extension tokens 197 | *------------------------------------------------------------------------*/ 198 | 199 | #ifndef GL_KHR_debug 200 | typedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam); 201 | #define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 202 | #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 203 | #define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244 204 | #define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245 205 | #define GL_DEBUG_SOURCE_API_KHR 0x8246 206 | #define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247 207 | #define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248 208 | #define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249 209 | #define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A 210 | #define GL_DEBUG_SOURCE_OTHER_KHR 0x824B 211 | #define GL_DEBUG_TYPE_ERROR_KHR 0x824C 212 | #define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D 213 | #define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E 214 | #define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F 215 | #define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250 216 | #define GL_DEBUG_TYPE_OTHER_KHR 0x8251 217 | #define GL_DEBUG_TYPE_MARKER_KHR 0x8268 218 | #define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269 219 | #define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A 220 | #define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B 221 | #define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C 222 | #define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D 223 | #define GL_BUFFER_KHR 0x82E0 224 | #define GL_SHADER_KHR 0x82E1 225 | #define GL_PROGRAM_KHR 0x82E2 226 | #define GL_QUERY_KHR 0x82E3 227 | /* PROGRAM_PIPELINE only in GL */ 228 | #define GL_SAMPLER_KHR 0x82E6 229 | /* DISPLAY_LIST only in GL */ 230 | #define GL_MAX_LABEL_LENGTH_KHR 0x82E8 231 | #define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 232 | #define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144 233 | #define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145 234 | #define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146 235 | #define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147 236 | #define GL_DEBUG_SEVERITY_LOW_KHR 0x9148 237 | #define GL_DEBUG_OUTPUT_KHR 0x92E0 238 | #define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 239 | #define GL_STACK_OVERFLOW_KHR 0x0503 240 | #define GL_STACK_UNDERFLOW_KHR 0x0504 241 | #endif 242 | 243 | #ifndef GL_KHR_texture_compression_astc_ldr 244 | #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 245 | #define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 246 | #define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 247 | #define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 248 | #define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 249 | #define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 250 | #define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 251 | #define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 252 | #define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 253 | #define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 254 | #define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA 255 | #define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB 256 | #define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC 257 | #define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD 258 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 259 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 260 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 261 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 262 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 263 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 264 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 265 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 266 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 267 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 268 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA 269 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB 270 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC 271 | #define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD 272 | #endif 273 | 274 | /*------------------------------------------------------------------------* 275 | * AMD extension tokens 276 | *------------------------------------------------------------------------*/ 277 | 278 | /* GL_AMD_compressed_3DC_texture */ 279 | #ifndef GL_AMD_compressed_3DC_texture 280 | #define GL_3DC_X_AMD 0x87F9 281 | #define GL_3DC_XY_AMD 0x87FA 282 | #endif 283 | 284 | /* GL_AMD_compressed_ATC_texture */ 285 | #ifndef GL_AMD_compressed_ATC_texture 286 | #define GL_ATC_RGB_AMD 0x8C92 287 | #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 288 | #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE 289 | #endif 290 | 291 | /* GL_AMD_performance_monitor */ 292 | #ifndef GL_AMD_performance_monitor 293 | #define GL_COUNTER_TYPE_AMD 0x8BC0 294 | #define GL_COUNTER_RANGE_AMD 0x8BC1 295 | #define GL_UNSIGNED_INT64_AMD 0x8BC2 296 | #define GL_PERCENTAGE_AMD 0x8BC3 297 | #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 298 | #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 299 | #define GL_PERFMON_RESULT_AMD 0x8BC6 300 | #endif 301 | 302 | /* GL_AMD_program_binary_Z400 */ 303 | #ifndef GL_AMD_program_binary_Z400 304 | #define GL_Z400_BINARY_AMD 0x8740 305 | #endif 306 | 307 | /*------------------------------------------------------------------------* 308 | * ANGLE extension tokens 309 | *------------------------------------------------------------------------*/ 310 | 311 | /* GL_ANGLE_depth_texture */ 312 | #ifndef GL_ANGLE_depth_texture 313 | #define GL_DEPTH_COMPONENT 0x1902 314 | #define GL_DEPTH_STENCIL_OES 0x84F9 315 | #define GL_UNSIGNED_SHORT 0x1403 316 | #define GL_UNSIGNED_INT 0x1405 317 | #define GL_UNSIGNED_INT_24_8_OES 0x84FA 318 | #define GL_DEPTH_COMPONENT16 0x81A5 319 | #define GL_DEPTH_COMPONENT32_OES 0x81A7 320 | #define GL_DEPTH24_STENCIL8_OES 0x88F0 321 | #endif 322 | 323 | /* GL_ANGLE_framebuffer_blit */ 324 | #ifndef GL_ANGLE_framebuffer_blit 325 | #define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 326 | #define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 327 | #define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 328 | #define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA 329 | #endif 330 | 331 | /* GL_ANGLE_framebuffer_multisample */ 332 | #ifndef GL_ANGLE_framebuffer_multisample 333 | #define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB 334 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 335 | #define GL_MAX_SAMPLES_ANGLE 0x8D57 336 | #endif 337 | 338 | /* GL_ANGLE_instanced_arrays */ 339 | #ifndef GL_ANGLE_instanced_arrays 340 | #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE 341 | #endif 342 | 343 | /* GL_ANGLE_pack_reverse_row_order */ 344 | #ifndef GL_ANGLE_pack_reverse_row_order 345 | #define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 346 | #endif 347 | 348 | /* GL_ANGLE_program_binary */ 349 | #ifndef GL_ANGLE_program_binary 350 | #define GL_PROGRAM_BINARY_ANGLE 0x93A6 351 | #endif 352 | 353 | /* GL_ANGLE_texture_compression_dxt3 */ 354 | #ifndef GL_ANGLE_texture_compression_dxt3 355 | #define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 356 | #endif 357 | 358 | /* GL_ANGLE_texture_compression_dxt5 */ 359 | #ifndef GL_ANGLE_texture_compression_dxt5 360 | #define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 361 | #endif 362 | 363 | /* GL_ANGLE_texture_usage */ 364 | #ifndef GL_ANGLE_texture_usage 365 | #define GL_TEXTURE_USAGE_ANGLE 0x93A2 366 | #define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 367 | #endif 368 | 369 | /* GL_ANGLE_translated_shader_source */ 370 | #ifndef GL_ANGLE_translated_shader_source 371 | #define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 372 | #endif 373 | 374 | /*------------------------------------------------------------------------* 375 | * APPLE extension tokens 376 | *------------------------------------------------------------------------*/ 377 | 378 | /* GL_APPLE_copy_texture_levels */ 379 | /* No new tokens introduced by this extension. */ 380 | 381 | /* GL_APPLE_framebuffer_multisample */ 382 | #ifndef GL_APPLE_framebuffer_multisample 383 | #define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB 384 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 385 | #define GL_MAX_SAMPLES_APPLE 0x8D57 386 | #define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 387 | #define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 388 | #define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 389 | #define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA 390 | #endif 391 | 392 | /* GL_APPLE_rgb_422 */ 393 | #ifndef GL_APPLE_rgb_422 394 | #define GL_RGB_422_APPLE 0x8A1F 395 | #define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA 396 | #define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB 397 | #endif 398 | 399 | /* GL_APPLE_sync */ 400 | #ifndef GL_APPLE_sync 401 | 402 | #define GL_SYNC_OBJECT_APPLE 0x8A53 403 | #define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 404 | #define GL_OBJECT_TYPE_APPLE 0x9112 405 | #define GL_SYNC_CONDITION_APPLE 0x9113 406 | #define GL_SYNC_STATUS_APPLE 0x9114 407 | #define GL_SYNC_FLAGS_APPLE 0x9115 408 | #define GL_SYNC_FENCE_APPLE 0x9116 409 | #define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 410 | #define GL_UNSIGNALED_APPLE 0x9118 411 | #define GL_SIGNALED_APPLE 0x9119 412 | #define GL_ALREADY_SIGNALED_APPLE 0x911A 413 | #define GL_TIMEOUT_EXPIRED_APPLE 0x911B 414 | #define GL_CONDITION_SATISFIED_APPLE 0x911C 415 | #define GL_WAIT_FAILED_APPLE 0x911D 416 | #define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 417 | #define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull 418 | #endif 419 | 420 | /* GL_APPLE_texture_format_BGRA8888 */ 421 | #ifndef GL_APPLE_texture_format_BGRA8888 422 | #define GL_BGRA_EXT 0x80E1 423 | #endif 424 | 425 | /* GL_APPLE_texture_max_level */ 426 | #ifndef GL_APPLE_texture_max_level 427 | #define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D 428 | #endif 429 | 430 | /*------------------------------------------------------------------------* 431 | * ARM extension tokens 432 | *------------------------------------------------------------------------*/ 433 | 434 | /* GL_ARM_mali_program_binary */ 435 | #ifndef GL_ARM_mali_program_binary 436 | #define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 437 | #endif 438 | 439 | /* GL_ARM_mali_shader_binary */ 440 | #ifndef GL_ARM_mali_shader_binary 441 | #define GL_MALI_SHADER_BINARY_ARM 0x8F60 442 | #endif 443 | 444 | /* GL_ARM_rgba8 */ 445 | /* No new tokens introduced by this extension. */ 446 | 447 | /*------------------------------------------------------------------------* 448 | * EXT extension tokens 449 | *------------------------------------------------------------------------*/ 450 | 451 | /* GL_EXT_blend_minmax */ 452 | #ifndef GL_EXT_blend_minmax 453 | #define GL_MIN_EXT 0x8007 454 | #define GL_MAX_EXT 0x8008 455 | #endif 456 | 457 | /* GL_EXT_color_buffer_half_float */ 458 | #ifndef GL_EXT_color_buffer_half_float 459 | #define GL_RGBA16F_EXT 0x881A 460 | #define GL_RGB16F_EXT 0x881B 461 | #define GL_RG16F_EXT 0x822F 462 | #define GL_R16F_EXT 0x822D 463 | #define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 464 | #define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 465 | #endif 466 | 467 | /* GL_EXT_debug_label */ 468 | #ifndef GL_EXT_debug_label 469 | #define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F 470 | #define GL_PROGRAM_OBJECT_EXT 0x8B40 471 | #define GL_SHADER_OBJECT_EXT 0x8B48 472 | #define GL_BUFFER_OBJECT_EXT 0x9151 473 | #define GL_QUERY_OBJECT_EXT 0x9153 474 | #define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 475 | #endif 476 | 477 | /* GL_EXT_debug_marker */ 478 | /* No new tokens introduced by this extension. */ 479 | 480 | /* GL_EXT_discard_framebuffer */ 481 | #ifndef GL_EXT_discard_framebuffer 482 | #define GL_COLOR_EXT 0x1800 483 | #define GL_DEPTH_EXT 0x1801 484 | #define GL_STENCIL_EXT 0x1802 485 | #endif 486 | 487 | #ifndef GL_EXT_disjoint_timer_query 488 | #define GL_QUERY_COUNTER_BITS_EXT 0x8864 489 | #define GL_CURRENT_QUERY_EXT 0x8865 490 | #define GL_QUERY_RESULT_EXT 0x8866 491 | #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 492 | #define GL_TIME_ELAPSED_EXT 0x88BF 493 | #define GL_TIMESTAMP_EXT 0x8E28 494 | #define GL_GPU_DISJOINT_EXT 0x8FBB 495 | #endif 496 | 497 | #ifndef GL_EXT_draw_buffers 498 | #define GL_EXT_draw_buffers 1 499 | #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF 500 | #define GL_MAX_DRAW_BUFFERS_EXT 0x8824 501 | #define GL_DRAW_BUFFER0_EXT 0x8825 502 | #define GL_DRAW_BUFFER1_EXT 0x8826 503 | #define GL_DRAW_BUFFER2_EXT 0x8827 504 | #define GL_DRAW_BUFFER3_EXT 0x8828 505 | #define GL_DRAW_BUFFER4_EXT 0x8829 506 | #define GL_DRAW_BUFFER5_EXT 0x882A 507 | #define GL_DRAW_BUFFER6_EXT 0x882B 508 | #define GL_DRAW_BUFFER7_EXT 0x882C 509 | #define GL_DRAW_BUFFER8_EXT 0x882D 510 | #define GL_DRAW_BUFFER9_EXT 0x882E 511 | #define GL_DRAW_BUFFER10_EXT 0x882F 512 | #define GL_DRAW_BUFFER11_EXT 0x8830 513 | #define GL_DRAW_BUFFER12_EXT 0x8831 514 | #define GL_DRAW_BUFFER13_EXT 0x8832 515 | #define GL_DRAW_BUFFER14_EXT 0x8833 516 | #define GL_DRAW_BUFFER15_EXT 0x8834 517 | #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 518 | #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 519 | #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 520 | #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 521 | #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 522 | #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 523 | #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 524 | #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 525 | #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 526 | #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 527 | #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA 528 | #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB 529 | #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC 530 | #define GL_COLOR_ATTACHMENT13_EXT 0x8CED 531 | #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE 532 | #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF 533 | #endif 534 | 535 | /* GL_EXT_map_buffer_range */ 536 | #ifndef GL_EXT_map_buffer_range 537 | #define GL_MAP_READ_BIT_EXT 0x0001 538 | #define GL_MAP_WRITE_BIT_EXT 0x0002 539 | #define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 540 | #define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 541 | #define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 542 | #define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 543 | #endif 544 | 545 | /* GL_EXT_multisampled_render_to_texture */ 546 | #ifndef GL_EXT_multisampled_render_to_texture 547 | #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C 548 | /* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */ 549 | #define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB 550 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 551 | #define GL_MAX_SAMPLES_EXT 0x8D57 552 | #endif 553 | 554 | /* GL_EXT_multiview_draw_buffers */ 555 | #ifndef GL_EXT_multiview_draw_buffers 556 | #define GL_COLOR_ATTACHMENT_EXT 0x90F0 557 | #define GL_MULTIVIEW_EXT 0x90F1 558 | #define GL_DRAW_BUFFER_EXT 0x0C01 559 | #define GL_READ_BUFFER_EXT 0x0C02 560 | #define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 561 | #endif 562 | 563 | /* GL_EXT_multi_draw_arrays */ 564 | /* No new tokens introduced by this extension. */ 565 | 566 | /* GL_EXT_occlusion_query_boolean */ 567 | #ifndef GL_EXT_occlusion_query_boolean 568 | #define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F 569 | #define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A 570 | #define GL_CURRENT_QUERY_EXT 0x8865 571 | #define GL_QUERY_RESULT_EXT 0x8866 572 | #define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 573 | #endif 574 | 575 | /* GL_EXT_read_format_bgra */ 576 | #ifndef GL_EXT_read_format_bgra 577 | #define GL_BGRA_EXT 0x80E1 578 | #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 579 | #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 580 | #endif 581 | 582 | /* GL_EXT_robustness */ 583 | #ifndef GL_EXT_robustness 584 | /* reuse GL_NO_ERROR */ 585 | #define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 586 | #define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 587 | #define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 588 | #define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 589 | #define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 590 | #define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 591 | #define GL_NO_RESET_NOTIFICATION_EXT 0x8261 592 | #endif 593 | 594 | /* GL_EXT_separate_shader_objects */ 595 | #ifndef GL_EXT_separate_shader_objects 596 | #define GL_VERTEX_SHADER_BIT_EXT 0x00000001 597 | #define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 598 | #define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF 599 | #define GL_PROGRAM_SEPARABLE_EXT 0x8258 600 | #define GL_ACTIVE_PROGRAM_EXT 0x8259 601 | #define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A 602 | #endif 603 | 604 | /* GL_EXT_shader_framebuffer_fetch */ 605 | #ifndef GL_EXT_shader_framebuffer_fetch 606 | #define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 607 | #endif 608 | 609 | /* GL_EXT_shader_texture_lod */ 610 | /* No new tokens introduced by this extension. */ 611 | 612 | /* GL_EXT_shadow_samplers */ 613 | #ifndef GL_EXT_shadow_samplers 614 | #define GL_TEXTURE_COMPARE_MODE_EXT 0x884C 615 | #define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D 616 | #define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E 617 | #define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 618 | #endif 619 | 620 | /* GL_EXT_sRGB */ 621 | #ifndef GL_EXT_sRGB 622 | #define GL_SRGB_EXT 0x8C40 623 | #define GL_SRGB_ALPHA_EXT 0x8C42 624 | #define GL_SRGB8_ALPHA8_EXT 0x8C43 625 | #define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 626 | #endif 627 | 628 | /* GL_EXT_texture_compression_dxt1 */ 629 | #ifndef GL_EXT_texture_compression_dxt1 630 | #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 631 | #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 632 | #endif 633 | 634 | /* GL_EXT_texture_filter_anisotropic */ 635 | #ifndef GL_EXT_texture_filter_anisotropic 636 | #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE 637 | #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF 638 | #endif 639 | 640 | /* GL_EXT_texture_format_BGRA8888 */ 641 | #ifndef GL_EXT_texture_format_BGRA8888 642 | #define GL_BGRA_EXT 0x80E1 643 | #endif 644 | 645 | /* GL_EXT_texture_rg */ 646 | #ifndef GL_EXT_texture_rg 647 | #define GL_RED_EXT 0x1903 648 | #define GL_RG_EXT 0x8227 649 | #define GL_R8_EXT 0x8229 650 | #define GL_RG8_EXT 0x822B 651 | #endif 652 | 653 | /* GL_EXT_texture_storage */ 654 | #ifndef GL_EXT_texture_storage 655 | #define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F 656 | #define GL_ALPHA8_EXT 0x803C 657 | #define GL_LUMINANCE8_EXT 0x8040 658 | #define GL_LUMINANCE8_ALPHA8_EXT 0x8045 659 | #define GL_RGBA32F_EXT 0x8814 660 | #define GL_RGB32F_EXT 0x8815 661 | #define GL_ALPHA32F_EXT 0x8816 662 | #define GL_LUMINANCE32F_EXT 0x8818 663 | #define GL_LUMINANCE_ALPHA32F_EXT 0x8819 664 | /* reuse GL_RGBA16F_EXT */ 665 | /* reuse GL_RGB16F_EXT */ 666 | #define GL_ALPHA16F_EXT 0x881C 667 | #define GL_LUMINANCE16F_EXT 0x881E 668 | #define GL_LUMINANCE_ALPHA16F_EXT 0x881F 669 | #define GL_RGB10_A2_EXT 0x8059 670 | #define GL_RGB10_EXT 0x8052 671 | #define GL_BGRA8_EXT 0x93A1 672 | #define GL_R8_EXT 0x8229 673 | #define GL_RG8_EXT 0x822B 674 | #define GL_R32F_EXT 0x822E 675 | #define GL_RG32F_EXT 0x8230 676 | #define GL_R16F_EXT 0x822D 677 | #define GL_RG16F_EXT 0x822F 678 | #endif 679 | 680 | /* GL_EXT_texture_type_2_10_10_10_REV */ 681 | #ifndef GL_EXT_texture_type_2_10_10_10_REV 682 | #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 683 | #endif 684 | 685 | /* GL_EXT_unpack_subimage */ 686 | #ifndef GL_EXT_unpack_subimage 687 | #define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 688 | #define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 689 | #define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 690 | #endif 691 | 692 | /*------------------------------------------------------------------------* 693 | * DMP extension tokens 694 | *------------------------------------------------------------------------*/ 695 | 696 | /* GL_DMP_shader_binary */ 697 | #ifndef GL_DMP_shader_binary 698 | #define GL_SHADER_BINARY_DMP 0x9250 699 | #endif 700 | 701 | /*------------------------------------------------------------------------* 702 | * FJ extension tokens 703 | *------------------------------------------------------------------------*/ 704 | 705 | /* GL_FJ_shader_binary_GCCSO */ 706 | #ifndef GL_FJ_shader_binary_GCCSO 707 | #define GL_GCCSO_SHADER_BINARY_FJ 0x9260 708 | #endif 709 | 710 | /*------------------------------------------------------------------------* 711 | * IMG extension tokens 712 | *------------------------------------------------------------------------*/ 713 | 714 | /* GL_IMG_program_binary */ 715 | #ifndef GL_IMG_program_binary 716 | #define GL_SGX_PROGRAM_BINARY_IMG 0x9130 717 | #endif 718 | 719 | /* GL_IMG_read_format */ 720 | #ifndef GL_IMG_read_format 721 | #define GL_BGRA_IMG 0x80E1 722 | #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 723 | #endif 724 | 725 | /* GL_IMG_shader_binary */ 726 | #ifndef GL_IMG_shader_binary 727 | #define GL_SGX_BINARY_IMG 0x8C0A 728 | #endif 729 | 730 | /* GL_IMG_texture_compression_pvrtc */ 731 | #ifndef GL_IMG_texture_compression_pvrtc 732 | #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 733 | #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 734 | #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 735 | #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 736 | #endif 737 | 738 | /* GL_IMG_texture_compression_pvrtc2 */ 739 | #ifndef GL_IMG_texture_compression_pvrtc2 740 | #define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 741 | #define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 742 | #endif 743 | 744 | /* GL_IMG_multisampled_render_to_texture */ 745 | #ifndef GL_IMG_multisampled_render_to_texture 746 | #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 747 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 748 | #define GL_MAX_SAMPLES_IMG 0x9135 749 | #define GL_TEXTURE_SAMPLES_IMG 0x9136 750 | #endif 751 | 752 | /*------------------------------------------------------------------------* 753 | * NV extension tokens 754 | *------------------------------------------------------------------------*/ 755 | 756 | /* GL_NV_coverage_sample */ 757 | #ifndef GL_NV_coverage_sample 758 | #define GL_COVERAGE_COMPONENT_NV 0x8ED0 759 | #define GL_COVERAGE_COMPONENT4_NV 0x8ED1 760 | #define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 761 | #define GL_COVERAGE_BUFFERS_NV 0x8ED3 762 | #define GL_COVERAGE_SAMPLES_NV 0x8ED4 763 | #define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 764 | #define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 765 | #define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 766 | #define GL_COVERAGE_BUFFER_BIT_NV 0x00008000 767 | #endif 768 | 769 | /* GL_NV_depth_nonlinear */ 770 | #ifndef GL_NV_depth_nonlinear 771 | #define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C 772 | #endif 773 | 774 | /* GL_NV_draw_buffers */ 775 | #ifndef GL_NV_draw_buffers 776 | #define GL_MAX_DRAW_BUFFERS_NV 0x8824 777 | #define GL_DRAW_BUFFER0_NV 0x8825 778 | #define GL_DRAW_BUFFER1_NV 0x8826 779 | #define GL_DRAW_BUFFER2_NV 0x8827 780 | #define GL_DRAW_BUFFER3_NV 0x8828 781 | #define GL_DRAW_BUFFER4_NV 0x8829 782 | #define GL_DRAW_BUFFER5_NV 0x882A 783 | #define GL_DRAW_BUFFER6_NV 0x882B 784 | #define GL_DRAW_BUFFER7_NV 0x882C 785 | #define GL_DRAW_BUFFER8_NV 0x882D 786 | #define GL_DRAW_BUFFER9_NV 0x882E 787 | #define GL_DRAW_BUFFER10_NV 0x882F 788 | #define GL_DRAW_BUFFER11_NV 0x8830 789 | #define GL_DRAW_BUFFER12_NV 0x8831 790 | #define GL_DRAW_BUFFER13_NV 0x8832 791 | #define GL_DRAW_BUFFER14_NV 0x8833 792 | #define GL_DRAW_BUFFER15_NV 0x8834 793 | #define GL_COLOR_ATTACHMENT0_NV 0x8CE0 794 | #define GL_COLOR_ATTACHMENT1_NV 0x8CE1 795 | #define GL_COLOR_ATTACHMENT2_NV 0x8CE2 796 | #define GL_COLOR_ATTACHMENT3_NV 0x8CE3 797 | #define GL_COLOR_ATTACHMENT4_NV 0x8CE4 798 | #define GL_COLOR_ATTACHMENT5_NV 0x8CE5 799 | #define GL_COLOR_ATTACHMENT6_NV 0x8CE6 800 | #define GL_COLOR_ATTACHMENT7_NV 0x8CE7 801 | #define GL_COLOR_ATTACHMENT8_NV 0x8CE8 802 | #define GL_COLOR_ATTACHMENT9_NV 0x8CE9 803 | #define GL_COLOR_ATTACHMENT10_NV 0x8CEA 804 | #define GL_COLOR_ATTACHMENT11_NV 0x8CEB 805 | #define GL_COLOR_ATTACHMENT12_NV 0x8CEC 806 | #define GL_COLOR_ATTACHMENT13_NV 0x8CED 807 | #define GL_COLOR_ATTACHMENT14_NV 0x8CEE 808 | #define GL_COLOR_ATTACHMENT15_NV 0x8CEF 809 | #endif 810 | 811 | /* GL_NV_draw_instanced */ 812 | /* No new tokens introduced by this extension. */ 813 | 814 | /* GL_NV_fbo_color_attachments */ 815 | #ifndef GL_NV_fbo_color_attachments 816 | #define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF 817 | /* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ 818 | #endif 819 | 820 | /* GL_NV_fence */ 821 | #ifndef GL_NV_fence 822 | #define GL_ALL_COMPLETED_NV 0x84F2 823 | #define GL_FENCE_STATUS_NV 0x84F3 824 | #define GL_FENCE_CONDITION_NV 0x84F4 825 | #endif 826 | 827 | /* GL_NV_framebuffer_blit */ 828 | #ifndef GL_NV_framebuffer_blit 829 | #define GL_READ_FRAMEBUFFER_NV 0x8CA8 830 | #define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 831 | #define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 832 | #define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA 833 | #endif 834 | 835 | /* GL_NV_framebuffer_multisample */ 836 | #ifndef GL_NV_framebuffer_multisample 837 | #define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB 838 | #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 839 | #define GL_MAX_SAMPLES_NV 0x8D57 840 | #endif 841 | 842 | /* GL_NV_generate_mipmap_sRGB */ 843 | /* No new tokens introduced by this extension. */ 844 | 845 | /* GL_NV_instanced_arrays */ 846 | #ifndef GL_NV_instanced_arrays 847 | #define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE 848 | #endif 849 | 850 | /* GL_NV_read_buffer */ 851 | #ifndef GL_NV_read_buffer 852 | #define GL_READ_BUFFER_NV 0x0C02 853 | #endif 854 | 855 | /* GL_NV_read_buffer_front */ 856 | /* No new tokens introduced by this extension. */ 857 | 858 | /* GL_NV_read_depth */ 859 | /* No new tokens introduced by this extension. */ 860 | 861 | /* GL_NV_read_depth_stencil */ 862 | /* No new tokens introduced by this extension. */ 863 | 864 | /* GL_NV_read_stencil */ 865 | /* No new tokens introduced by this extension. */ 866 | 867 | /* GL_NV_shadow_samplers_array */ 868 | #ifndef GL_NV_shadow_samplers_array 869 | #define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 870 | #endif 871 | 872 | /* GL_NV_shadow_samplers_cube */ 873 | #ifndef GL_NV_shadow_samplers_cube 874 | #define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 875 | #endif 876 | 877 | /* GL_NV_sRGB_formats */ 878 | #ifndef GL_NV_sRGB_formats 879 | #define GL_SLUMINANCE_NV 0x8C46 880 | #define GL_SLUMINANCE_ALPHA_NV 0x8C44 881 | #define GL_SRGB8_NV 0x8C41 882 | #define GL_SLUMINANCE8_NV 0x8C47 883 | #define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 884 | #define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C 885 | #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D 886 | #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E 887 | #define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F 888 | #define GL_ETC1_SRGB8_NV 0x88EE 889 | #endif 890 | 891 | /* GL_NV_texture_border_clamp */ 892 | #ifndef GL_NV_texture_border_clamp 893 | #define GL_TEXTURE_BORDER_COLOR_NV 0x1004 894 | #define GL_CLAMP_TO_BORDER_NV 0x812D 895 | #endif 896 | 897 | /* GL_NV_texture_compression_s3tc_update */ 898 | /* No new tokens introduced by this extension. */ 899 | 900 | /* GL_NV_texture_npot_2D_mipmap */ 901 | /* No new tokens introduced by this extension. */ 902 | 903 | /*------------------------------------------------------------------------* 904 | * QCOM extension tokens 905 | *------------------------------------------------------------------------*/ 906 | 907 | /* GL_QCOM_alpha_test */ 908 | #ifndef GL_QCOM_alpha_test 909 | #define GL_ALPHA_TEST_QCOM 0x0BC0 910 | #define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 911 | #define GL_ALPHA_TEST_REF_QCOM 0x0BC2 912 | #endif 913 | 914 | /* GL_QCOM_binning_control */ 915 | #ifndef GL_QCOM_binning_control 916 | #define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 917 | #define GL_CPU_OPTIMIZED_QCOM 0x8FB1 918 | #define GL_GPU_OPTIMIZED_QCOM 0x8FB2 919 | #define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 920 | #endif 921 | 922 | /* GL_QCOM_driver_control */ 923 | /* No new tokens introduced by this extension. */ 924 | 925 | /* GL_QCOM_extended_get */ 926 | #ifndef GL_QCOM_extended_get 927 | #define GL_TEXTURE_WIDTH_QCOM 0x8BD2 928 | #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 929 | #define GL_TEXTURE_DEPTH_QCOM 0x8BD4 930 | #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 931 | #define GL_TEXTURE_FORMAT_QCOM 0x8BD6 932 | #define GL_TEXTURE_TYPE_QCOM 0x8BD7 933 | #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 934 | #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 935 | #define GL_TEXTURE_TARGET_QCOM 0x8BDA 936 | #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB 937 | #define GL_STATE_RESTORE 0x8BDC 938 | #endif 939 | 940 | /* GL_QCOM_extended_get2 */ 941 | /* No new tokens introduced by this extension. */ 942 | 943 | /* GL_QCOM_perfmon_global_mode */ 944 | #ifndef GL_QCOM_perfmon_global_mode 945 | #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 946 | #endif 947 | 948 | /* GL_QCOM_writeonly_rendering */ 949 | #ifndef GL_QCOM_writeonly_rendering 950 | #define GL_WRITEONLY_RENDERING_QCOM 0x8823 951 | #endif 952 | 953 | /* GL_QCOM_tiled_rendering */ 954 | #ifndef GL_QCOM_tiled_rendering 955 | #define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 956 | #define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 957 | #define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 958 | #define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 959 | #define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 960 | #define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 961 | #define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 962 | #define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 963 | #define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 964 | #define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 965 | #define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 966 | #define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 967 | #define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 968 | #define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 969 | #define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 970 | #define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 971 | #define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 972 | #define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 973 | #define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 974 | #define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 975 | #define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 976 | #define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 977 | #define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 978 | #define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 979 | #define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 980 | #define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 981 | #define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 982 | #define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 983 | #define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 984 | #define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 985 | #define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 986 | #define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 987 | #endif 988 | 989 | /*------------------------------------------------------------------------* 990 | * VIV extension tokens 991 | *------------------------------------------------------------------------*/ 992 | 993 | /* GL_VIV_shader_binary */ 994 | #ifndef GL_VIV_shader_binary 995 | #define GL_SHADER_BINARY_VIV 0x8FC4 996 | #endif 997 | 998 | /*------------------------------------------------------------------------* 999 | * End of extension tokens, start of corresponding extension functions 1000 | *------------------------------------------------------------------------*/ 1001 | 1002 | /*------------------------------------------------------------------------* 1003 | * OES extension functions 1004 | *------------------------------------------------------------------------*/ 1005 | 1006 | /* GL_OES_compressed_ETC1_RGB8_texture */ 1007 | #ifndef GL_OES_compressed_ETC1_RGB8_texture 1008 | #define GL_OES_compressed_ETC1_RGB8_texture 1 1009 | #endif 1010 | 1011 | /* GL_OES_compressed_paletted_texture */ 1012 | #ifndef GL_OES_compressed_paletted_texture 1013 | #define GL_OES_compressed_paletted_texture 1 1014 | #endif 1015 | 1016 | /* GL_OES_depth24 */ 1017 | #ifndef GL_OES_depth24 1018 | #define GL_OES_depth24 1 1019 | #endif 1020 | 1021 | /* GL_OES_depth32 */ 1022 | #ifndef GL_OES_depth32 1023 | #define GL_OES_depth32 1 1024 | #endif 1025 | 1026 | /* GL_OES_depth_texture */ 1027 | #ifndef GL_OES_depth_texture 1028 | #define GL_OES_depth_texture 1 1029 | #endif 1030 | 1031 | /* GL_OES_EGL_image */ 1032 | #ifndef GL_OES_EGL_image 1033 | #define GL_OES_EGL_image 1 1034 | #ifdef GL_GLEXT_PROTOTYPES 1035 | GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); 1036 | GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); 1037 | #endif 1038 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); 1039 | typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); 1040 | #endif 1041 | 1042 | /* GL_OES_EGL_image_external */ 1043 | #ifndef GL_OES_EGL_image_external 1044 | #define GL_OES_EGL_image_external 1 1045 | /* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ 1046 | #endif 1047 | 1048 | /* GL_OES_element_index_uint */ 1049 | #ifndef GL_OES_element_index_uint 1050 | #define GL_OES_element_index_uint 1 1051 | #endif 1052 | 1053 | /* GL_OES_fbo_render_mipmap */ 1054 | #ifndef GL_OES_fbo_render_mipmap 1055 | #define GL_OES_fbo_render_mipmap 1 1056 | #endif 1057 | 1058 | /* GL_OES_fragment_precision_high */ 1059 | #ifndef GL_OES_fragment_precision_high 1060 | #define GL_OES_fragment_precision_high 1 1061 | #endif 1062 | 1063 | /* GL_OES_get_program_binary */ 1064 | #ifndef GL_OES_get_program_binary 1065 | #define GL_OES_get_program_binary 1 1066 | #ifdef GL_GLEXT_PROTOTYPES 1067 | GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); 1068 | GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); 1069 | #endif 1070 | typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); 1071 | typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); 1072 | #endif 1073 | 1074 | /* GL_OES_mapbuffer */ 1075 | #ifndef GL_OES_mapbuffer 1076 | #define GL_OES_mapbuffer 1 1077 | #ifdef GL_GLEXT_PROTOTYPES 1078 | GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); 1079 | GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); 1080 | GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params); 1081 | #endif 1082 | typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); 1083 | typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); 1084 | typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params); 1085 | #endif 1086 | 1087 | /* GL_OES_packed_depth_stencil */ 1088 | #ifndef GL_OES_packed_depth_stencil 1089 | #define GL_OES_packed_depth_stencil 1 1090 | #endif 1091 | 1092 | /* GL_OES_required_internalformat */ 1093 | #ifndef GL_OES_required_internalformat 1094 | #define GL_OES_required_internalformat 1 1095 | #endif 1096 | 1097 | /* GL_OES_rgb8_rgba8 */ 1098 | #ifndef GL_OES_rgb8_rgba8 1099 | #define GL_OES_rgb8_rgba8 1 1100 | #endif 1101 | 1102 | /* GL_OES_standard_derivatives */ 1103 | #ifndef GL_OES_standard_derivatives 1104 | #define GL_OES_standard_derivatives 1 1105 | #endif 1106 | 1107 | /* GL_OES_stencil1 */ 1108 | #ifndef GL_OES_stencil1 1109 | #define GL_OES_stencil1 1 1110 | #endif 1111 | 1112 | /* GL_OES_stencil4 */ 1113 | #ifndef GL_OES_stencil4 1114 | #define GL_OES_stencil4 1 1115 | #endif 1116 | 1117 | #ifndef GL_OES_surfaceless_context 1118 | #define GL_OES_surfaceless_context 1 1119 | #endif 1120 | 1121 | /* GL_OES_texture_3D */ 1122 | #ifndef GL_OES_texture_3D 1123 | #define GL_OES_texture_3D 1 1124 | #ifdef GL_GLEXT_PROTOTYPES 1125 | 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 GLvoid* pixels); 1126 | 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 GLvoid* pixels); 1127 | GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); 1128 | GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); 1129 | 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 GLvoid* data); 1130 | GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); 1131 | #endif 1132 | typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); 1133 | typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); 1134 | typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); 1135 | typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); 1136 | typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); 1137 | typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); 1138 | #endif 1139 | 1140 | /* GL_OES_texture_float */ 1141 | #ifndef GL_OES_texture_float 1142 | #define GL_OES_texture_float 1 1143 | #endif 1144 | 1145 | /* GL_OES_texture_float_linear */ 1146 | #ifndef GL_OES_texture_float_linear 1147 | #define GL_OES_texture_float_linear 1 1148 | #endif 1149 | 1150 | /* GL_OES_texture_half_float */ 1151 | #ifndef GL_OES_texture_half_float 1152 | #define GL_OES_texture_half_float 1 1153 | #endif 1154 | 1155 | /* GL_OES_texture_half_float_linear */ 1156 | #ifndef GL_OES_texture_half_float_linear 1157 | #define GL_OES_texture_half_float_linear 1 1158 | #endif 1159 | 1160 | /* GL_OES_texture_npot */ 1161 | #ifndef GL_OES_texture_npot 1162 | #define GL_OES_texture_npot 1 1163 | #endif 1164 | 1165 | /* GL_OES_vertex_array_object */ 1166 | #ifndef GL_OES_vertex_array_object 1167 | #define GL_OES_vertex_array_object 1 1168 | #ifdef GL_GLEXT_PROTOTYPES 1169 | GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); 1170 | GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); 1171 | GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); 1172 | GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); 1173 | #endif 1174 | typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); 1175 | typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); 1176 | typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); 1177 | typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); 1178 | #endif 1179 | 1180 | /* GL_OES_vertex_half_float */ 1181 | #ifndef GL_OES_vertex_half_float 1182 | #define GL_OES_vertex_half_float 1 1183 | #endif 1184 | 1185 | /* GL_OES_vertex_type_10_10_10_2 */ 1186 | #ifndef GL_OES_vertex_type_10_10_10_2 1187 | #define GL_OES_vertex_type_10_10_10_2 1 1188 | #endif 1189 | 1190 | /*------------------------------------------------------------------------* 1191 | * KHR extension functions 1192 | *------------------------------------------------------------------------*/ 1193 | 1194 | #ifndef GL_KHR_debug 1195 | #define GL_KHR_debug 1 1196 | #ifdef GL_GLEXT_PROTOTYPES 1197 | GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); 1198 | GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); 1199 | GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); 1200 | GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); 1201 | GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message); 1202 | GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void); 1203 | GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); 1204 | GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); 1205 | GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); 1206 | GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); 1207 | GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params); 1208 | #endif 1209 | typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); 1210 | typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); 1211 | typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam); 1212 | typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); 1213 | typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); 1214 | typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void); 1215 | typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); 1216 | typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); 1217 | typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); 1218 | typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); 1219 | typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params); 1220 | #endif 1221 | 1222 | #ifndef GL_KHR_texture_compression_astc_ldr 1223 | #define GL_KHR_texture_compression_astc_ldr 1 1224 | #endif 1225 | 1226 | 1227 | /*------------------------------------------------------------------------* 1228 | * AMD extension functions 1229 | *------------------------------------------------------------------------*/ 1230 | 1231 | /* GL_AMD_compressed_3DC_texture */ 1232 | #ifndef GL_AMD_compressed_3DC_texture 1233 | #define GL_AMD_compressed_3DC_texture 1 1234 | #endif 1235 | 1236 | /* GL_AMD_compressed_ATC_texture */ 1237 | #ifndef GL_AMD_compressed_ATC_texture 1238 | #define GL_AMD_compressed_ATC_texture 1 1239 | #endif 1240 | 1241 | /* AMD_performance_monitor */ 1242 | #ifndef GL_AMD_performance_monitor 1243 | #define GL_AMD_performance_monitor 1 1244 | #ifdef GL_GLEXT_PROTOTYPES 1245 | GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); 1246 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); 1247 | GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); 1248 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); 1249 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); 1250 | GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); 1251 | GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); 1252 | GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); 1253 | GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); 1254 | GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); 1255 | GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); 1256 | #endif 1257 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); 1258 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); 1259 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); 1260 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); 1261 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); 1262 | typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); 1263 | typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); 1264 | typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); 1265 | typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); 1266 | typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); 1267 | typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); 1268 | #endif 1269 | 1270 | /* GL_AMD_program_binary_Z400 */ 1271 | #ifndef GL_AMD_program_binary_Z400 1272 | #define GL_AMD_program_binary_Z400 1 1273 | #endif 1274 | 1275 | /*------------------------------------------------------------------------* 1276 | * ANGLE extension functions 1277 | *------------------------------------------------------------------------*/ 1278 | 1279 | /* GL_ANGLE_depth_texture */ 1280 | #ifndef GL_ANGLE_depth_texture 1281 | #define GL_ANGLE_depth_texture 1 1282 | #endif 1283 | 1284 | /* GL_ANGLE_framebuffer_blit */ 1285 | #ifndef GL_ANGLE_framebuffer_blit 1286 | #define GL_ANGLE_framebuffer_blit 1 1287 | #ifdef GL_GLEXT_PROTOTYPES 1288 | GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 1289 | #endif 1290 | typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 1291 | #endif 1292 | 1293 | /* GL_ANGLE_framebuffer_multisample */ 1294 | #ifndef GL_ANGLE_framebuffer_multisample 1295 | #define GL_ANGLE_framebuffer_multisample 1 1296 | #ifdef GL_GLEXT_PROTOTYPES 1297 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1298 | #endif 1299 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1300 | #endif 1301 | 1302 | #ifndef GL_ANGLE_instanced_arrays 1303 | #define GL_ANGLE_instanced_arrays 1 1304 | #ifdef GL_GLEXT_PROTOTYPES 1305 | GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1306 | GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); 1307 | GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); 1308 | #endif 1309 | typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1310 | typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); 1311 | typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); 1312 | #endif 1313 | 1314 | /* GL_ANGLE_pack_reverse_row_order */ 1315 | #ifndef GL_ANGLE_pack_reverse_row_order 1316 | #define GL_ANGLE_pack_reverse_row_order 1 1317 | #endif 1318 | 1319 | /* GL_ANGLE_program_binary */ 1320 | #ifndef GL_ANGLE_program_binary 1321 | #define GL_ANGLE_program_binary 1 1322 | #endif 1323 | 1324 | /* GL_ANGLE_texture_compression_dxt3 */ 1325 | #ifndef GL_ANGLE_texture_compression_dxt3 1326 | #define GL_ANGLE_texture_compression_dxt3 1 1327 | #endif 1328 | 1329 | /* GL_ANGLE_texture_compression_dxt5 */ 1330 | #ifndef GL_ANGLE_texture_compression_dxt5 1331 | #define GL_ANGLE_texture_compression_dxt5 1 1332 | #endif 1333 | 1334 | /* GL_ANGLE_texture_usage */ 1335 | #ifndef GL_ANGLE_texture_usage 1336 | #define GL_ANGLE_texture_usage 1 1337 | #endif 1338 | 1339 | #ifndef GL_ANGLE_translated_shader_source 1340 | #define GL_ANGLE_translated_shader_source 1 1341 | #ifdef GL_GLEXT_PROTOTYPES 1342 | GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); 1343 | #endif 1344 | typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); 1345 | #endif 1346 | 1347 | /*------------------------------------------------------------------------* 1348 | * APPLE extension functions 1349 | *------------------------------------------------------------------------*/ 1350 | 1351 | /* GL_APPLE_copy_texture_levels */ 1352 | #ifndef GL_APPLE_copy_texture_levels 1353 | #define GL_APPLE_copy_texture_levels 1 1354 | #ifdef GL_GLEXT_PROTOTYPES 1355 | GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); 1356 | #endif 1357 | typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); 1358 | #endif 1359 | 1360 | /* GL_APPLE_framebuffer_multisample */ 1361 | #ifndef GL_APPLE_framebuffer_multisample 1362 | #define GL_APPLE_framebuffer_multisample 1 1363 | #ifdef GL_GLEXT_PROTOTYPES 1364 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); 1365 | GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); 1366 | #endif /* GL_GLEXT_PROTOTYPES */ 1367 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1368 | typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); 1369 | #endif 1370 | 1371 | /* GL_APPLE_rgb_422 */ 1372 | #ifndef GL_APPLE_rgb_422 1373 | #define GL_APPLE_rgb_422 1 1374 | #endif 1375 | 1376 | /* GL_APPLE_sync */ 1377 | #ifndef GL_APPLE_sync 1378 | #define GL_APPLE_sync 1 1379 | #ifdef GL_GLEXT_PROTOTYPES 1380 | GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); 1381 | GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); 1382 | GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); 1383 | GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); 1384 | GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); 1385 | GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); 1386 | GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); 1387 | #endif 1388 | typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); 1389 | typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); 1390 | typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); 1391 | typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); 1392 | typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); 1393 | typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); 1394 | typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); 1395 | #endif 1396 | 1397 | /* GL_APPLE_texture_format_BGRA8888 */ 1398 | #ifndef GL_APPLE_texture_format_BGRA8888 1399 | #define GL_APPLE_texture_format_BGRA8888 1 1400 | #endif 1401 | 1402 | /* GL_APPLE_texture_max_level */ 1403 | #ifndef GL_APPLE_texture_max_level 1404 | #define GL_APPLE_texture_max_level 1 1405 | #endif 1406 | 1407 | /*------------------------------------------------------------------------* 1408 | * ARM extension functions 1409 | *------------------------------------------------------------------------*/ 1410 | 1411 | /* GL_ARM_mali_program_binary */ 1412 | #ifndef GL_ARM_mali_program_binary 1413 | #define GL_ARM_mali_program_binary 1 1414 | #endif 1415 | 1416 | /* GL_ARM_mali_shader_binary */ 1417 | #ifndef GL_ARM_mali_shader_binary 1418 | #define GL_ARM_mali_shader_binary 1 1419 | #endif 1420 | 1421 | /* GL_ARM_rgba8 */ 1422 | #ifndef GL_ARM_rgba8 1423 | #define GL_ARM_rgba8 1 1424 | #endif 1425 | 1426 | /*------------------------------------------------------------------------* 1427 | * EXT extension functions 1428 | *------------------------------------------------------------------------*/ 1429 | 1430 | /* GL_EXT_blend_minmax */ 1431 | #ifndef GL_EXT_blend_minmax 1432 | #define GL_EXT_blend_minmax 1 1433 | #endif 1434 | 1435 | /* GL_EXT_color_buffer_half_float */ 1436 | #ifndef GL_EXT_color_buffer_half_float 1437 | #define GL_EXT_color_buffer_half_float 1 1438 | #endif 1439 | 1440 | /* GL_EXT_debug_label */ 1441 | #ifndef GL_EXT_debug_label 1442 | #define GL_EXT_debug_label 1 1443 | #ifdef GL_GLEXT_PROTOTYPES 1444 | GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); 1445 | GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); 1446 | #endif 1447 | typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); 1448 | typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); 1449 | #endif 1450 | 1451 | /* GL_EXT_debug_marker */ 1452 | #ifndef GL_EXT_debug_marker 1453 | #define GL_EXT_debug_marker 1 1454 | #ifdef GL_GLEXT_PROTOTYPES 1455 | GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); 1456 | GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); 1457 | GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); 1458 | #endif 1459 | typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); 1460 | typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); 1461 | typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); 1462 | #endif 1463 | 1464 | /* GL_EXT_discard_framebuffer */ 1465 | #ifndef GL_EXT_discard_framebuffer 1466 | #define GL_EXT_discard_framebuffer 1 1467 | #ifdef GL_GLEXT_PROTOTYPES 1468 | GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); 1469 | #endif 1470 | typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); 1471 | #endif 1472 | 1473 | #ifndef GL_EXT_disjoint_timer_query 1474 | #define GL_EXT_disjoint_timer_query 1 1475 | #ifdef GL_GLEXT_PROTOTYPES 1476 | GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); 1477 | GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); 1478 | GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); 1479 | GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); 1480 | GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); 1481 | GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target); 1482 | GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); 1483 | GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params); 1484 | GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); 1485 | GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); 1486 | GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); 1487 | #endif 1488 | typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); 1489 | typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); 1490 | typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); 1491 | typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); 1492 | typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); 1493 | typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target); 1494 | typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); 1495 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params); 1496 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); 1497 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); 1498 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); 1499 | #endif /* GL_EXT_disjoint_timer_query */ 1500 | 1501 | #ifndef GL_EXT_draw_buffers 1502 | #define GL_EXT_draw_buffers 1 1503 | #ifdef GL_GLEXT_PROTOTYPES 1504 | GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); 1505 | #endif 1506 | typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); 1507 | #endif /* GL_EXT_draw_buffers */ 1508 | 1509 | /* GL_EXT_map_buffer_range */ 1510 | #ifndef GL_EXT_map_buffer_range 1511 | #define GL_EXT_map_buffer_range 1 1512 | #ifdef GL_GLEXT_PROTOTYPES 1513 | GL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); 1514 | GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); 1515 | #endif 1516 | typedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); 1517 | typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); 1518 | #endif 1519 | 1520 | /* GL_EXT_multisampled_render_to_texture */ 1521 | #ifndef GL_EXT_multisampled_render_to_texture 1522 | #define GL_EXT_multisampled_render_to_texture 1 1523 | #ifdef GL_GLEXT_PROTOTYPES 1524 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei); 1525 | GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); 1526 | #endif 1527 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1528 | typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); 1529 | #endif 1530 | 1531 | /* GL_EXT_multiview_draw_buffers */ 1532 | #ifndef GL_EXT_multiview_draw_buffers 1533 | #define GL_EXT_multiview_draw_buffers 1 1534 | #ifdef GL_GLEXT_PROTOTYPES 1535 | GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); 1536 | GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); 1537 | GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); 1538 | #endif 1539 | typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); 1540 | typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); 1541 | typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); 1542 | #endif 1543 | 1544 | #ifndef GL_EXT_multi_draw_arrays 1545 | #define GL_EXT_multi_draw_arrays 1 1546 | #ifdef GL_GLEXT_PROTOTYPES 1547 | GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, const GLint *, const GLsizei *, GLsizei); 1548 | GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); 1549 | #endif /* GL_GLEXT_PROTOTYPES */ 1550 | typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); 1551 | typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); 1552 | #endif 1553 | 1554 | /* GL_EXT_occlusion_query_boolean */ 1555 | #ifndef GL_EXT_occlusion_query_boolean 1556 | #define GL_EXT_occlusion_query_boolean 1 1557 | #ifdef GL_GLEXT_PROTOTYPES 1558 | GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); 1559 | GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); 1560 | GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); 1561 | GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); 1562 | GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); 1563 | GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); 1564 | GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); 1565 | #endif 1566 | typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); 1567 | typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); 1568 | typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); 1569 | typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); 1570 | typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); 1571 | typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); 1572 | typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); 1573 | #endif 1574 | 1575 | /* GL_EXT_read_format_bgra */ 1576 | #ifndef GL_EXT_read_format_bgra 1577 | #define GL_EXT_read_format_bgra 1 1578 | #endif 1579 | 1580 | /* GL_EXT_robustness */ 1581 | #ifndef GL_EXT_robustness 1582 | #define GL_EXT_robustness 1 1583 | #ifdef GL_GLEXT_PROTOTYPES 1584 | GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); 1585 | GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); 1586 | GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params); 1587 | GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); 1588 | #endif 1589 | typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); 1590 | typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); 1591 | typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params); 1592 | typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); 1593 | #endif 1594 | 1595 | /* GL_EXT_separate_shader_objects */ 1596 | #ifndef GL_EXT_separate_shader_objects 1597 | #define GL_EXT_separate_shader_objects 1 1598 | #ifdef GL_GLEXT_PROTOTYPES 1599 | GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); 1600 | GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); 1601 | GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); 1602 | GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); 1603 | GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); 1604 | GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); 1605 | GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); 1606 | GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); 1607 | GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); 1608 | GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x); 1609 | GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y); 1610 | GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z); 1611 | GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); 1612 | GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x); 1613 | GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y); 1614 | GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); 1615 | GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 1616 | GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1617 | GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1618 | GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1619 | GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); 1620 | GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1621 | GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1622 | GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1623 | GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1624 | GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1625 | GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1626 | GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1627 | GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); 1628 | GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); 1629 | #endif 1630 | typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); 1631 | typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); 1632 | typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); 1633 | typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); 1634 | typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); 1635 | typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); 1636 | typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); 1637 | typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); 1638 | typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); 1639 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x); 1640 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y); 1641 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z); 1642 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w); 1643 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x); 1644 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y); 1645 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z); 1646 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 1647 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1648 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1649 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1650 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); 1651 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1652 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1653 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1654 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); 1655 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1656 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1657 | typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); 1658 | typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); 1659 | typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); 1660 | #endif 1661 | 1662 | /* GL_EXT_shader_framebuffer_fetch */ 1663 | #ifndef GL_EXT_shader_framebuffer_fetch 1664 | #define GL_EXT_shader_framebuffer_fetch 1 1665 | #endif 1666 | 1667 | /* GL_EXT_shader_texture_lod */ 1668 | #ifndef GL_EXT_shader_texture_lod 1669 | #define GL_EXT_shader_texture_lod 1 1670 | #endif 1671 | 1672 | /* GL_EXT_shadow_samplers */ 1673 | #ifndef GL_EXT_shadow_samplers 1674 | #define GL_EXT_shadow_samplers 1 1675 | #endif 1676 | 1677 | /* GL_EXT_sRGB */ 1678 | #ifndef GL_EXT_sRGB 1679 | #define GL_EXT_sRGB 1 1680 | #endif 1681 | 1682 | /* GL_EXT_texture_compression_dxt1 */ 1683 | #ifndef GL_EXT_texture_compression_dxt1 1684 | #define GL_EXT_texture_compression_dxt1 1 1685 | #endif 1686 | 1687 | /* GL_EXT_texture_filter_anisotropic */ 1688 | #ifndef GL_EXT_texture_filter_anisotropic 1689 | #define GL_EXT_texture_filter_anisotropic 1 1690 | #endif 1691 | 1692 | /* GL_EXT_texture_format_BGRA8888 */ 1693 | #ifndef GL_EXT_texture_format_BGRA8888 1694 | #define GL_EXT_texture_format_BGRA8888 1 1695 | #endif 1696 | 1697 | /* GL_EXT_texture_rg */ 1698 | #ifndef GL_EXT_texture_rg 1699 | #define GL_EXT_texture_rg 1 1700 | #endif 1701 | 1702 | /* GL_EXT_texture_storage */ 1703 | #ifndef GL_EXT_texture_storage 1704 | #define GL_EXT_texture_storage 1 1705 | #ifdef GL_GLEXT_PROTOTYPES 1706 | GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1707 | GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1708 | GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1709 | GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1710 | GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1711 | GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1712 | #endif 1713 | typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1714 | typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1715 | typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1716 | typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); 1717 | typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); 1718 | typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); 1719 | #endif 1720 | 1721 | /* GL_EXT_texture_type_2_10_10_10_REV */ 1722 | #ifndef GL_EXT_texture_type_2_10_10_10_REV 1723 | #define GL_EXT_texture_type_2_10_10_10_REV 1 1724 | #endif 1725 | 1726 | /* GL_EXT_unpack_subimage */ 1727 | #ifndef GL_EXT_unpack_subimage 1728 | #define GL_EXT_unpack_subimage 1 1729 | #endif 1730 | 1731 | /*------------------------------------------------------------------------* 1732 | * DMP extension functions 1733 | *------------------------------------------------------------------------*/ 1734 | 1735 | /* GL_DMP_shader_binary */ 1736 | #ifndef GL_DMP_shader_binary 1737 | #define GL_DMP_shader_binary 1 1738 | #endif 1739 | 1740 | /*------------------------------------------------------------------------* 1741 | * FJ extension functions 1742 | *------------------------------------------------------------------------*/ 1743 | 1744 | /* GL_FJ_shader_binary_GCCSO */ 1745 | #ifndef GL_FJ_shader_binary_GCCSO 1746 | #define GL_FJ_shader_binary_GCCSO 1 1747 | #endif 1748 | 1749 | /*------------------------------------------------------------------------* 1750 | * IMG extension functions 1751 | *------------------------------------------------------------------------*/ 1752 | 1753 | /* GL_IMG_program_binary */ 1754 | #ifndef GL_IMG_program_binary 1755 | #define GL_IMG_program_binary 1 1756 | #endif 1757 | 1758 | /* GL_IMG_read_format */ 1759 | #ifndef GL_IMG_read_format 1760 | #define GL_IMG_read_format 1 1761 | #endif 1762 | 1763 | /* GL_IMG_shader_binary */ 1764 | #ifndef GL_IMG_shader_binary 1765 | #define GL_IMG_shader_binary 1 1766 | #endif 1767 | 1768 | /* GL_IMG_texture_compression_pvrtc */ 1769 | #ifndef GL_IMG_texture_compression_pvrtc 1770 | #define GL_IMG_texture_compression_pvrtc 1 1771 | #endif 1772 | 1773 | /* GL_IMG_texture_compression_pvrtc2 */ 1774 | #ifndef GL_IMG_texture_compression_pvrtc2 1775 | #define GL_IMG_texture_compression_pvrtc2 1 1776 | #endif 1777 | 1778 | /* GL_IMG_multisampled_render_to_texture */ 1779 | #ifndef GL_IMG_multisampled_render_to_texture 1780 | #define GL_IMG_multisampled_render_to_texture 1 1781 | #ifdef GL_GLEXT_PROTOTYPES 1782 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); 1783 | GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); 1784 | #endif 1785 | typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1786 | typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); 1787 | #endif 1788 | 1789 | /*------------------------------------------------------------------------* 1790 | * NV extension functions 1791 | *------------------------------------------------------------------------*/ 1792 | 1793 | /* GL_NV_coverage_sample */ 1794 | #ifndef GL_NV_coverage_sample 1795 | #define GL_NV_coverage_sample 1 1796 | #ifdef GL_GLEXT_PROTOTYPES 1797 | GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); 1798 | GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); 1799 | #endif 1800 | typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); 1801 | typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); 1802 | #endif 1803 | 1804 | /* GL_NV_depth_nonlinear */ 1805 | #ifndef GL_NV_depth_nonlinear 1806 | #define GL_NV_depth_nonlinear 1 1807 | #endif 1808 | 1809 | /* GL_NV_draw_buffers */ 1810 | #ifndef GL_NV_draw_buffers 1811 | #define GL_NV_draw_buffers 1 1812 | #ifdef GL_GLEXT_PROTOTYPES 1813 | GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); 1814 | #endif 1815 | typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); 1816 | #endif 1817 | 1818 | /* GL_NV_draw_instanced */ 1819 | #ifndef GL_NV_draw_instanced 1820 | #define GL_NV_draw_instanced 1 1821 | #ifdef GL_GLEXT_PROTOTYPES 1822 | GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1823 | GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); 1824 | #endif 1825 | typedef void (GL_APIENTRYP PFNDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); 1826 | typedef void (GL_APIENTRYP PFNDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); 1827 | #endif 1828 | 1829 | /* GL_NV_fbo_color_attachments */ 1830 | #ifndef GL_NV_fbo_color_attachments 1831 | #define GL_NV_fbo_color_attachments 1 1832 | #endif 1833 | 1834 | /* GL_NV_fence */ 1835 | #ifndef GL_NV_fence 1836 | #define GL_NV_fence 1 1837 | #ifdef GL_GLEXT_PROTOTYPES 1838 | GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); 1839 | GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); 1840 | GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint); 1841 | GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint); 1842 | GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); 1843 | GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint); 1844 | GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum); 1845 | #endif 1846 | typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); 1847 | typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); 1848 | typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); 1849 | typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); 1850 | typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); 1851 | typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); 1852 | typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); 1853 | #endif 1854 | 1855 | /* GL_NV_framebuffer_blit */ 1856 | #ifndef GL_NV_framebuffer_blit 1857 | #define GL_NV_framebuffer_blit 1 1858 | #ifdef GL_GLEXT_PROTOTYPES 1859 | GL_APICALL void GL_APIENTRY glBlitFramebufferNV (int srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 1860 | #endif 1861 | typedef void (GL_APIENTRYP PFNBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); 1862 | #endif 1863 | 1864 | /* GL_NV_framebuffer_multisample */ 1865 | #ifndef GL_NV_framebuffer_multisample 1866 | #define GL_NV_framebuffer_multisample 1 1867 | #ifdef GL_GLEXT_PROTOTYPES 1868 | GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1869 | #endif 1870 | typedef void (GL_APIENTRYP PFNRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); 1871 | #endif 1872 | 1873 | /* GL_NV_generate_mipmap_sRGB */ 1874 | #ifndef GL_NV_generate_mipmap_sRGB 1875 | #define GL_NV_generate_mipmap_sRGB 1 1876 | #endif 1877 | 1878 | /* GL_NV_instanced_arrays */ 1879 | #ifndef GL_NV_instanced_arrays 1880 | #define GL_NV_instanced_arrays 1 1881 | #ifdef GL_GLEXT_PROTOTYPES 1882 | GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); 1883 | #endif 1884 | typedef void (GL_APIENTRYP PFNVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); 1885 | #endif 1886 | 1887 | /* GL_NV_read_buffer */ 1888 | #ifndef GL_NV_read_buffer 1889 | #define GL_NV_read_buffer 1 1890 | #ifdef GL_GLEXT_PROTOTYPES 1891 | GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); 1892 | #endif 1893 | typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); 1894 | #endif 1895 | 1896 | /* GL_NV_read_buffer_front */ 1897 | #ifndef GL_NV_read_buffer_front 1898 | #define GL_NV_read_buffer_front 1 1899 | #endif 1900 | 1901 | /* GL_NV_read_depth */ 1902 | #ifndef GL_NV_read_depth 1903 | #define GL_NV_read_depth 1 1904 | #endif 1905 | 1906 | /* GL_NV_read_depth_stencil */ 1907 | #ifndef GL_NV_read_depth_stencil 1908 | #define GL_NV_read_depth_stencil 1 1909 | #endif 1910 | 1911 | /* GL_NV_read_stencil */ 1912 | #ifndef GL_NV_read_stencil 1913 | #define GL_NV_read_stencil 1 1914 | #endif 1915 | 1916 | /* GL_NV_shadow_samplers_array */ 1917 | #ifndef GL_NV_shadow_samplers_array 1918 | #define GL_NV_shadow_samplers_array 1 1919 | #endif 1920 | 1921 | /* GL_NV_shadow_samplers_cube */ 1922 | #ifndef GL_NV_shadow_samplers_cube 1923 | #define GL_NV_shadow_samplers_cube 1 1924 | #endif 1925 | 1926 | /* GL_NV_sRGB_formats */ 1927 | #ifndef GL_NV_sRGB_formats 1928 | #define GL_NV_sRGB_formats 1 1929 | #endif 1930 | 1931 | /* GL_NV_texture_border_clamp */ 1932 | #ifndef GL_NV_texture_border_clamp 1933 | #define GL_NV_texture_border_clamp 1 1934 | #endif 1935 | 1936 | /* GL_NV_texture_compression_s3tc_update */ 1937 | #ifndef GL_NV_texture_compression_s3tc_update 1938 | #define GL_NV_texture_compression_s3tc_update 1 1939 | #endif 1940 | 1941 | /* GL_NV_texture_npot_2D_mipmap */ 1942 | #ifndef GL_NV_texture_npot_2D_mipmap 1943 | #define GL_NV_texture_npot_2D_mipmap 1 1944 | #endif 1945 | 1946 | /*------------------------------------------------------------------------* 1947 | * QCOM extension functions 1948 | *------------------------------------------------------------------------*/ 1949 | 1950 | /* GL_QCOM_alpha_test */ 1951 | #ifndef GL_QCOM_alpha_test 1952 | #define GL_QCOM_alpha_test 1 1953 | #ifdef GL_GLEXT_PROTOTYPES 1954 | GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); 1955 | #endif 1956 | typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); 1957 | #endif 1958 | 1959 | /* GL_QCOM_binning_control */ 1960 | #ifndef GL_QCOM_binning_control 1961 | #define GL_QCOM_binning_control 1 1962 | #endif 1963 | 1964 | /* GL_QCOM_driver_control */ 1965 | #ifndef GL_QCOM_driver_control 1966 | #define GL_QCOM_driver_control 1 1967 | #ifdef GL_GLEXT_PROTOTYPES 1968 | GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); 1969 | GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); 1970 | GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); 1971 | GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); 1972 | #endif 1973 | typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); 1974 | typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); 1975 | typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); 1976 | typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); 1977 | #endif 1978 | 1979 | /* GL_QCOM_extended_get */ 1980 | #ifndef GL_QCOM_extended_get 1981 | #define GL_QCOM_extended_get 1 1982 | #ifdef GL_GLEXT_PROTOTYPES 1983 | GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); 1984 | GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); 1985 | GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); 1986 | GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); 1987 | GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); 1988 | GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); 1989 | GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); 1990 | GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); 1991 | #endif 1992 | typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); 1993 | typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); 1994 | typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); 1995 | typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); 1996 | typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); 1997 | typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); 1998 | typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); 1999 | typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); 2000 | #endif 2001 | 2002 | /* GL_QCOM_extended_get2 */ 2003 | #ifndef GL_QCOM_extended_get2 2004 | #define GL_QCOM_extended_get2 1 2005 | #ifdef GL_GLEXT_PROTOTYPES 2006 | GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); 2007 | GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); 2008 | GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); 2009 | GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); 2010 | #endif 2011 | typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); 2012 | typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); 2013 | typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); 2014 | typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); 2015 | #endif 2016 | 2017 | /* GL_QCOM_perfmon_global_mode */ 2018 | #ifndef GL_QCOM_perfmon_global_mode 2019 | #define GL_QCOM_perfmon_global_mode 1 2020 | #endif 2021 | 2022 | /* GL_QCOM_writeonly_rendering */ 2023 | #ifndef GL_QCOM_writeonly_rendering 2024 | #define GL_QCOM_writeonly_rendering 1 2025 | #endif 2026 | 2027 | /* GL_QCOM_tiled_rendering */ 2028 | #ifndef GL_QCOM_tiled_rendering 2029 | #define GL_QCOM_tiled_rendering 1 2030 | #ifdef GL_GLEXT_PROTOTYPES 2031 | GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); 2032 | GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); 2033 | #endif 2034 | typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); 2035 | typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); 2036 | #endif 2037 | 2038 | /*------------------------------------------------------------------------* 2039 | * VIV extension tokens 2040 | *------------------------------------------------------------------------*/ 2041 | 2042 | /* GL_VIV_shader_binary */ 2043 | #ifndef GL_VIV_shader_binary 2044 | #define GL_VIV_shader_binary 1 2045 | #endif 2046 | 2047 | #ifdef __cplusplus 2048 | } 2049 | #endif 2050 | 2051 | #endif /* __gl2ext_h_ */ 2052 | -------------------------------------------------------------------------------- /include/GLES2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | #include 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /include/KHR/khrplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __khrplatform_h_ 2 | #define __khrplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2008-2009 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Khronos platform-specific types and definitions. 28 | * 29 | * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ 30 | * 31 | * Adopters may modify this file to suit their platform. Adopters are 32 | * encouraged to submit platform specific modifications to the Khronos 33 | * group so that they can be included in future versions of this file. 34 | * Please submit changes by sending them to the public Khronos Bugzilla 35 | * (http://khronos.org/bugzilla) by filing a bug against product 36 | * "Khronos (general)" component "Registry". 37 | * 38 | * A predefined template which fills in some of the bug fields can be 39 | * reached using http://tinyurl.com/khrplatform-h-bugreport, but you 40 | * must create a Bugzilla login first. 41 | * 42 | * 43 | * See the Implementer's Guidelines for information about where this file 44 | * should be located on your system and for more details of its use: 45 | * http://www.khronos.org/registry/implementers_guide.pdf 46 | * 47 | * This file should be included as 48 | * #include 49 | * by Khronos client API header files that use its types and defines. 50 | * 51 | * The types in khrplatform.h should only be used to define API-specific types. 52 | * 53 | * Types defined in khrplatform.h: 54 | * khronos_int8_t signed 8 bit 55 | * khronos_uint8_t unsigned 8 bit 56 | * khronos_int16_t signed 16 bit 57 | * khronos_uint16_t unsigned 16 bit 58 | * khronos_int32_t signed 32 bit 59 | * khronos_uint32_t unsigned 32 bit 60 | * khronos_int64_t signed 64 bit 61 | * khronos_uint64_t unsigned 64 bit 62 | * khronos_intptr_t signed same number of bits as a pointer 63 | * khronos_uintptr_t unsigned same number of bits as a pointer 64 | * khronos_ssize_t signed size 65 | * khronos_usize_t unsigned size 66 | * khronos_float_t signed 32 bit floating point 67 | * khronos_time_ns_t unsigned 64 bit time in nanoseconds 68 | * khronos_utime_nanoseconds_t unsigned time interval or absolute time in 69 | * nanoseconds 70 | * khronos_stime_nanoseconds_t signed time interval in nanoseconds 71 | * khronos_boolean_enum_t enumerated boolean type. This should 72 | * only be used as a base type when a client API's boolean type is 73 | * an enum. Client APIs which use an integer or other type for 74 | * booleans cannot use this as the base type for their boolean. 75 | * 76 | * Tokens defined in khrplatform.h: 77 | * 78 | * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. 79 | * 80 | * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. 81 | * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. 82 | * 83 | * Calling convention macros defined in this file: 84 | * KHRONOS_APICALL 85 | * KHRONOS_APIENTRY 86 | * KHRONOS_APIATTRIBUTES 87 | * 88 | * These may be used in function prototypes as: 89 | * 90 | * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( 91 | * int arg1, 92 | * int arg2) KHRONOS_APIATTRIBUTES; 93 | */ 94 | 95 | /*------------------------------------------------------------------------- 96 | * Definition of KHRONOS_APICALL 97 | *------------------------------------------------------------------------- 98 | * This precedes the return type of the function in the function prototype. 99 | */ 100 | #if defined(_WIN32) && !defined(__SCITECH_SNAP__) 101 | # if defined(KHRONOS_DLL_EXPORTS) 102 | # define KHRONOS_APICALL __declspec(dllexport) 103 | # else 104 | # define KHRONOS_APICALL __declspec(dllimport) 105 | # endif 106 | #elif defined (__SYMBIAN32__) 107 | # define KHRONOS_APICALL IMPORT_C 108 | #elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \ 109 | || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) 110 | /* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */ 111 | # define KHRONOS_APICALL __attribute__((visibility("default"))) 112 | #else 113 | # define KHRONOS_APICALL 114 | #endif 115 | 116 | /*------------------------------------------------------------------------- 117 | * Definition of KHRONOS_APIENTRY 118 | *------------------------------------------------------------------------- 119 | * This follows the return type of the function and precedes the function 120 | * name in the function prototype. 121 | */ 122 | #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) 123 | /* Win32 but not WinCE */ 124 | # define KHRONOS_APIENTRY __stdcall 125 | #else 126 | # define KHRONOS_APIENTRY 127 | #endif 128 | 129 | /*------------------------------------------------------------------------- 130 | * Definition of KHRONOS_APIATTRIBUTES 131 | *------------------------------------------------------------------------- 132 | * This follows the closing parenthesis of the function prototype arguments. 133 | */ 134 | #if defined (__ARMCC_2__) 135 | #define KHRONOS_APIATTRIBUTES __softfp 136 | #else 137 | #define KHRONOS_APIATTRIBUTES 138 | #endif 139 | 140 | /*------------------------------------------------------------------------- 141 | * basic type definitions 142 | *-----------------------------------------------------------------------*/ 143 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) 144 | 145 | 146 | /* 147 | * Using 148 | */ 149 | #include 150 | typedef int32_t khronos_int32_t; 151 | typedef uint32_t khronos_uint32_t; 152 | typedef int64_t khronos_int64_t; 153 | typedef uint64_t khronos_uint64_t; 154 | #define KHRONOS_SUPPORT_INT64 1 155 | #define KHRONOS_SUPPORT_FLOAT 1 156 | 157 | #elif defined(__VMS ) || defined(__sgi) 158 | 159 | /* 160 | * Using 161 | */ 162 | #include 163 | typedef int32_t khronos_int32_t; 164 | typedef uint32_t khronos_uint32_t; 165 | typedef int64_t khronos_int64_t; 166 | typedef uint64_t khronos_uint64_t; 167 | #define KHRONOS_SUPPORT_INT64 1 168 | #define KHRONOS_SUPPORT_FLOAT 1 169 | 170 | #elif defined(_WIN32) && !defined(__SCITECH_SNAP__) 171 | 172 | /* 173 | * Win32 174 | */ 175 | typedef __int32 khronos_int32_t; 176 | typedef unsigned __int32 khronos_uint32_t; 177 | typedef __int64 khronos_int64_t; 178 | typedef unsigned __int64 khronos_uint64_t; 179 | #define KHRONOS_SUPPORT_INT64 1 180 | #define KHRONOS_SUPPORT_FLOAT 1 181 | 182 | #elif defined(__sun__) || defined(__digital__) 183 | 184 | /* 185 | * Sun or Digital 186 | */ 187 | typedef int khronos_int32_t; 188 | typedef unsigned int khronos_uint32_t; 189 | #if defined(__arch64__) || defined(_LP64) 190 | typedef long int khronos_int64_t; 191 | typedef unsigned long int khronos_uint64_t; 192 | #else 193 | typedef long long int khronos_int64_t; 194 | typedef unsigned long long int khronos_uint64_t; 195 | #endif /* __arch64__ */ 196 | #define KHRONOS_SUPPORT_INT64 1 197 | #define KHRONOS_SUPPORT_FLOAT 1 198 | 199 | #elif 0 200 | 201 | /* 202 | * Hypothetical platform with no float or int64 support 203 | */ 204 | typedef int khronos_int32_t; 205 | typedef unsigned int khronos_uint32_t; 206 | #define KHRONOS_SUPPORT_INT64 0 207 | #define KHRONOS_SUPPORT_FLOAT 0 208 | 209 | #else 210 | 211 | /* 212 | * Generic fallback 213 | */ 214 | #include 215 | typedef int32_t khronos_int32_t; 216 | typedef uint32_t khronos_uint32_t; 217 | typedef int64_t khronos_int64_t; 218 | typedef uint64_t khronos_uint64_t; 219 | #define KHRONOS_SUPPORT_INT64 1 220 | #define KHRONOS_SUPPORT_FLOAT 1 221 | 222 | #endif 223 | 224 | 225 | /* 226 | * Types that are (so far) the same on all platforms 227 | */ 228 | typedef signed char khronos_int8_t; 229 | typedef unsigned char khronos_uint8_t; 230 | typedef signed short int khronos_int16_t; 231 | typedef unsigned short int khronos_uint16_t; 232 | typedef signed long int khronos_intptr_t; 233 | typedef unsigned long int khronos_uintptr_t; 234 | typedef signed long int khronos_ssize_t; 235 | typedef unsigned long int khronos_usize_t; 236 | 237 | #if KHRONOS_SUPPORT_FLOAT 238 | /* 239 | * Float type 240 | */ 241 | typedef float khronos_float_t; 242 | #endif 243 | 244 | #if KHRONOS_SUPPORT_INT64 245 | /* Time types 246 | * 247 | * These types can be used to represent a time interval in nanoseconds or 248 | * an absolute Unadjusted System Time. Unadjusted System Time is the number 249 | * of nanoseconds since some arbitrary system event (e.g. since the last 250 | * time the system booted). The Unadjusted System Time is an unsigned 251 | * 64 bit value that wraps back to 0 every 584 years. Time intervals 252 | * may be either signed or unsigned. 253 | */ 254 | typedef khronos_uint64_t khronos_utime_nanoseconds_t; 255 | typedef khronos_int64_t khronos_stime_nanoseconds_t; 256 | #endif 257 | 258 | /* 259 | * Dummy value used to pad enum types to 32 bits. 260 | */ 261 | #ifndef KHRONOS_MAX_ENUM 262 | #define KHRONOS_MAX_ENUM 0x7FFFFFFF 263 | #endif 264 | 265 | /* 266 | * Enumerated boolean type 267 | * 268 | * Values other than zero should be considered to be true. Therefore 269 | * comparisons should not be made against KHRONOS_TRUE. 270 | */ 271 | typedef enum { 272 | KHRONOS_FALSE = 0, 273 | KHRONOS_TRUE = 1, 274 | KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM 275 | } khronos_boolean_enum_t; 276 | 277 | #endif /* __khrplatform_h_ */ 278 | -------------------------------------------------------------------------------- /include/README: -------------------------------------------------------------------------------- 1 | Based on the ones from Mesa. 2 | --------------------------------------------------------------------------------