include/SDL_egl.h
author Philipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 05 Apr 2014 23:32:41 +0200
changeset 8695 a672c01a4ab7
parent 8663 308e74493106
child 8761 bce4122e6e87
permissions -rw-r--r--
Fixed names of four hint environment variables.
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 
    22 /**
    23  *  \file SDL_opengles.h
    24  *
    25  *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
    26  */
    27 #ifndef _MSC_VER
    28 
    29 #include <EGL/egl.h>
    30 
    31 #else /* _MSC_VER */
    32 
    33 /* EGL headers for Visual Studio */
    34 
    35 #ifndef __khrplatform_h_
    36 #define __khrplatform_h_
    37 
    38 /*
    39 ** Copyright (c) 2008-2009 The Khronos Group Inc.
    40 **
    41 ** Permission is hereby granted, free of charge, to any person obtaining a
    42 ** copy of this software and/or associated documentation files (the
    43 ** "Materials"), to deal in the Materials without restriction, including
    44 ** without limitation the rights to use, copy, modify, merge, publish,
    45 ** distribute, sublicense, and/or sell copies of the Materials, and to
    46 ** permit persons to whom the Materials are furnished to do so, subject to
    47 ** the following conditions:
    48 **
    49 ** The above copyright notice and this permission notice shall be included
    50 ** in all copies or substantial portions of the Materials.
    51 **
    52 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    53 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    54 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    55 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    56 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    57 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    58 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
    59 */
    60 
    61 /* Khronos platform-specific types and definitions.
    62 *
    63 * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
    64 *
    65 * Adopters may modify this file to suit their platform. Adopters are
    66 * encouraged to submit platform specific modifications to the Khronos
    67 * group so that they can be included in future versions of this file.
    68 * Please submit changes by sending them to the public Khronos Bugzilla
    69 * (http://khronos.org/bugzilla) by filing a bug against product
    70 * "Khronos (general)" component "Registry".
    71 *
    72 * A predefined template which fills in some of the bug fields can be
    73 * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
    74 * must create a Bugzilla login first.
    75 *
    76 *
    77 * See the Implementer's Guidelines for information about where this file
    78 * should be located on your system and for more details of its use:
    79 *    http://www.khronos.org/registry/implementers_guide.pdf
    80 *
    81 * This file should be included as
    82 *        #include <KHR/khrplatform.h>
    83 * by Khronos client API header files that use its types and defines.
    84 *
    85 * The types in khrplatform.h should only be used to define API-specific types.
    86 *
    87 * Types defined in khrplatform.h:
    88 *    khronos_int8_t              signed   8  bit
    89 *    khronos_uint8_t             unsigned 8  bit
    90 *    khronos_int16_t             signed   16 bit
    91 *    khronos_uint16_t            unsigned 16 bit
    92 *    khronos_int32_t             signed   32 bit
    93 *    khronos_uint32_t            unsigned 32 bit
    94 *    khronos_int64_t             signed   64 bit
    95 *    khronos_uint64_t            unsigned 64 bit
    96 *    khronos_intptr_t            signed   same number of bits as a pointer
    97 *    khronos_uintptr_t           unsigned same number of bits as a pointer
    98 *    khronos_ssize_t             signed   size
    99 *    khronos_usize_t             unsigned size
   100 *    khronos_float_t             signed   32 bit floating point
   101 *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds
   102 *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in
   103 *                                         nanoseconds
   104 *    khronos_stime_nanoseconds_t signed time interval in nanoseconds
   105 *    khronos_boolean_enum_t      enumerated boolean type. This should
   106 *      only be used as a base type when a client API's boolean type is
   107 *      an enum. Client APIs which use an integer or other type for
   108 *      booleans cannot use this as the base type for their boolean.
   109 *
   110 * Tokens defined in khrplatform.h:
   111 *
   112 *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
   113 *
   114 *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
   115 *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
   116 *
   117 * Calling convention macros defined in this file:
   118 *    KHRONOS_APICALL
   119 *    KHRONOS_APIENTRY
   120 *    KHRONOS_APIATTRIBUTES
   121 *
   122 * These may be used in function prototypes as:
   123 *
   124 *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
   125 *                                  int arg1,
   126 *                                  int arg2) KHRONOS_APIATTRIBUTES;
   127 */
   128 
   129 /*-------------------------------------------------------------------------
   130 * Definition of KHRONOS_APICALL
   131 *-------------------------------------------------------------------------
   132 * This precedes the return type of the function in the function prototype.
   133 */
   134 #if defined(_WIN32) && !defined(__SCITECH_SNAP__)
   135 #   define KHRONOS_APICALL __declspec(dllimport)
   136 #elif defined (__SYMBIAN32__)
   137 #   define KHRONOS_APICALL IMPORT_C
   138 #else
   139 #   define KHRONOS_APICALL
   140 #endif
   141 
   142 /*-------------------------------------------------------------------------
   143 * Definition of KHRONOS_APIENTRY
   144 *-------------------------------------------------------------------------
   145 * This follows the return type of the function  and precedes the function
   146 * name in the function prototype.
   147 */
   148 #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
   149 /* Win32 but not WinCE */
   150 #   define KHRONOS_APIENTRY __stdcall
   151 #else
   152 #   define KHRONOS_APIENTRY
   153 #endif
   154 
   155 /*-------------------------------------------------------------------------
   156 * Definition of KHRONOS_APIATTRIBUTES
   157 *-------------------------------------------------------------------------
   158 * This follows the closing parenthesis of the function prototype arguments.
   159 */
   160 #if defined (__ARMCC_2__)
   161 #define KHRONOS_APIATTRIBUTES __softfp
   162 #else
   163 #define KHRONOS_APIATTRIBUTES
   164 #endif
   165 
   166 /*-------------------------------------------------------------------------
   167 * basic type definitions
   168 *-----------------------------------------------------------------------*/
   169 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
   170 
   171 
   172 /*
   173 * Using <stdint.h>
   174 */
   175 #include <stdint.h>
   176 typedef int32_t                 khronos_int32_t;
   177 typedef uint32_t                khronos_uint32_t;
   178 typedef int64_t                 khronos_int64_t;
   179 typedef uint64_t                khronos_uint64_t;
   180 #define KHRONOS_SUPPORT_INT64   1
   181 #define KHRONOS_SUPPORT_FLOAT   1
   182 
   183 #elif defined(__VMS ) || defined(__sgi)
   184 
   185 /*
   186 * Using <inttypes.h>
   187 */
   188 #include <inttypes.h>
   189 typedef int32_t                 khronos_int32_t;
   190 typedef uint32_t                khronos_uint32_t;
   191 typedef int64_t                 khronos_int64_t;
   192 typedef uint64_t                khronos_uint64_t;
   193 #define KHRONOS_SUPPORT_INT64   1
   194 #define KHRONOS_SUPPORT_FLOAT   1
   195 
   196 #elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
   197 
   198 /*
   199 * Win32
   200 */
   201 typedef __int32                 khronos_int32_t;
   202 typedef unsigned __int32        khronos_uint32_t;
   203 typedef __int64                 khronos_int64_t;
   204 typedef unsigned __int64        khronos_uint64_t;
   205 #define KHRONOS_SUPPORT_INT64   1
   206 #define KHRONOS_SUPPORT_FLOAT   1
   207 
   208 #elif defined(__sun__) || defined(__digital__)
   209 
   210 /*
   211 * Sun or Digital
   212 */
   213 typedef int                     khronos_int32_t;
   214 typedef unsigned int            khronos_uint32_t;
   215 #if defined(__arch64__) || defined(_LP64)
   216 typedef long int                khronos_int64_t;
   217 typedef unsigned long int       khronos_uint64_t;
   218 #else
   219 typedef long long int           khronos_int64_t;
   220 typedef unsigned long long int  khronos_uint64_t;
   221 #endif /* __arch64__ */
   222 #define KHRONOS_SUPPORT_INT64   1
   223 #define KHRONOS_SUPPORT_FLOAT   1
   224 
   225 #elif 0
   226 
   227 /*
   228 * Hypothetical platform with no float or int64 support
   229 */
   230 typedef int                     khronos_int32_t;
   231 typedef unsigned int            khronos_uint32_t;
   232 #define KHRONOS_SUPPORT_INT64   0
   233 #define KHRONOS_SUPPORT_FLOAT   0
   234 
   235 #else
   236 
   237 /*
   238 * Generic fallback
   239 */
   240 #include <stdint.h>
   241 typedef int32_t                 khronos_int32_t;
   242 typedef uint32_t                khronos_uint32_t;
   243 typedef int64_t                 khronos_int64_t;
   244 typedef uint64_t                khronos_uint64_t;
   245 #define KHRONOS_SUPPORT_INT64   1
   246 #define KHRONOS_SUPPORT_FLOAT   1
   247 
   248 #endif
   249 
   250 
   251 /*
   252 * Types that are (so far) the same on all platforms
   253 */
   254 typedef signed   char          khronos_int8_t;
   255 typedef unsigned char          khronos_uint8_t;
   256 typedef signed   short int     khronos_int16_t;
   257 typedef unsigned short int     khronos_uint16_t;
   258 
   259 /*
   260 * Types that differ between LLP64 and LP64 architectures - in LLP64,
   261 * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
   262 * to be the only LLP64 architecture in current use.
   263 */
   264 #ifdef _WIN64
   265 typedef signed   long long int khronos_intptr_t;
   266 typedef unsigned long long int khronos_uintptr_t;
   267 typedef signed   long long int khronos_ssize_t;
   268 typedef unsigned long long int khronos_usize_t;
   269 #else
   270 typedef signed   long  int     khronos_intptr_t;
   271 typedef unsigned long  int     khronos_uintptr_t;
   272 typedef signed   long  int     khronos_ssize_t;
   273 typedef unsigned long  int     khronos_usize_t;
   274 #endif
   275 
   276 #if KHRONOS_SUPPORT_FLOAT
   277 /*
   278 * Float type
   279 */
   280 typedef          float         khronos_float_t;
   281 #endif
   282 
   283 #if KHRONOS_SUPPORT_INT64
   284 /* Time types
   285 *
   286 * These types can be used to represent a time interval in nanoseconds or
   287 * an absolute Unadjusted System Time.  Unadjusted System Time is the number
   288 * of nanoseconds since some arbitrary system event (e.g. since the last
   289 * time the system booted).  The Unadjusted System Time is an unsigned
   290 * 64 bit value that wraps back to 0 every 584 years.  Time intervals
   291 * may be either signed or unsigned.
   292 */
   293 typedef khronos_uint64_t       khronos_utime_nanoseconds_t;
   294 typedef khronos_int64_t        khronos_stime_nanoseconds_t;
   295 #endif
   296 
   297 /*
   298 * Dummy value used to pad enum types to 32 bits.
   299 */
   300 #ifndef KHRONOS_MAX_ENUM
   301 #define KHRONOS_MAX_ENUM 0x7FFFFFFF
   302 #endif
   303 
   304 /*
   305 * Enumerated boolean type
   306 *
   307 * Values other than zero should be considered to be true.  Therefore
   308 * comparisons should not be made against KHRONOS_TRUE.
   309 */
   310 typedef enum {
   311     KHRONOS_FALSE = 0,
   312     KHRONOS_TRUE = 1,
   313     KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
   314 } khronos_boolean_enum_t;
   315 
   316 #endif /* __khrplatform_h_ */
   317 
   318 
   319 #ifndef __eglplatform_h_
   320 #define __eglplatform_h_
   321 
   322 /*
   323 ** Copyright (c) 2007-2009 The Khronos Group Inc.
   324 **
   325 ** Permission is hereby granted, free of charge, to any person obtaining a
   326 ** copy of this software and/or associated documentation files (the
   327 ** "Materials"), to deal in the Materials without restriction, including
   328 ** without limitation the rights to use, copy, modify, merge, publish,
   329 ** distribute, sublicense, and/or sell copies of the Materials, and to
   330 ** permit persons to whom the Materials are furnished to do so, subject to
   331 ** the following conditions:
   332 **
   333 ** The above copyright notice and this permission notice shall be included
   334 ** in all copies or substantial portions of the Materials.
   335 **
   336 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   337 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   338 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   339 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   340 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   341 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   342 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
   343 */
   344 
   345 /* Platform-specific types and definitions for egl.h
   346 * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
   347 *
   348 * Adopters may modify khrplatform.h and this file to suit their platform.
   349 * You are encouraged to submit all modifications to the Khronos group so that
   350 * they can be included in future versions of this file.  Please submit changes
   351 * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
   352 * by filing a bug against product "EGL" component "Registry".
   353 */
   354 
   355 /*#include <KHR/khrplatform.h>*/
   356 
   357 /* Macros used in EGL function prototype declarations.
   358 *
   359 * EGL functions should be prototyped as:
   360 *
   361 * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
   362 * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
   363 *
   364 * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
   365 */
   366 
   367 #ifndef EGLAPI
   368 #define EGLAPI KHRONOS_APICALL
   369 #endif
   370 
   371 #ifndef EGLAPIENTRY
   372 #define EGLAPIENTRY  KHRONOS_APIENTRY
   373 #endif
   374 #define EGLAPIENTRYP EGLAPIENTRY*
   375 
   376 /* The types NativeDisplayType, NativeWindowType, and NativePixmapType
   377 * are aliases of window-system-dependent types, such as X Display * or
   378 * Windows Device Context. They must be defined in platform-specific
   379 * code below. The EGL-prefixed versions of Native*Type are the same
   380 * types, renamed in EGL 1.3 so all types in the API start with "EGL".
   381 *
   382 * Khronos STRONGLY RECOMMENDS that you use the default definitions
   383 * provided below, since these changes affect both binary and source
   384 * portability of applications using EGL running on different EGL
   385 * implementations.
   386 */
   387 
   388 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
   389 #ifndef WIN32_LEAN_AND_MEAN
   390 #define WIN32_LEAN_AND_MEAN 1
   391 #endif
   392 #include <windows.h>
   393 
   394 #if __WINRT__
   395 #include <Unknwn.h>
   396 typedef IUnknown * EGLNativeWindowType;
   397 typedef IUnknown * EGLNativePixmapType;
   398 typedef IUnknown * EGLNativeDisplayType;
   399 #else
   400 typedef HDC     EGLNativeDisplayType;
   401 typedef HBITMAP EGLNativePixmapType;
   402 typedef HWND    EGLNativeWindowType;
   403 #endif
   404 
   405 #elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
   406 
   407 typedef int   EGLNativeDisplayType;
   408 typedef void *EGLNativeWindowType;
   409 typedef void *EGLNativePixmapType;
   410 
   411 #elif defined(WL_EGL_PLATFORM)
   412 
   413 typedef struct wl_display     *EGLNativeDisplayType;
   414 typedef struct wl_egl_pixmap  *EGLNativePixmapType;
   415 typedef struct wl_egl_window  *EGLNativeWindowType;
   416 
   417 #elif defined(__GBM__)
   418 
   419 typedef struct gbm_device  *EGLNativeDisplayType;
   420 typedef struct gbm_bo      *EGLNativePixmapType;
   421 typedef void               *EGLNativeWindowType;
   422 
   423 #elif defined(ANDROID) /* Android */
   424 
   425 struct ANativeWindow;
   426 struct egl_native_pixmap_t;
   427 
   428 typedef struct ANativeWindow        *EGLNativeWindowType;
   429 typedef struct egl_native_pixmap_t  *EGLNativePixmapType;
   430 typedef void                        *EGLNativeDisplayType;
   431 
   432 #elif defined(MIR_EGL_PLATFORM)
   433 
   434 #include <mir_toolkit/mir_client_library.h>
   435 typedef MirEGLNativeDisplayType EGLNativeDisplayType;
   436 typedef void                   *EGLNativePixmapType;
   437 typedef MirEGLNativeWindowType  EGLNativeWindowType;
   438 
   439 #elif defined(__unix__)
   440 
   441 #ifdef MESA_EGL_NO_X11_HEADERS
   442 
   443 typedef void            *EGLNativeDisplayType;
   444 typedef khronos_uintptr_t EGLNativePixmapType;
   445 typedef khronos_uintptr_t EGLNativeWindowType;
   446 
   447 #else
   448 
   449 /* X11 (tentative)  */
   450 #include <X11/Xlib.h>
   451 #include <X11/Xutil.h>
   452 
   453 typedef Display *EGLNativeDisplayType;
   454 typedef Pixmap   EGLNativePixmapType;
   455 typedef Window   EGLNativeWindowType;
   456 
   457 #endif /* MESA_EGL_NO_X11_HEADERS */
   458 
   459 #else
   460 #error "Platform not recognized"
   461 #endif
   462 
   463 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
   464 typedef EGLNativeDisplayType NativeDisplayType;
   465 typedef EGLNativePixmapType  NativePixmapType;
   466 typedef EGLNativeWindowType  NativeWindowType;
   467 
   468 
   469 /* Define EGLint. This must be a signed integral type large enough to contain
   470 * all legal attribute names and values passed into and out of EGL, whether
   471 * their type is boolean, bitmask, enumerant (symbolic constant), integer,
   472 * handle, or other.  While in general a 32-bit integer will suffice, if
   473 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
   474 * integer type.
   475 */
   476 typedef khronos_int32_t EGLint;
   477 
   478 #endif /* __eglplatform_h */
   479 
   480 /* -*- mode: c; tab-width: 8; -*- */
   481 /* vi: set sw=4 ts=8: */
   482 /* Reference version of egl.h for EGL 1.4.
   483 * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
   484 */
   485 
   486 /*
   487 ** Copyright (c) 2007-2009 The Khronos Group Inc.
   488 **
   489 ** Permission is hereby granted, free of charge, to any person obtaining a
   490 ** copy of this software and/or associated documentation files (the
   491 ** "Materials"), to deal in the Materials without restriction, including
   492 ** without limitation the rights to use, copy, modify, merge, publish,
   493 ** distribute, sublicense, and/or sell copies of the Materials, and to
   494 ** permit persons to whom the Materials are furnished to do so, subject to
   495 ** the following conditions:
   496 **
   497 ** The above copyright notice and this permission notice shall be included
   498 ** in all copies or substantial portions of the Materials.
   499 **
   500 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   501 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   502 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   503 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   504 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   505 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   506 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
   507 */
   508 
   509 #ifndef __egl_h_
   510 #define __egl_h_
   511 
   512 /* All platform-dependent types and macro boilerplate (such as EGLAPI
   513 * and EGLAPIENTRY) should go in eglplatform.h.
   514 */
   515 /*#include <EGL/eglplatform.h>*/
   516 
   517 #ifdef __cplusplus
   518 extern "C" {
   519 #endif
   520 
   521     /* EGL Types */
   522     /* EGLint is defined in eglplatform.h */
   523     typedef unsigned int EGLBoolean;
   524     typedef unsigned int EGLenum;
   525     typedef void *EGLConfig;
   526     typedef void *EGLContext;
   527     typedef void *EGLDisplay;
   528     typedef void *EGLSurface;
   529     typedef void *EGLClientBuffer;
   530 
   531     /* EGL Versioning */
   532 #define EGL_VERSION_1_0			1
   533 #define EGL_VERSION_1_1			1
   534 #define EGL_VERSION_1_2			1
   535 #define EGL_VERSION_1_3			1
   536 #define EGL_VERSION_1_4			1
   537 
   538     /* EGL Enumerants. Bitmasks and other exceptional cases aside, most
   539     * enums are assigned unique values starting at 0x3000.
   540     */
   541 
   542     /* EGL aliases */
   543 #define EGL_FALSE			0
   544 #define EGL_TRUE			1
   545 
   546     /* Out-of-band handle values */
   547 #define EGL_DEFAULT_DISPLAY		((EGLNativeDisplayType)0)
   548 #define EGL_NO_CONTEXT			((EGLContext)0)
   549 #define EGL_NO_DISPLAY			((EGLDisplay)0)
   550 #define EGL_NO_SURFACE			((EGLSurface)0)
   551 
   552     /* Out-of-band attribute value */
   553 #define EGL_DONT_CARE			((EGLint)-1)
   554 
   555     /* Errors / GetError return values */
   556 #define EGL_SUCCESS			0x3000
   557 #define EGL_NOT_INITIALIZED		0x3001
   558 #define EGL_BAD_ACCESS			0x3002
   559 #define EGL_BAD_ALLOC			0x3003
   560 #define EGL_BAD_ATTRIBUTE		0x3004
   561 #define EGL_BAD_CONFIG			0x3005
   562 #define EGL_BAD_CONTEXT			0x3006
   563 #define EGL_BAD_CURRENT_SURFACE		0x3007
   564 #define EGL_BAD_DISPLAY			0x3008
   565 #define EGL_BAD_MATCH			0x3009
   566 #define EGL_BAD_NATIVE_PIXMAP		0x300A
   567 #define EGL_BAD_NATIVE_WINDOW		0x300B
   568 #define EGL_BAD_PARAMETER		0x300C
   569 #define EGL_BAD_SURFACE			0x300D
   570 #define EGL_CONTEXT_LOST		0x300E	/* EGL 1.1 - IMG_power_management */
   571 
   572     /* Reserved 0x300F-0x301F for additional errors */
   573 
   574     /* Config attributes */
   575 #define EGL_BUFFER_SIZE			0x3020
   576 #define EGL_ALPHA_SIZE			0x3021
   577 #define EGL_BLUE_SIZE			0x3022
   578 #define EGL_GREEN_SIZE			0x3023
   579 #define EGL_RED_SIZE			0x3024
   580 #define EGL_DEPTH_SIZE			0x3025
   581 #define EGL_STENCIL_SIZE		0x3026
   582 #define EGL_CONFIG_CAVEAT		0x3027
   583 #define EGL_CONFIG_ID			0x3028
   584 #define EGL_LEVEL			0x3029
   585 #define EGL_MAX_PBUFFER_HEIGHT		0x302A
   586 #define EGL_MAX_PBUFFER_PIXELS		0x302B
   587 #define EGL_MAX_PBUFFER_WIDTH		0x302C
   588 #define EGL_NATIVE_RENDERABLE		0x302D
   589 #define EGL_NATIVE_VISUAL_ID		0x302E
   590 #define EGL_NATIVE_VISUAL_TYPE		0x302F
   591 #define EGL_SAMPLES			0x3031
   592 #define EGL_SAMPLE_BUFFERS		0x3032
   593 #define EGL_SURFACE_TYPE		0x3033
   594 #define EGL_TRANSPARENT_TYPE		0x3034
   595 #define EGL_TRANSPARENT_BLUE_VALUE	0x3035
   596 #define EGL_TRANSPARENT_GREEN_VALUE	0x3036
   597 #define EGL_TRANSPARENT_RED_VALUE	0x3037
   598 #define EGL_NONE			0x3038	/* Attrib list terminator */
   599 #define EGL_BIND_TO_TEXTURE_RGB		0x3039
   600 #define EGL_BIND_TO_TEXTURE_RGBA	0x303A
   601 #define EGL_MIN_SWAP_INTERVAL		0x303B
   602 #define EGL_MAX_SWAP_INTERVAL		0x303C
   603 #define EGL_LUMINANCE_SIZE		0x303D
   604 #define EGL_ALPHA_MASK_SIZE		0x303E
   605 #define EGL_COLOR_BUFFER_TYPE		0x303F
   606 #define EGL_RENDERABLE_TYPE		0x3040
   607 #define EGL_MATCH_NATIVE_PIXMAP		0x3041	/* Pseudo-attribute (not queryable) */
   608 #define EGL_CONFORMANT			0x3042
   609 
   610     /* Reserved 0x3041-0x304F for additional config attributes */
   611 
   612     /* Config attribute values */
   613 #define EGL_SLOW_CONFIG			0x3050	/* EGL_CONFIG_CAVEAT value */
   614 #define EGL_NON_CONFORMANT_CONFIG	0x3051	/* EGL_CONFIG_CAVEAT value */
   615 #define EGL_TRANSPARENT_RGB		0x3052	/* EGL_TRANSPARENT_TYPE value */
   616 #define EGL_RGB_BUFFER			0x308E	/* EGL_COLOR_BUFFER_TYPE value */
   617 #define EGL_LUMINANCE_BUFFER		0x308F	/* EGL_COLOR_BUFFER_TYPE value */
   618 
   619     /* More config attribute values, for EGL_TEXTURE_FORMAT */
   620 #define EGL_NO_TEXTURE			0x305C
   621 #define EGL_TEXTURE_RGB			0x305D
   622 #define EGL_TEXTURE_RGBA		0x305E
   623 #define EGL_TEXTURE_2D			0x305F
   624 
   625     /* Config attribute mask bits */
   626 #define EGL_PBUFFER_BIT			0x0001	/* EGL_SURFACE_TYPE mask bits */
   627 #define EGL_PIXMAP_BIT			0x0002	/* EGL_SURFACE_TYPE mask bits */
   628 #define EGL_WINDOW_BIT			0x0004	/* EGL_SURFACE_TYPE mask bits */
   629 #define EGL_VG_COLORSPACE_LINEAR_BIT	0x0020	/* EGL_SURFACE_TYPE mask bits */
   630 #define EGL_VG_ALPHA_FORMAT_PRE_BIT	0x0040	/* EGL_SURFACE_TYPE mask bits */
   631 #define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200	/* EGL_SURFACE_TYPE mask bits */
   632 #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400	/* EGL_SURFACE_TYPE mask bits */
   633 
   634 #define EGL_OPENGL_ES_BIT		0x0001	/* EGL_RENDERABLE_TYPE mask bits */
   635 #define EGL_OPENVG_BIT			0x0002	/* EGL_RENDERABLE_TYPE mask bits */
   636 #define EGL_OPENGL_ES2_BIT		0x0004	/* EGL_RENDERABLE_TYPE mask bits */
   637 #define EGL_OPENGL_BIT			0x0008	/* EGL_RENDERABLE_TYPE mask bits */
   638 
   639     /* QueryString targets */
   640 #define EGL_VENDOR			0x3053
   641 #define EGL_VERSION			0x3054
   642 #define EGL_EXTENSIONS			0x3055
   643 #define EGL_CLIENT_APIS			0x308D
   644 
   645     /* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
   646 #define EGL_HEIGHT			0x3056
   647 #define EGL_WIDTH			0x3057
   648 #define EGL_LARGEST_PBUFFER		0x3058
   649 #define EGL_TEXTURE_FORMAT		0x3080
   650 #define EGL_TEXTURE_TARGET		0x3081
   651 #define EGL_MIPMAP_TEXTURE		0x3082
   652 #define EGL_MIPMAP_LEVEL		0x3083
   653 #define EGL_RENDER_BUFFER		0x3086
   654 #define EGL_VG_COLORSPACE		0x3087
   655 #define EGL_VG_ALPHA_FORMAT		0x3088
   656 #define EGL_HORIZONTAL_RESOLUTION	0x3090
   657 #define EGL_VERTICAL_RESOLUTION		0x3091
   658 #define EGL_PIXEL_ASPECT_RATIO		0x3092
   659 #define EGL_SWAP_BEHAVIOR		0x3093
   660 #define EGL_MULTISAMPLE_RESOLVE		0x3099
   661 
   662     /* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
   663 #define EGL_BACK_BUFFER			0x3084
   664 #define EGL_SINGLE_BUFFER		0x3085
   665 
   666     /* OpenVG color spaces */
   667 #define EGL_VG_COLORSPACE_sRGB		0x3089	/* EGL_VG_COLORSPACE value */
   668 #define EGL_VG_COLORSPACE_LINEAR	0x308A	/* EGL_VG_COLORSPACE value */
   669 
   670     /* OpenVG alpha formats */
   671 #define EGL_VG_ALPHA_FORMAT_NONPRE	0x308B	/* EGL_ALPHA_FORMAT value */
   672 #define EGL_VG_ALPHA_FORMAT_PRE		0x308C	/* EGL_ALPHA_FORMAT value */
   673 
   674     /* Constant scale factor by which fractional display resolutions &
   675     * aspect ratio are scaled when queried as integer values.
   676     */
   677 #define EGL_DISPLAY_SCALING		10000
   678 
   679     /* Unknown display resolution/aspect ratio */
   680 #define EGL_UNKNOWN			((EGLint)-1)
   681 
   682     /* Back buffer swap behaviors */
   683 #define EGL_BUFFER_PRESERVED		0x3094	/* EGL_SWAP_BEHAVIOR value */
   684 #define EGL_BUFFER_DESTROYED		0x3095	/* EGL_SWAP_BEHAVIOR value */
   685 
   686     /* CreatePbufferFromClientBuffer buffer types */
   687 #define EGL_OPENVG_IMAGE		0x3096
   688 
   689     /* QueryContext targets */
   690 #define EGL_CONTEXT_CLIENT_TYPE		0x3097
   691 
   692     /* CreateContext attributes */
   693 #define EGL_CONTEXT_CLIENT_VERSION	0x3098
   694 
   695     /* Multisample resolution behaviors */
   696 #define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A	/* EGL_MULTISAMPLE_RESOLVE value */
   697 #define EGL_MULTISAMPLE_RESOLVE_BOX	0x309B	/* EGL_MULTISAMPLE_RESOLVE value */
   698 
   699     /* BindAPI/QueryAPI targets */
   700 #define EGL_OPENGL_ES_API		0x30A0
   701 #define EGL_OPENVG_API			0x30A1
   702 #define EGL_OPENGL_API			0x30A2
   703 
   704     /* GetCurrentSurface targets */
   705 #define EGL_DRAW			0x3059
   706 #define EGL_READ			0x305A
   707 
   708     /* WaitNative engines */
   709 #define EGL_CORE_NATIVE_ENGINE		0x305B
   710 
   711     /* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
   712 #define EGL_COLORSPACE			EGL_VG_COLORSPACE
   713 #define EGL_ALPHA_FORMAT		EGL_VG_ALPHA_FORMAT
   714 #define EGL_COLORSPACE_sRGB		EGL_VG_COLORSPACE_sRGB
   715 #define EGL_COLORSPACE_LINEAR		EGL_VG_COLORSPACE_LINEAR
   716 #define EGL_ALPHA_FORMAT_NONPRE		EGL_VG_ALPHA_FORMAT_NONPRE
   717 #define EGL_ALPHA_FORMAT_PRE		EGL_VG_ALPHA_FORMAT_PRE
   718 
   719     /* EGL extensions must request enum blocks from the Khronos
   720     * API Registrar, who maintains the enumerant registry. Submit
   721     * a bug in Khronos Bugzilla against task "Registry".
   722     */
   723 
   724 
   725 
   726     /* EGL Functions */
   727 
   728     EGLAPI EGLint EGLAPIENTRY eglGetError(void);
   729 
   730     EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
   731     EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
   732     EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
   733 
   734     EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
   735 
   736     EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
   737         EGLint config_size, EGLint *num_config);
   738     EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
   739         EGLConfig *configs, EGLint config_size,
   740         EGLint *num_config);
   741     EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
   742         EGLint attribute, EGLint *value);
   743 
   744     EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
   745         EGLNativeWindowType win,
   746         const EGLint *attrib_list);
   747     EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
   748         const EGLint *attrib_list);
   749     EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
   750         EGLNativePixmapType pixmap,
   751         const EGLint *attrib_list);
   752     EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
   753     EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
   754         EGLint attribute, EGLint *value);
   755 
   756     EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
   757     EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
   758 
   759     EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
   760 
   761     EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
   762 
   763     EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
   764         EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
   765         EGLConfig config, const EGLint *attrib_list);
   766 
   767     EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
   768         EGLint attribute, EGLint value);
   769     EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
   770     EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
   771 
   772 
   773     EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
   774 
   775 
   776     EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
   777         EGLContext share_context,
   778         const EGLint *attrib_list);
   779     EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
   780     EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
   781         EGLSurface read, EGLContext ctx);
   782 
   783     EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
   784     EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
   785     EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
   786     EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
   787         EGLint attribute, EGLint *value);
   788 
   789     EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
   790     EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
   791     EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
   792     EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
   793         EGLNativePixmapType target);
   794 
   795     /* This is a generic function pointer type, whose name indicates it must
   796     * be cast to the proper type *and calling convention* before use.
   797     */
   798     typedef void(*__eglMustCastToProperFunctionPointerType)(void);
   799 
   800     /* Now, define eglGetProcAddress using the generic function ptr. type */
   801     EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
   802         eglGetProcAddress(const char *procname);
   803 
   804 #ifdef __cplusplus
   805 }
   806 #endif
   807 
   808 #endif /* __egl_h_ */
   809 
   810 
   811 
   812 
   813 #ifndef __eglext_h_
   814 #define __eglext_h_
   815 
   816 #ifdef __cplusplus
   817 extern "C" {
   818 #endif
   819 
   820     /*
   821     ** Copyright (c) 2007-2013 The Khronos Group Inc.
   822     **
   823     ** Permission is hereby granted, free of charge, to any person obtaining a
   824     ** copy of this software and/or associated documentation files (the
   825     ** "Materials"), to deal in the Materials without restriction, including
   826     ** without limitation the rights to use, copy, modify, merge, publish,
   827     ** distribute, sublicense, and/or sell copies of the Materials, and to
   828     ** permit persons to whom the Materials are furnished to do so, subject to
   829     ** the following conditions:
   830     **
   831     ** The above copyright notice and this permission notice shall be included
   832     ** in all copies or substantial portions of the Materials.
   833     **
   834     ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   835     ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   836     ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   837     ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   838     ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   839     ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   840     ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
   841     */
   842 
   843 /* #include <EGL/eglplatform.h> */
   844 
   845     /*************************************************************/
   846 
   847     /* Header file version number */
   848     /* Current version at http://www.khronos.org/registry/egl/ */
   849     /* $Revision: 21254 $ on $Date: 2013-04-25 03:11:55 -0700 (Thu, 25 Apr 2013) $ */
   850 #define EGL_EGLEXT_VERSION 16
   851 
   852 #ifndef EGL_KHR_config_attribs
   853 #define EGL_KHR_config_attribs 1
   854 #define EGL_CONFORMANT_KHR			0x3042	/* EGLConfig attribute */
   855 #define EGL_VG_COLORSPACE_LINEAR_BIT_KHR	0x0020	/* EGL_SURFACE_TYPE bitfield */
   856 #define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR		0x0040	/* EGL_SURFACE_TYPE bitfield */
   857 #endif
   858 
   859 #ifndef EGL_KHR_lock_surface
   860 #define EGL_KHR_lock_surface 1
   861 #define EGL_READ_SURFACE_BIT_KHR		0x0001	/* EGL_LOCK_USAGE_HINT_KHR bitfield */
   862 #define EGL_WRITE_SURFACE_BIT_KHR		0x0002	/* EGL_LOCK_USAGE_HINT_KHR bitfield */
   863 #define EGL_LOCK_SURFACE_BIT_KHR		0x0080	/* EGL_SURFACE_TYPE bitfield */
   864 #define EGL_OPTIMAL_FORMAT_BIT_KHR		0x0100	/* EGL_SURFACE_TYPE bitfield */
   865 #define EGL_MATCH_FORMAT_KHR			0x3043	/* EGLConfig attribute */
   866 #define EGL_FORMAT_RGB_565_EXACT_KHR		0x30C0	/* EGL_MATCH_FORMAT_KHR value */
   867 #define EGL_FORMAT_RGB_565_KHR			0x30C1	/* EGL_MATCH_FORMAT_KHR value */
   868 #define EGL_FORMAT_RGBA_8888_EXACT_KHR		0x30C2	/* EGL_MATCH_FORMAT_KHR value */
   869 #define EGL_FORMAT_RGBA_8888_KHR		0x30C3	/* EGL_MATCH_FORMAT_KHR value */
   870 #define EGL_MAP_PRESERVE_PIXELS_KHR		0x30C4	/* eglLockSurfaceKHR attribute */
   871 #define EGL_LOCK_USAGE_HINT_KHR			0x30C5	/* eglLockSurfaceKHR attribute */
   872 #define EGL_BITMAP_POINTER_KHR			0x30C6	/* eglQuerySurface attribute */
   873 #define EGL_BITMAP_PITCH_KHR			0x30C7	/* eglQuerySurface attribute */
   874 #define EGL_BITMAP_ORIGIN_KHR			0x30C8	/* eglQuerySurface attribute */
   875 #define EGL_BITMAP_PIXEL_RED_OFFSET_KHR		0x30C9	/* eglQuerySurface attribute */
   876 #define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR	0x30CA	/* eglQuerySurface attribute */
   877 #define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR	0x30CB	/* eglQuerySurface attribute */
   878 #define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR	0x30CC	/* eglQuerySurface attribute */
   879 #define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR	0x30CD	/* eglQuerySurface attribute */
   880 #define EGL_LOWER_LEFT_KHR			0x30CE	/* EGL_BITMAP_ORIGIN_KHR value */
   881 #define EGL_UPPER_LEFT_KHR			0x30CF	/* EGL_BITMAP_ORIGIN_KHR value */
   882 #ifdef EGL_EGLEXT_PROTOTYPES
   883     EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
   884     EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface);
   885 #endif /* EGL_EGLEXT_PROTOTYPES */
   886     typedef EGLBoolean(EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
   887     typedef EGLBoolean(EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
   888 #endif
   889 
   890 #ifndef EGL_KHR_image
   891 #define EGL_KHR_image 1
   892 #define EGL_NATIVE_PIXMAP_KHR			0x30B0	/* eglCreateImageKHR target */
   893     typedef void *EGLImageKHR;
   894 #define EGL_NO_IMAGE_KHR			((EGLImageKHR)0)
   895 #ifdef EGL_EGLEXT_PROTOTYPES
   896     EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
   897     EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image);
   898 #endif /* EGL_EGLEXT_PROTOTYPES */
   899     typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
   900     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
   901 #endif
   902 
   903 #ifndef EGL_KHR_vg_parent_image
   904 #define EGL_KHR_vg_parent_image 1
   905 #define EGL_VG_PARENT_IMAGE_KHR			0x30BA	/* eglCreateImageKHR target */
   906 #endif
   907 
   908 #ifndef EGL_KHR_gl_texture_2D_image
   909 #define EGL_KHR_gl_texture_2D_image 1
   910 #define EGL_GL_TEXTURE_2D_KHR			0x30B1	/* eglCreateImageKHR target */
   911 #define EGL_GL_TEXTURE_LEVEL_KHR		0x30BC	/* eglCreateImageKHR attribute */
   912 #endif
   913 
   914 #ifndef EGL_KHR_gl_texture_cubemap_image
   915 #define EGL_KHR_gl_texture_cubemap_image 1
   916 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR	0x30B3	/* eglCreateImageKHR target */
   917 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR	0x30B4	/* eglCreateImageKHR target */
   918 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR	0x30B5	/* eglCreateImageKHR target */
   919 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR	0x30B6	/* eglCreateImageKHR target */
   920 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR	0x30B7	/* eglCreateImageKHR target */
   921 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR	0x30B8	/* eglCreateImageKHR target */
   922 #endif
   923 
   924 #ifndef EGL_KHR_gl_texture_3D_image
   925 #define EGL_KHR_gl_texture_3D_image 1
   926 #define EGL_GL_TEXTURE_3D_KHR			0x30B2	/* eglCreateImageKHR target */
   927 #define EGL_GL_TEXTURE_ZOFFSET_KHR		0x30BD	/* eglCreateImageKHR attribute */
   928 #endif
   929 
   930 #ifndef EGL_KHR_gl_renderbuffer_image
   931 #define EGL_KHR_gl_renderbuffer_image 1
   932 #define EGL_GL_RENDERBUFFER_KHR			0x30B9	/* eglCreateImageKHR target */
   933 #endif
   934 
   935 #if KHRONOS_SUPPORT_INT64   /* EGLTimeKHR requires 64-bit uint support */
   936 #ifndef EGL_KHR_reusable_sync
   937 #define EGL_KHR_reusable_sync 1
   938 
   939     typedef void* EGLSyncKHR;
   940     typedef khronos_utime_nanoseconds_t EGLTimeKHR;
   941 
   942 #define EGL_SYNC_STATUS_KHR			0x30F1
   943 #define EGL_SIGNALED_KHR			0x30F2
   944 #define EGL_UNSIGNALED_KHR			0x30F3
   945 #define EGL_TIMEOUT_EXPIRED_KHR			0x30F5
   946 #define EGL_CONDITION_SATISFIED_KHR		0x30F6
   947 #define EGL_SYNC_TYPE_KHR			0x30F7
   948 #define EGL_SYNC_REUSABLE_KHR			0x30FA
   949 #define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR		0x0001	/* eglClientWaitSyncKHR <flags> bitfield */
   950 #define EGL_FOREVER_KHR				0xFFFFFFFFFFFFFFFFull
   951 #define EGL_NO_SYNC_KHR				((EGLSyncKHR)0)
   952 #ifdef EGL_EGLEXT_PROTOTYPES
   953     EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
   954     EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
   955     EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
   956     EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
   957     EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
   958 #endif /* EGL_EGLEXT_PROTOTYPES */
   959     typedef EGLSyncKHR(EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
   960     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
   961     typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
   962     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
   963     typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
   964 #endif
   965 #endif
   966 
   967 #ifndef EGL_KHR_image_base
   968 #define EGL_KHR_image_base 1
   969     /* Most interfaces defined by EGL_KHR_image_pixmap above */
   970 #define EGL_IMAGE_PRESERVED_KHR			0x30D2	/* eglCreateImageKHR attribute */
   971 #endif
   972 
   973 #ifndef EGL_KHR_image_pixmap
   974 #define EGL_KHR_image_pixmap 1
   975     /* Interfaces defined by EGL_KHR_image above */
   976 #endif
   977 
   978 #ifndef EGL_IMG_context_priority
   979 #define EGL_IMG_context_priority 1
   980 #define EGL_CONTEXT_PRIORITY_LEVEL_IMG		0x3100
   981 #define EGL_CONTEXT_PRIORITY_HIGH_IMG		0x3101
   982 #define EGL_CONTEXT_PRIORITY_MEDIUM_IMG		0x3102
   983 #define EGL_CONTEXT_PRIORITY_LOW_IMG		0x3103
   984 #endif
   985 
   986 #ifndef EGL_KHR_lock_surface2
   987 #define EGL_KHR_lock_surface2 1
   988 #define EGL_BITMAP_PIXEL_SIZE_KHR		0x3110
   989 #endif
   990 
   991 #ifndef EGL_NV_coverage_sample
   992 #define EGL_NV_coverage_sample 1
   993 #define EGL_COVERAGE_BUFFERS_NV			0x30E0
   994 #define EGL_COVERAGE_SAMPLES_NV			0x30E1
   995 #endif
   996 
   997 #ifndef EGL_NV_depth_nonlinear
   998 #define EGL_NV_depth_nonlinear 1
   999 #define EGL_DEPTH_ENCODING_NV			0x30E2
  1000 #define EGL_DEPTH_ENCODING_NONE_NV 0
  1001 #define EGL_DEPTH_ENCODING_NONLINEAR_NV		0x30E3
  1002 #endif
  1003 
  1004 #if KHRONOS_SUPPORT_INT64   /* EGLTimeNV requires 64-bit uint support */
  1005 #ifndef EGL_NV_sync
  1006 #define EGL_NV_sync 1
  1007 #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV	0x30E6
  1008 #define EGL_SYNC_STATUS_NV			0x30E7
  1009 #define EGL_SIGNALED_NV				0x30E8
  1010 #define EGL_UNSIGNALED_NV			0x30E9
  1011 #define EGL_SYNC_FLUSH_COMMANDS_BIT_NV		0x0001
  1012 #define EGL_FOREVER_NV				0xFFFFFFFFFFFFFFFFull
  1013 #define EGL_ALREADY_SIGNALED_NV			0x30EA
  1014 #define EGL_TIMEOUT_EXPIRED_NV			0x30EB
  1015 #define EGL_CONDITION_SATISFIED_NV		0x30EC
  1016 #define EGL_SYNC_TYPE_NV			0x30ED
  1017 #define EGL_SYNC_CONDITION_NV			0x30EE
  1018 #define EGL_SYNC_FENCE_NV			0x30EF
  1019 #define EGL_NO_SYNC_NV				((EGLSyncNV)0)
  1020     typedef void* EGLSyncNV;
  1021     typedef khronos_utime_nanoseconds_t EGLTimeNV;
  1022 #ifdef EGL_EGLEXT_PROTOTYPES
  1023     EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV(EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
  1024     EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV(EGLSyncNV sync);
  1025     EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV(EGLSyncNV sync);
  1026     EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV(EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  1027     EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV(EGLSyncNV sync, EGLenum mode);
  1028     EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV(EGLSyncNV sync, EGLint attribute, EGLint *value);
  1029 #endif /* EGL_EGLEXT_PROTOTYPES */
  1030     typedef EGLSyncNV(EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
  1031     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
  1032     typedef EGLBoolean(EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
  1033     typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  1034     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
  1035     typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
  1036 #endif
  1037 #endif
  1038 
  1039 #if KHRONOS_SUPPORT_INT64   /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
  1040 #ifndef EGL_KHR_fence_sync
  1041 #define EGL_KHR_fence_sync 1
  1042     /* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
  1043 #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR	0x30F0
  1044 #define EGL_SYNC_CONDITION_KHR			0x30F8
  1045 #define EGL_SYNC_FENCE_KHR			0x30F9
  1046 #endif
  1047 #endif
  1048 
  1049 #ifndef EGL_HI_clientpixmap
  1050 #define EGL_HI_clientpixmap 1
  1051 
  1052     /* Surface Attribute */
  1053 #define EGL_CLIENT_PIXMAP_POINTER_HI		0x8F74
  1054     /*
  1055     * Structure representing a client pixmap
  1056     * (pixmap's data is in client-space memory).
  1057     */
  1058     struct EGLClientPixmapHI
  1059     {
  1060         void*		pData;
  1061         EGLint		iWidth;
  1062         EGLint		iHeight;
  1063         EGLint		iStride;
  1064     };
  1065 #ifdef EGL_EGLEXT_PROTOTYPES
  1066     EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
  1067 #endif /* EGL_EGLEXT_PROTOTYPES */
  1068     typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
  1069 #endif	/* EGL_HI_clientpixmap */
  1070 
  1071 #ifndef EGL_HI_colorformats
  1072 #define EGL_HI_colorformats 1
  1073     /* Config Attribute */
  1074 #define EGL_COLOR_FORMAT_HI			0x8F70
  1075     /* Color Formats */
  1076 #define EGL_COLOR_RGB_HI			0x8F71
  1077 #define EGL_COLOR_RGBA_HI			0x8F72
  1078 #define EGL_COLOR_ARGB_HI			0x8F73
  1079 #endif /* EGL_HI_colorformats */
  1080 
  1081 #ifndef EGL_MESA_drm_image
  1082 #define EGL_MESA_drm_image 1
  1083 #define EGL_DRM_BUFFER_FORMAT_MESA		0x31D0	    /* CreateDRMImageMESA attribute */
  1084 #define EGL_DRM_BUFFER_USE_MESA			0x31D1	    /* CreateDRMImageMESA attribute */
  1085 #define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA	0x31D2	    /* EGL_IMAGE_FORMAT_MESA attribute value */
  1086 #define EGL_DRM_BUFFER_MESA			0x31D3	    /* eglCreateImageKHR target */
  1087 #define EGL_DRM_BUFFER_STRIDE_MESA		0x31D4
  1088 #define EGL_DRM_BUFFER_USE_SCANOUT_MESA		0x00000001  /* EGL_DRM_BUFFER_USE_MESA bits */
  1089 #define EGL_DRM_BUFFER_USE_SHARE_MESA		0x00000002  /* EGL_DRM_BUFFER_USE_MESA bits */
  1090 #ifdef EGL_EGLEXT_PROTOTYPES
  1091     EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list);
  1092     EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
  1093 #endif /* EGL_EGLEXT_PROTOTYPES */
  1094     typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
  1095     typedef EGLBoolean(EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
  1096 #endif
  1097 
  1098 #ifndef EGL_NV_post_sub_buffer
  1099 #define EGL_NV_post_sub_buffer 1
  1100 #define EGL_POST_SUB_BUFFER_SUPPORTED_NV	0x30BE
  1101 #ifdef EGL_EGLEXT_PROTOTYPES
  1102     EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  1103 #endif /* EGL_EGLEXT_PROTOTYPES */
  1104     typedef EGLBoolean(EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  1105 #endif
  1106 
  1107 #ifndef EGL_ANGLE_query_surface_pointer
  1108 #define EGL_ANGLE_query_surface_pointer 1
  1109 #ifdef EGL_EGLEXT_PROTOTYPES
  1110     EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
  1111 #endif
  1112     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
  1113 #endif
  1114 
  1115 #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
  1116 #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
  1117 #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE	0x3200
  1118 #endif
  1119 
  1120 #ifndef EGL_NV_coverage_sample_resolve
  1121 #define EGL_NV_coverage_sample_resolve 1
  1122 #define EGL_COVERAGE_SAMPLE_RESOLVE_NV		0x3131
  1123 #define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV	0x3132
  1124 #define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV	0x3133
  1125 #endif
  1126 
  1127 #if KHRONOS_SUPPORT_INT64   /* EGLuint64NV requires 64-bit uint support */
  1128 #ifndef EGL_NV_system_time
  1129 #define EGL_NV_system_time 1
  1130     typedef khronos_utime_nanoseconds_t EGLuint64NV;
  1131 #ifdef EGL_EGLEXT_PROTOTYPES
  1132     EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
  1133     EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
  1134 #endif /* EGL_EGLEXT_PROTOTYPES */
  1135     typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
  1136     typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
  1137 #endif
  1138 #endif
  1139 
  1140 #if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */
  1141 #ifndef EGL_KHR_stream
  1142 #define EGL_KHR_stream 1
  1143     typedef void* EGLStreamKHR;
  1144     typedef khronos_uint64_t EGLuint64KHR;
  1145 #define EGL_NO_STREAM_KHR			((EGLStreamKHR)0)
  1146 #define EGL_CONSUMER_LATENCY_USEC_KHR		0x3210
  1147 #define EGL_PRODUCER_FRAME_KHR			0x3212
  1148 #define EGL_CONSUMER_FRAME_KHR			0x3213
  1149 #define EGL_STREAM_STATE_KHR			0x3214
  1150 #define EGL_STREAM_STATE_CREATED_KHR		0x3215
  1151 #define EGL_STREAM_STATE_CONNECTING_KHR		0x3216
  1152 #define EGL_STREAM_STATE_EMPTY_KHR		0x3217
  1153 #define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR    0x3218
  1154 #define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR    0x3219
  1155 #define EGL_STREAM_STATE_DISCONNECTED_KHR	0x321A
  1156 #define EGL_BAD_STREAM_KHR			0x321B
  1157 #define EGL_BAD_STATE_KHR			0x321C
  1158 #ifdef EGL_EGLEXT_PROTOTYPES
  1159     EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list);
  1160     EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1161     EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
  1162     EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
  1163     EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
  1164 #endif /* EGL_EGLEXT_PROTOTYPES */
  1165     typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list);
  1166     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1167     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
  1168     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
  1169     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
  1170 #endif
  1171 #endif
  1172 
  1173 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1174 #ifndef EGL_KHR_stream_consumer_gltexture
  1175 #define EGL_KHR_stream_consumer_gltexture 1
  1176 #define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR	0x321E
  1177 #ifdef EGL_EGLEXT_PROTOTYPES
  1178     EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1179     EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1180     EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1181 #endif /* EGL_EGLEXT_PROTOTYPES */
  1182     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1183     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1184     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1185 #endif
  1186 #endif
  1187 
  1188 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1189 #ifndef EGL_KHR_stream_producer_eglsurface
  1190 #define EGL_KHR_stream_producer_eglsurface 1
  1191 #define EGL_STREAM_BIT_KHR			0x0800
  1192 #ifdef EGL_EGLEXT_PROTOTYPES
  1193     EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
  1194 #endif /* EGL_EGLEXT_PROTOTYPES */
  1195     typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
  1196 #endif
  1197 #endif
  1198 
  1199 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1200 #ifndef EGL_KHR_stream_producer_aldatalocator
  1201 #define EGL_KHR_stream_producer_aldatalocator 1
  1202 #endif
  1203 #endif
  1204 
  1205 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1206 #ifndef EGL_KHR_stream_fifo
  1207 #define EGL_KHR_stream_fifo 1
  1208     /* reuse EGLTimeKHR */
  1209 #define EGL_STREAM_FIFO_LENGTH_KHR		0x31FC
  1210 #define EGL_STREAM_TIME_NOW_KHR			0x31FD
  1211 #define EGL_STREAM_TIME_CONSUMER_KHR		0x31FE
  1212 #define EGL_STREAM_TIME_PRODUCER_KHR		0x31FF
  1213 #ifdef EGL_EGLEXT_PROTOTYPES
  1214     EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
  1215 #endif /* EGL_EGLEXT_PROTOTYPES */
  1216     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
  1217 #endif
  1218 #endif
  1219 
  1220 #ifndef EGL_EXT_create_context_robustness
  1221 #define EGL_EXT_create_context_robustness 1
  1222 #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT	0x30BF
  1223 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
  1224 #define EGL_NO_RESET_NOTIFICATION_EXT		0x31BE
  1225 #define EGL_LOSE_CONTEXT_ON_RESET_EXT		0x31BF
  1226 #endif
  1227 
  1228 #ifndef EGL_ANGLE_d3d_share_handle_client_buffer
  1229 #define EGL_ANGLE_d3d_share_handle_client_buffer 1
  1230     /* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */
  1231 #endif
  1232 
  1233 #ifndef EGL_KHR_create_context
  1234 #define EGL_KHR_create_context 1
  1235 #define EGL_CONTEXT_MAJOR_VERSION_KHR			    EGL_CONTEXT_CLIENT_VERSION
  1236 #define EGL_CONTEXT_MINOR_VERSION_KHR			    0x30FB
  1237 #define EGL_CONTEXT_FLAGS_KHR				    0x30FC
  1238 #define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR		    0x30FD
  1239 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR  0x31BD
  1240 #define EGL_NO_RESET_NOTIFICATION_KHR			    0x31BE
  1241 #define EGL_LOSE_CONTEXT_ON_RESET_KHR			    0x31BF
  1242 #define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR		    0x00000001
  1243 #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR	    0x00000002
  1244 #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR	    0x00000004
  1245 #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR		    0x00000001
  1246 #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR    0x00000002
  1247 #define EGL_OPENGL_ES3_BIT_KHR				    0x00000040
  1248 #endif
  1249 
  1250 #ifndef EGL_KHR_surfaceless_context
  1251 #define EGL_KHR_surfaceless_context 1
  1252     /* No tokens/entry points, just relaxes an error condition */
  1253 #endif
  1254 
  1255 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1256 #ifndef EGL_KHR_stream_cross_process_fd
  1257 #define EGL_KHR_stream_cross_process_fd 1
  1258     typedef int EGLNativeFileDescriptorKHR;
  1259 #define EGL_NO_FILE_DESCRIPTOR_KHR		((EGLNativeFileDescriptorKHR)(-1))
  1260 #ifdef EGL_EGLEXT_PROTOTYPES
  1261     EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1262     EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  1263 #endif /* EGL_EGLEXT_PROTOTYPES */
  1264     typedef EGLNativeFileDescriptorKHR(EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1265     typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  1266 #endif
  1267 #endif
  1268 
  1269 #ifndef EGL_EXT_multiview_window
  1270 #define EGL_EXT_multiview_window 1
  1271 #define EGL_MULTIVIEW_VIEW_COUNT_EXT		0x3134
  1272 #endif
  1273 
  1274 #ifndef EGL_KHR_wait_sync
  1275 #define EGL_KHR_wait_sync 1
  1276 #ifdef EGL_EGLEXT_PROTOTYPES
  1277     EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  1278 #endif /* EGL_EGLEXT_PROTOTYPES */
  1279     typedef EGLint(EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  1280 #endif
  1281 
  1282 #ifndef EGL_NV_post_convert_rounding
  1283 #define EGL_NV_post_convert_rounding 1
  1284     /* No tokens or entry points, just relaxes behavior of SwapBuffers */
  1285 #endif
  1286 
  1287 #ifndef EGL_NV_native_query
  1288 #define EGL_NV_native_query 1
  1289 #ifdef EGL_EGLEXT_PROTOTYPES
  1290     EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV(EGLDisplay dpy, EGLNativeDisplayType* display_id);
  1291     EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window);
  1292     EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap);
  1293 #endif /* EGL_EGLEXT_PROTOTYPES */
  1294     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id);
  1295     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
  1296     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
  1297 #endif
  1298 
  1299 #ifndef EGL_NV_3dvision_surface
  1300 #define EGL_NV_3dvision_surface 1
  1301 #define EGL_AUTO_STEREO_NV			0x3136
  1302 #endif
  1303 
  1304 #ifndef EGL_ANDROID_framebuffer_target
  1305 #define EGL_ANDROID_framebuffer_target 1
  1306 #define EGL_FRAMEBUFFER_TARGET_ANDROID		0x3147
  1307 #endif
  1308 
  1309 #ifndef EGL_ANDROID_blob_cache
  1310 #define EGL_ANDROID_blob_cache 1
  1311     typedef khronos_ssize_t EGLsizeiANDROID;
  1312     typedef void(*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
  1313     typedef EGLsizeiANDROID(*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
  1314 #ifdef EGL_EGLEXT_PROTOTYPES
  1315     EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  1316 #endif /* EGL_EGLEXT_PROTOTYPES */
  1317     typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  1318 #endif
  1319 
  1320 #ifndef EGL_ANDROID_image_native_buffer
  1321 #define EGL_ANDROID_image_native_buffer 1
  1322 #define EGL_NATIVE_BUFFER_ANDROID		0x3140
  1323 #endif
  1324 
  1325 #ifndef EGL_ANDROID_native_fence_sync
  1326 #define EGL_ANDROID_native_fence_sync 1
  1327 #define EGL_SYNC_NATIVE_FENCE_ANDROID		0x3144
  1328 #define EGL_SYNC_NATIVE_FENCE_FD_ANDROID	0x3145
  1329 #define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID	0x3146
  1330 #define EGL_NO_NATIVE_FENCE_FD_ANDROID		-1
  1331 #ifdef EGL_EGLEXT_PROTOTYPES
  1332     EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR);
  1333 #endif /* EGL_EGLEXT_PROTOTYPES */
  1334     typedef EGLint(EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR);
  1335 #endif
  1336 
  1337 #ifndef EGL_ANDROID_recordable
  1338 #define EGL_ANDROID_recordable 1
  1339 #define EGL_RECORDABLE_ANDROID			0x3142
  1340 #endif
  1341 
  1342 #ifndef EGL_EXT_buffer_age
  1343 #define EGL_EXT_buffer_age 1
  1344 #define EGL_BUFFER_AGE_EXT			0x313D
  1345 #endif
  1346 
  1347 #ifndef EGL_EXT_image_dma_buf_import
  1348 #define EGL_EXT_image_dma_buf_import 1
  1349 #define EGL_LINUX_DMA_BUF_EXT			0x3270
  1350 #define EGL_LINUX_DRM_FOURCC_EXT		0x3271
  1351 #define EGL_DMA_BUF_PLANE0_FD_EXT		0x3272
  1352 #define EGL_DMA_BUF_PLANE0_OFFSET_EXT		0x3273
  1353 #define EGL_DMA_BUF_PLANE0_PITCH_EXT		0x3274
  1354 #define EGL_DMA_BUF_PLANE1_FD_EXT		0x3275
  1355 #define EGL_DMA_BUF_PLANE1_OFFSET_EXT		0x3276
  1356 #define EGL_DMA_BUF_PLANE1_PITCH_EXT		0x3277
  1357 #define EGL_DMA_BUF_PLANE2_FD_EXT		0x3278
  1358 #define EGL_DMA_BUF_PLANE2_OFFSET_EXT		0x3279
  1359 #define EGL_DMA_BUF_PLANE2_PITCH_EXT		0x327A
  1360 #define EGL_YUV_COLOR_SPACE_HINT_EXT		0x327B
  1361 #define EGL_SAMPLE_RANGE_HINT_EXT		0x327C
  1362 #define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
  1363 #define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
  1364 #define EGL_ITU_REC601_EXT			0x327F
  1365 #define EGL_ITU_REC709_EXT			0x3280
  1366 #define EGL_ITU_REC2020_EXT			0x3281
  1367 #define EGL_YUV_FULL_RANGE_EXT			0x3282
  1368 #define EGL_YUV_NARROW_RANGE_EXT		0x3283
  1369 #define EGL_YUV_CHROMA_SITING_0_EXT		0x3284
  1370 #define EGL_YUV_CHROMA_SITING_0_5_EXT		0x3285
  1371 #endif
  1372 
  1373 #ifndef EGL_ARM_pixmap_multisample_discard
  1374 #define EGL_ARM_pixmap_multisample_discard 1
  1375 #define EGL_DISCARD_SAMPLES_ARM			0x3286
  1376 #endif
  1377 
  1378 #ifndef EGL_EXT_swap_buffers_with_damage
  1379 #define EGL_EXT_swap_buffers_with_damage 1
  1380 #ifdef EGL_EGLEXT_PROTOTYPES
  1381     EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
  1382 #endif /* EGL_EGLEXT_PROTOTYPES */
  1383     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
  1384 #endif
  1385 
  1386 /* #include <EGL/eglmesaext.h> */
  1387 
  1388 #ifdef __cplusplus
  1389 }
  1390 #endif
  1391 
  1392 #endif /* __eglext_h_ */
  1393 
  1394 
  1395 
  1396 #endif /* _MSC_VER */