include/SDL_egl.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 02 Feb 2014 00:53:27 -0800
changeset 8149 681eb46b8ac4
parent 8021 f96e12e0ade9
child 8583 fb2933ca805f
permissions -rw-r--r--
Fixed bug 2374 - Update copyright for 2014...

Is it that time already??
     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 typedef HDC     EGLNativeDisplayType;
   395 typedef HBITMAP EGLNativePixmapType;
   396 typedef HWND    EGLNativeWindowType;
   397 
   398 #elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
   399 
   400 typedef int   EGLNativeDisplayType;
   401 typedef void *EGLNativeWindowType;
   402 typedef void *EGLNativePixmapType;
   403 
   404 #elif defined(WL_EGL_PLATFORM)
   405 
   406 typedef struct wl_display     *EGLNativeDisplayType;
   407 typedef struct wl_egl_pixmap  *EGLNativePixmapType;
   408 typedef struct wl_egl_window  *EGLNativeWindowType;
   409 
   410 #elif defined(__GBM__)
   411 
   412 typedef struct gbm_device  *EGLNativeDisplayType;
   413 typedef struct gbm_bo      *EGLNativePixmapType;
   414 typedef void               *EGLNativeWindowType;
   415 
   416 #elif defined(ANDROID) /* Android */
   417 
   418 struct ANativeWindow;
   419 struct egl_native_pixmap_t;
   420 
   421 typedef struct ANativeWindow        *EGLNativeWindowType;
   422 typedef struct egl_native_pixmap_t  *EGLNativePixmapType;
   423 typedef void                        *EGLNativeDisplayType;
   424 
   425 #elif defined(MIR_EGL_PLATFORM)
   426 
   427 #include <mir_toolkit/mir_client_library.h>
   428 typedef MirEGLNativeDisplayType EGLNativeDisplayType;
   429 typedef void                   *EGLNativePixmapType;
   430 typedef MirEGLNativeWindowType  EGLNativeWindowType;
   431 
   432 #elif defined(__unix__)
   433 
   434 #ifdef MESA_EGL_NO_X11_HEADERS
   435 
   436 typedef void            *EGLNativeDisplayType;
   437 typedef khronos_uintptr_t EGLNativePixmapType;
   438 typedef khronos_uintptr_t EGLNativeWindowType;
   439 
   440 #else
   441 
   442 /* X11 (tentative)  */
   443 #include <X11/Xlib.h>
   444 #include <X11/Xutil.h>
   445 
   446 typedef Display *EGLNativeDisplayType;
   447 typedef Pixmap   EGLNativePixmapType;
   448 typedef Window   EGLNativeWindowType;
   449 
   450 #endif /* MESA_EGL_NO_X11_HEADERS */
   451 
   452 #else
   453 #error "Platform not recognized"
   454 #endif
   455 
   456 /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
   457 typedef EGLNativeDisplayType NativeDisplayType;
   458 typedef EGLNativePixmapType  NativePixmapType;
   459 typedef EGLNativeWindowType  NativeWindowType;
   460 
   461 
   462 /* Define EGLint. This must be a signed integral type large enough to contain
   463 * all legal attribute names and values passed into and out of EGL, whether
   464 * their type is boolean, bitmask, enumerant (symbolic constant), integer,
   465 * handle, or other.  While in general a 32-bit integer will suffice, if
   466 * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
   467 * integer type.
   468 */
   469 typedef khronos_int32_t EGLint;
   470 
   471 #endif /* __eglplatform_h */
   472 
   473 /* -*- mode: c; tab-width: 8; -*- */
   474 /* vi: set sw=4 ts=8: */
   475 /* Reference version of egl.h for EGL 1.4.
   476 * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
   477 */
   478 
   479 /*
   480 ** Copyright (c) 2007-2009 The Khronos Group Inc.
   481 **
   482 ** Permission is hereby granted, free of charge, to any person obtaining a
   483 ** copy of this software and/or associated documentation files (the
   484 ** "Materials"), to deal in the Materials without restriction, including
   485 ** without limitation the rights to use, copy, modify, merge, publish,
   486 ** distribute, sublicense, and/or sell copies of the Materials, and to
   487 ** permit persons to whom the Materials are furnished to do so, subject to
   488 ** the following conditions:
   489 **
   490 ** The above copyright notice and this permission notice shall be included
   491 ** in all copies or substantial portions of the Materials.
   492 **
   493 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   494 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   495 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   496 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   497 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   498 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   499 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
   500 */
   501 
   502 #ifndef __egl_h_
   503 #define __egl_h_
   504 
   505 /* All platform-dependent types and macro boilerplate (such as EGLAPI
   506 * and EGLAPIENTRY) should go in eglplatform.h.
   507 */
   508 /*#include <EGL/eglplatform.h>*/
   509 
   510 #ifdef __cplusplus
   511 extern "C" {
   512 #endif
   513 
   514     /* EGL Types */
   515     /* EGLint is defined in eglplatform.h */
   516     typedef unsigned int EGLBoolean;
   517     typedef unsigned int EGLenum;
   518     typedef void *EGLConfig;
   519     typedef void *EGLContext;
   520     typedef void *EGLDisplay;
   521     typedef void *EGLSurface;
   522     typedef void *EGLClientBuffer;
   523 
   524     /* EGL Versioning */
   525 #define EGL_VERSION_1_0			1
   526 #define EGL_VERSION_1_1			1
   527 #define EGL_VERSION_1_2			1
   528 #define EGL_VERSION_1_3			1
   529 #define EGL_VERSION_1_4			1
   530 
   531     /* EGL Enumerants. Bitmasks and other exceptional cases aside, most
   532     * enums are assigned unique values starting at 0x3000.
   533     */
   534 
   535     /* EGL aliases */
   536 #define EGL_FALSE			0
   537 #define EGL_TRUE			1
   538 
   539     /* Out-of-band handle values */
   540 #define EGL_DEFAULT_DISPLAY		((EGLNativeDisplayType)0)
   541 #define EGL_NO_CONTEXT			((EGLContext)0)
   542 #define EGL_NO_DISPLAY			((EGLDisplay)0)
   543 #define EGL_NO_SURFACE			((EGLSurface)0)
   544 
   545     /* Out-of-band attribute value */
   546 #define EGL_DONT_CARE			((EGLint)-1)
   547 
   548     /* Errors / GetError return values */
   549 #define EGL_SUCCESS			0x3000
   550 #define EGL_NOT_INITIALIZED		0x3001
   551 #define EGL_BAD_ACCESS			0x3002
   552 #define EGL_BAD_ALLOC			0x3003
   553 #define EGL_BAD_ATTRIBUTE		0x3004
   554 #define EGL_BAD_CONFIG			0x3005
   555 #define EGL_BAD_CONTEXT			0x3006
   556 #define EGL_BAD_CURRENT_SURFACE		0x3007
   557 #define EGL_BAD_DISPLAY			0x3008
   558 #define EGL_BAD_MATCH			0x3009
   559 #define EGL_BAD_NATIVE_PIXMAP		0x300A
   560 #define EGL_BAD_NATIVE_WINDOW		0x300B
   561 #define EGL_BAD_PARAMETER		0x300C
   562 #define EGL_BAD_SURFACE			0x300D
   563 #define EGL_CONTEXT_LOST		0x300E	/* EGL 1.1 - IMG_power_management */
   564 
   565     /* Reserved 0x300F-0x301F for additional errors */
   566 
   567     /* Config attributes */
   568 #define EGL_BUFFER_SIZE			0x3020
   569 #define EGL_ALPHA_SIZE			0x3021
   570 #define EGL_BLUE_SIZE			0x3022
   571 #define EGL_GREEN_SIZE			0x3023
   572 #define EGL_RED_SIZE			0x3024
   573 #define EGL_DEPTH_SIZE			0x3025
   574 #define EGL_STENCIL_SIZE		0x3026
   575 #define EGL_CONFIG_CAVEAT		0x3027
   576 #define EGL_CONFIG_ID			0x3028
   577 #define EGL_LEVEL			0x3029
   578 #define EGL_MAX_PBUFFER_HEIGHT		0x302A
   579 #define EGL_MAX_PBUFFER_PIXELS		0x302B
   580 #define EGL_MAX_PBUFFER_WIDTH		0x302C
   581 #define EGL_NATIVE_RENDERABLE		0x302D
   582 #define EGL_NATIVE_VISUAL_ID		0x302E
   583 #define EGL_NATIVE_VISUAL_TYPE		0x302F
   584 #define EGL_SAMPLES			0x3031
   585 #define EGL_SAMPLE_BUFFERS		0x3032
   586 #define EGL_SURFACE_TYPE		0x3033
   587 #define EGL_TRANSPARENT_TYPE		0x3034
   588 #define EGL_TRANSPARENT_BLUE_VALUE	0x3035
   589 #define EGL_TRANSPARENT_GREEN_VALUE	0x3036
   590 #define EGL_TRANSPARENT_RED_VALUE	0x3037
   591 #define EGL_NONE			0x3038	/* Attrib list terminator */
   592 #define EGL_BIND_TO_TEXTURE_RGB		0x3039
   593 #define EGL_BIND_TO_TEXTURE_RGBA	0x303A
   594 #define EGL_MIN_SWAP_INTERVAL		0x303B
   595 #define EGL_MAX_SWAP_INTERVAL		0x303C
   596 #define EGL_LUMINANCE_SIZE		0x303D
   597 #define EGL_ALPHA_MASK_SIZE		0x303E
   598 #define EGL_COLOR_BUFFER_TYPE		0x303F
   599 #define EGL_RENDERABLE_TYPE		0x3040
   600 #define EGL_MATCH_NATIVE_PIXMAP		0x3041	/* Pseudo-attribute (not queryable) */
   601 #define EGL_CONFORMANT			0x3042
   602 
   603     /* Reserved 0x3041-0x304F for additional config attributes */
   604 
   605     /* Config attribute values */
   606 #define EGL_SLOW_CONFIG			0x3050	/* EGL_CONFIG_CAVEAT value */
   607 #define EGL_NON_CONFORMANT_CONFIG	0x3051	/* EGL_CONFIG_CAVEAT value */
   608 #define EGL_TRANSPARENT_RGB		0x3052	/* EGL_TRANSPARENT_TYPE value */
   609 #define EGL_RGB_BUFFER			0x308E	/* EGL_COLOR_BUFFER_TYPE value */
   610 #define EGL_LUMINANCE_BUFFER		0x308F	/* EGL_COLOR_BUFFER_TYPE value */
   611 
   612     /* More config attribute values, for EGL_TEXTURE_FORMAT */
   613 #define EGL_NO_TEXTURE			0x305C
   614 #define EGL_TEXTURE_RGB			0x305D
   615 #define EGL_TEXTURE_RGBA		0x305E
   616 #define EGL_TEXTURE_2D			0x305F
   617 
   618     /* Config attribute mask bits */
   619 #define EGL_PBUFFER_BIT			0x0001	/* EGL_SURFACE_TYPE mask bits */
   620 #define EGL_PIXMAP_BIT			0x0002	/* EGL_SURFACE_TYPE mask bits */
   621 #define EGL_WINDOW_BIT			0x0004	/* EGL_SURFACE_TYPE mask bits */
   622 #define EGL_VG_COLORSPACE_LINEAR_BIT	0x0020	/* EGL_SURFACE_TYPE mask bits */
   623 #define EGL_VG_ALPHA_FORMAT_PRE_BIT	0x0040	/* EGL_SURFACE_TYPE mask bits */
   624 #define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200	/* EGL_SURFACE_TYPE mask bits */
   625 #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400	/* EGL_SURFACE_TYPE mask bits */
   626 
   627 #define EGL_OPENGL_ES_BIT		0x0001	/* EGL_RENDERABLE_TYPE mask bits */
   628 #define EGL_OPENVG_BIT			0x0002	/* EGL_RENDERABLE_TYPE mask bits */
   629 #define EGL_OPENGL_ES2_BIT		0x0004	/* EGL_RENDERABLE_TYPE mask bits */
   630 #define EGL_OPENGL_BIT			0x0008	/* EGL_RENDERABLE_TYPE mask bits */
   631 
   632     /* QueryString targets */
   633 #define EGL_VENDOR			0x3053
   634 #define EGL_VERSION			0x3054
   635 #define EGL_EXTENSIONS			0x3055
   636 #define EGL_CLIENT_APIS			0x308D
   637 
   638     /* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
   639 #define EGL_HEIGHT			0x3056
   640 #define EGL_WIDTH			0x3057
   641 #define EGL_LARGEST_PBUFFER		0x3058
   642 #define EGL_TEXTURE_FORMAT		0x3080
   643 #define EGL_TEXTURE_TARGET		0x3081
   644 #define EGL_MIPMAP_TEXTURE		0x3082
   645 #define EGL_MIPMAP_LEVEL		0x3083
   646 #define EGL_RENDER_BUFFER		0x3086
   647 #define EGL_VG_COLORSPACE		0x3087
   648 #define EGL_VG_ALPHA_FORMAT		0x3088
   649 #define EGL_HORIZONTAL_RESOLUTION	0x3090
   650 #define EGL_VERTICAL_RESOLUTION		0x3091
   651 #define EGL_PIXEL_ASPECT_RATIO		0x3092
   652 #define EGL_SWAP_BEHAVIOR		0x3093
   653 #define EGL_MULTISAMPLE_RESOLVE		0x3099
   654 
   655     /* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
   656 #define EGL_BACK_BUFFER			0x3084
   657 #define EGL_SINGLE_BUFFER		0x3085
   658 
   659     /* OpenVG color spaces */
   660 #define EGL_VG_COLORSPACE_sRGB		0x3089	/* EGL_VG_COLORSPACE value */
   661 #define EGL_VG_COLORSPACE_LINEAR	0x308A	/* EGL_VG_COLORSPACE value */
   662 
   663     /* OpenVG alpha formats */
   664 #define EGL_VG_ALPHA_FORMAT_NONPRE	0x308B	/* EGL_ALPHA_FORMAT value */
   665 #define EGL_VG_ALPHA_FORMAT_PRE		0x308C	/* EGL_ALPHA_FORMAT value */
   666 
   667     /* Constant scale factor by which fractional display resolutions &
   668     * aspect ratio are scaled when queried as integer values.
   669     */
   670 #define EGL_DISPLAY_SCALING		10000
   671 
   672     /* Unknown display resolution/aspect ratio */
   673 #define EGL_UNKNOWN			((EGLint)-1)
   674 
   675     /* Back buffer swap behaviors */
   676 #define EGL_BUFFER_PRESERVED		0x3094	/* EGL_SWAP_BEHAVIOR value */
   677 #define EGL_BUFFER_DESTROYED		0x3095	/* EGL_SWAP_BEHAVIOR value */
   678 
   679     /* CreatePbufferFromClientBuffer buffer types */
   680 #define EGL_OPENVG_IMAGE		0x3096
   681 
   682     /* QueryContext targets */
   683 #define EGL_CONTEXT_CLIENT_TYPE		0x3097
   684 
   685     /* CreateContext attributes */
   686 #define EGL_CONTEXT_CLIENT_VERSION	0x3098
   687 
   688     /* Multisample resolution behaviors */
   689 #define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A	/* EGL_MULTISAMPLE_RESOLVE value */
   690 #define EGL_MULTISAMPLE_RESOLVE_BOX	0x309B	/* EGL_MULTISAMPLE_RESOLVE value */
   691 
   692     /* BindAPI/QueryAPI targets */
   693 #define EGL_OPENGL_ES_API		0x30A0
   694 #define EGL_OPENVG_API			0x30A1
   695 #define EGL_OPENGL_API			0x30A2
   696 
   697     /* GetCurrentSurface targets */
   698 #define EGL_DRAW			0x3059
   699 #define EGL_READ			0x305A
   700 
   701     /* WaitNative engines */
   702 #define EGL_CORE_NATIVE_ENGINE		0x305B
   703 
   704     /* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
   705 #define EGL_COLORSPACE			EGL_VG_COLORSPACE
   706 #define EGL_ALPHA_FORMAT		EGL_VG_ALPHA_FORMAT
   707 #define EGL_COLORSPACE_sRGB		EGL_VG_COLORSPACE_sRGB
   708 #define EGL_COLORSPACE_LINEAR		EGL_VG_COLORSPACE_LINEAR
   709 #define EGL_ALPHA_FORMAT_NONPRE		EGL_VG_ALPHA_FORMAT_NONPRE
   710 #define EGL_ALPHA_FORMAT_PRE		EGL_VG_ALPHA_FORMAT_PRE
   711 
   712     /* EGL extensions must request enum blocks from the Khronos
   713     * API Registrar, who maintains the enumerant registry. Submit
   714     * a bug in Khronos Bugzilla against task "Registry".
   715     */
   716 
   717 
   718 
   719     /* EGL Functions */
   720 
   721     EGLAPI EGLint EGLAPIENTRY eglGetError(void);
   722 
   723     EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
   724     EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
   725     EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
   726 
   727     EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
   728 
   729     EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
   730         EGLint config_size, EGLint *num_config);
   731     EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
   732         EGLConfig *configs, EGLint config_size,
   733         EGLint *num_config);
   734     EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
   735         EGLint attribute, EGLint *value);
   736 
   737     EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
   738         EGLNativeWindowType win,
   739         const EGLint *attrib_list);
   740     EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
   741         const EGLint *attrib_list);
   742     EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
   743         EGLNativePixmapType pixmap,
   744         const EGLint *attrib_list);
   745     EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
   746     EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
   747         EGLint attribute, EGLint *value);
   748 
   749     EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
   750     EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
   751 
   752     EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
   753 
   754     EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
   755 
   756     EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
   757         EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
   758         EGLConfig config, const EGLint *attrib_list);
   759 
   760     EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
   761         EGLint attribute, EGLint value);
   762     EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
   763     EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
   764 
   765 
   766     EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
   767 
   768 
   769     EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
   770         EGLContext share_context,
   771         const EGLint *attrib_list);
   772     EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
   773     EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
   774         EGLSurface read, EGLContext ctx);
   775 
   776     EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
   777     EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
   778     EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
   779     EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
   780         EGLint attribute, EGLint *value);
   781 
   782     EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
   783     EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
   784     EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
   785     EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
   786         EGLNativePixmapType target);
   787 
   788     /* This is a generic function pointer type, whose name indicates it must
   789     * be cast to the proper type *and calling convention* before use.
   790     */
   791     typedef void(*__eglMustCastToProperFunctionPointerType)(void);
   792 
   793     /* Now, define eglGetProcAddress using the generic function ptr. type */
   794     EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
   795         eglGetProcAddress(const char *procname);
   796 
   797 #ifdef __cplusplus
   798 }
   799 #endif
   800 
   801 #endif /* __egl_h_ */
   802 
   803 
   804 
   805 
   806 #ifndef __eglext_h_
   807 #define __eglext_h_
   808 
   809 #ifdef __cplusplus
   810 extern "C" {
   811 #endif
   812 
   813     /*
   814     ** Copyright (c) 2007-2013 The Khronos Group Inc.
   815     **
   816     ** Permission is hereby granted, free of charge, to any person obtaining a
   817     ** copy of this software and/or associated documentation files (the
   818     ** "Materials"), to deal in the Materials without restriction, including
   819     ** without limitation the rights to use, copy, modify, merge, publish,
   820     ** distribute, sublicense, and/or sell copies of the Materials, and to
   821     ** permit persons to whom the Materials are furnished to do so, subject to
   822     ** the following conditions:
   823     **
   824     ** The above copyright notice and this permission notice shall be included
   825     ** in all copies or substantial portions of the Materials.
   826     **
   827     ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
   828     ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   829     ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   830     ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   831     ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   832     ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   833     ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
   834     */
   835 
   836 /* #include <EGL/eglplatform.h> */
   837 
   838     /*************************************************************/
   839 
   840     /* Header file version number */
   841     /* Current version at http://www.khronos.org/registry/egl/ */
   842     /* $Revision: 21254 $ on $Date: 2013-04-25 03:11:55 -0700 (Thu, 25 Apr 2013) $ */
   843 #define EGL_EGLEXT_VERSION 16
   844 
   845 #ifndef EGL_KHR_config_attribs
   846 #define EGL_KHR_config_attribs 1
   847 #define EGL_CONFORMANT_KHR			0x3042	/* EGLConfig attribute */
   848 #define EGL_VG_COLORSPACE_LINEAR_BIT_KHR	0x0020	/* EGL_SURFACE_TYPE bitfield */
   849 #define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR		0x0040	/* EGL_SURFACE_TYPE bitfield */
   850 #endif
   851 
   852 #ifndef EGL_KHR_lock_surface
   853 #define EGL_KHR_lock_surface 1
   854 #define EGL_READ_SURFACE_BIT_KHR		0x0001	/* EGL_LOCK_USAGE_HINT_KHR bitfield */
   855 #define EGL_WRITE_SURFACE_BIT_KHR		0x0002	/* EGL_LOCK_USAGE_HINT_KHR bitfield */
   856 #define EGL_LOCK_SURFACE_BIT_KHR		0x0080	/* EGL_SURFACE_TYPE bitfield */
   857 #define EGL_OPTIMAL_FORMAT_BIT_KHR		0x0100	/* EGL_SURFACE_TYPE bitfield */
   858 #define EGL_MATCH_FORMAT_KHR			0x3043	/* EGLConfig attribute */
   859 #define EGL_FORMAT_RGB_565_EXACT_KHR		0x30C0	/* EGL_MATCH_FORMAT_KHR value */
   860 #define EGL_FORMAT_RGB_565_KHR			0x30C1	/* EGL_MATCH_FORMAT_KHR value */
   861 #define EGL_FORMAT_RGBA_8888_EXACT_KHR		0x30C2	/* EGL_MATCH_FORMAT_KHR value */
   862 #define EGL_FORMAT_RGBA_8888_KHR		0x30C3	/* EGL_MATCH_FORMAT_KHR value */
   863 #define EGL_MAP_PRESERVE_PIXELS_KHR		0x30C4	/* eglLockSurfaceKHR attribute */
   864 #define EGL_LOCK_USAGE_HINT_KHR			0x30C5	/* eglLockSurfaceKHR attribute */
   865 #define EGL_BITMAP_POINTER_KHR			0x30C6	/* eglQuerySurface attribute */
   866 #define EGL_BITMAP_PITCH_KHR			0x30C7	/* eglQuerySurface attribute */
   867 #define EGL_BITMAP_ORIGIN_KHR			0x30C8	/* eglQuerySurface attribute */
   868 #define EGL_BITMAP_PIXEL_RED_OFFSET_KHR		0x30C9	/* eglQuerySurface attribute */
   869 #define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR	0x30CA	/* eglQuerySurface attribute */
   870 #define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR	0x30CB	/* eglQuerySurface attribute */
   871 #define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR	0x30CC	/* eglQuerySurface attribute */
   872 #define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR	0x30CD	/* eglQuerySurface attribute */
   873 #define EGL_LOWER_LEFT_KHR			0x30CE	/* EGL_BITMAP_ORIGIN_KHR value */
   874 #define EGL_UPPER_LEFT_KHR			0x30CF	/* EGL_BITMAP_ORIGIN_KHR value */
   875 #ifdef EGL_EGLEXT_PROTOTYPES
   876     EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
   877     EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface);
   878 #endif /* EGL_EGLEXT_PROTOTYPES */
   879     typedef EGLBoolean(EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
   880     typedef EGLBoolean(EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
   881 #endif
   882 
   883 #ifndef EGL_KHR_image
   884 #define EGL_KHR_image 1
   885 #define EGL_NATIVE_PIXMAP_KHR			0x30B0	/* eglCreateImageKHR target */
   886     typedef void *EGLImageKHR;
   887 #define EGL_NO_IMAGE_KHR			((EGLImageKHR)0)
   888 #ifdef EGL_EGLEXT_PROTOTYPES
   889     EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
   890     EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image);
   891 #endif /* EGL_EGLEXT_PROTOTYPES */
   892     typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
   893     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
   894 #endif
   895 
   896 #ifndef EGL_KHR_vg_parent_image
   897 #define EGL_KHR_vg_parent_image 1
   898 #define EGL_VG_PARENT_IMAGE_KHR			0x30BA	/* eglCreateImageKHR target */
   899 #endif
   900 
   901 #ifndef EGL_KHR_gl_texture_2D_image
   902 #define EGL_KHR_gl_texture_2D_image 1
   903 #define EGL_GL_TEXTURE_2D_KHR			0x30B1	/* eglCreateImageKHR target */
   904 #define EGL_GL_TEXTURE_LEVEL_KHR		0x30BC	/* eglCreateImageKHR attribute */
   905 #endif
   906 
   907 #ifndef EGL_KHR_gl_texture_cubemap_image
   908 #define EGL_KHR_gl_texture_cubemap_image 1
   909 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR	0x30B3	/* eglCreateImageKHR target */
   910 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR	0x30B4	/* eglCreateImageKHR target */
   911 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR	0x30B5	/* eglCreateImageKHR target */
   912 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR	0x30B6	/* eglCreateImageKHR target */
   913 #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR	0x30B7	/* eglCreateImageKHR target */
   914 #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR	0x30B8	/* eglCreateImageKHR target */
   915 #endif
   916 
   917 #ifndef EGL_KHR_gl_texture_3D_image
   918 #define EGL_KHR_gl_texture_3D_image 1
   919 #define EGL_GL_TEXTURE_3D_KHR			0x30B2	/* eglCreateImageKHR target */
   920 #define EGL_GL_TEXTURE_ZOFFSET_KHR		0x30BD	/* eglCreateImageKHR attribute */
   921 #endif
   922 
   923 #ifndef EGL_KHR_gl_renderbuffer_image
   924 #define EGL_KHR_gl_renderbuffer_image 1
   925 #define EGL_GL_RENDERBUFFER_KHR			0x30B9	/* eglCreateImageKHR target */
   926 #endif
   927 
   928 #if KHRONOS_SUPPORT_INT64   /* EGLTimeKHR requires 64-bit uint support */
   929 #ifndef EGL_KHR_reusable_sync
   930 #define EGL_KHR_reusable_sync 1
   931 
   932     typedef void* EGLSyncKHR;
   933     typedef khronos_utime_nanoseconds_t EGLTimeKHR;
   934 
   935 #define EGL_SYNC_STATUS_KHR			0x30F1
   936 #define EGL_SIGNALED_KHR			0x30F2
   937 #define EGL_UNSIGNALED_KHR			0x30F3
   938 #define EGL_TIMEOUT_EXPIRED_KHR			0x30F5
   939 #define EGL_CONDITION_SATISFIED_KHR		0x30F6
   940 #define EGL_SYNC_TYPE_KHR			0x30F7
   941 #define EGL_SYNC_REUSABLE_KHR			0x30FA
   942 #define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR		0x0001	/* eglClientWaitSyncKHR <flags> bitfield */
   943 #define EGL_FOREVER_KHR				0xFFFFFFFFFFFFFFFFull
   944 #define EGL_NO_SYNC_KHR				((EGLSyncKHR)0)
   945 #ifdef EGL_EGLEXT_PROTOTYPES
   946     EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
   947     EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
   948     EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
   949     EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
   950     EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
   951 #endif /* EGL_EGLEXT_PROTOTYPES */
   952     typedef EGLSyncKHR(EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
   953     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
   954     typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
   955     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
   956     typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
   957 #endif
   958 #endif
   959 
   960 #ifndef EGL_KHR_image_base
   961 #define EGL_KHR_image_base 1
   962     /* Most interfaces defined by EGL_KHR_image_pixmap above */
   963 #define EGL_IMAGE_PRESERVED_KHR			0x30D2	/* eglCreateImageKHR attribute */
   964 #endif
   965 
   966 #ifndef EGL_KHR_image_pixmap
   967 #define EGL_KHR_image_pixmap 1
   968     /* Interfaces defined by EGL_KHR_image above */
   969 #endif
   970 
   971 #ifndef EGL_IMG_context_priority
   972 #define EGL_IMG_context_priority 1
   973 #define EGL_CONTEXT_PRIORITY_LEVEL_IMG		0x3100
   974 #define EGL_CONTEXT_PRIORITY_HIGH_IMG		0x3101
   975 #define EGL_CONTEXT_PRIORITY_MEDIUM_IMG		0x3102
   976 #define EGL_CONTEXT_PRIORITY_LOW_IMG		0x3103
   977 #endif
   978 
   979 #ifndef EGL_KHR_lock_surface2
   980 #define EGL_KHR_lock_surface2 1
   981 #define EGL_BITMAP_PIXEL_SIZE_KHR		0x3110
   982 #endif
   983 
   984 #ifndef EGL_NV_coverage_sample
   985 #define EGL_NV_coverage_sample 1
   986 #define EGL_COVERAGE_BUFFERS_NV			0x30E0
   987 #define EGL_COVERAGE_SAMPLES_NV			0x30E1
   988 #endif
   989 
   990 #ifndef EGL_NV_depth_nonlinear
   991 #define EGL_NV_depth_nonlinear 1
   992 #define EGL_DEPTH_ENCODING_NV			0x30E2
   993 #define EGL_DEPTH_ENCODING_NONE_NV 0
   994 #define EGL_DEPTH_ENCODING_NONLINEAR_NV		0x30E3
   995 #endif
   996 
   997 #if KHRONOS_SUPPORT_INT64   /* EGLTimeNV requires 64-bit uint support */
   998 #ifndef EGL_NV_sync
   999 #define EGL_NV_sync 1
  1000 #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV	0x30E6
  1001 #define EGL_SYNC_STATUS_NV			0x30E7
  1002 #define EGL_SIGNALED_NV				0x30E8
  1003 #define EGL_UNSIGNALED_NV			0x30E9
  1004 #define EGL_SYNC_FLUSH_COMMANDS_BIT_NV		0x0001
  1005 #define EGL_FOREVER_NV				0xFFFFFFFFFFFFFFFFull
  1006 #define EGL_ALREADY_SIGNALED_NV			0x30EA
  1007 #define EGL_TIMEOUT_EXPIRED_NV			0x30EB
  1008 #define EGL_CONDITION_SATISFIED_NV		0x30EC
  1009 #define EGL_SYNC_TYPE_NV			0x30ED
  1010 #define EGL_SYNC_CONDITION_NV			0x30EE
  1011 #define EGL_SYNC_FENCE_NV			0x30EF
  1012 #define EGL_NO_SYNC_NV				((EGLSyncNV)0)
  1013     typedef void* EGLSyncNV;
  1014     typedef khronos_utime_nanoseconds_t EGLTimeNV;
  1015 #ifdef EGL_EGLEXT_PROTOTYPES
  1016     EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV(EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
  1017     EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV(EGLSyncNV sync);
  1018     EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV(EGLSyncNV sync);
  1019     EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV(EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  1020     EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV(EGLSyncNV sync, EGLenum mode);
  1021     EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV(EGLSyncNV sync, EGLint attribute, EGLint *value);
  1022 #endif /* EGL_EGLEXT_PROTOTYPES */
  1023     typedef EGLSyncNV(EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
  1024     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
  1025     typedef EGLBoolean(EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
  1026     typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  1027     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
  1028     typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
  1029 #endif
  1030 #endif
  1031 
  1032 #if KHRONOS_SUPPORT_INT64   /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
  1033 #ifndef EGL_KHR_fence_sync
  1034 #define EGL_KHR_fence_sync 1
  1035     /* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
  1036 #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR	0x30F0
  1037 #define EGL_SYNC_CONDITION_KHR			0x30F8
  1038 #define EGL_SYNC_FENCE_KHR			0x30F9
  1039 #endif
  1040 #endif
  1041 
  1042 #ifndef EGL_HI_clientpixmap
  1043 #define EGL_HI_clientpixmap 1
  1044 
  1045     /* Surface Attribute */
  1046 #define EGL_CLIENT_PIXMAP_POINTER_HI		0x8F74
  1047     /*
  1048     * Structure representing a client pixmap
  1049     * (pixmap's data is in client-space memory).
  1050     */
  1051     struct EGLClientPixmapHI
  1052     {
  1053         void*		pData;
  1054         EGLint		iWidth;
  1055         EGLint		iHeight;
  1056         EGLint		iStride;
  1057     };
  1058 #ifdef EGL_EGLEXT_PROTOTYPES
  1059     EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
  1060 #endif /* EGL_EGLEXT_PROTOTYPES */
  1061     typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
  1062 #endif	/* EGL_HI_clientpixmap */
  1063 
  1064 #ifndef EGL_HI_colorformats
  1065 #define EGL_HI_colorformats 1
  1066     /* Config Attribute */
  1067 #define EGL_COLOR_FORMAT_HI			0x8F70
  1068     /* Color Formats */
  1069 #define EGL_COLOR_RGB_HI			0x8F71
  1070 #define EGL_COLOR_RGBA_HI			0x8F72
  1071 #define EGL_COLOR_ARGB_HI			0x8F73
  1072 #endif /* EGL_HI_colorformats */
  1073 
  1074 #ifndef EGL_MESA_drm_image
  1075 #define EGL_MESA_drm_image 1
  1076 #define EGL_DRM_BUFFER_FORMAT_MESA		0x31D0	    /* CreateDRMImageMESA attribute */
  1077 #define EGL_DRM_BUFFER_USE_MESA			0x31D1	    /* CreateDRMImageMESA attribute */
  1078 #define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA	0x31D2	    /* EGL_IMAGE_FORMAT_MESA attribute value */
  1079 #define EGL_DRM_BUFFER_MESA			0x31D3	    /* eglCreateImageKHR target */
  1080 #define EGL_DRM_BUFFER_STRIDE_MESA		0x31D4
  1081 #define EGL_DRM_BUFFER_USE_SCANOUT_MESA		0x00000001  /* EGL_DRM_BUFFER_USE_MESA bits */
  1082 #define EGL_DRM_BUFFER_USE_SHARE_MESA		0x00000002  /* EGL_DRM_BUFFER_USE_MESA bits */
  1083 #ifdef EGL_EGLEXT_PROTOTYPES
  1084     EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list);
  1085     EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
  1086 #endif /* EGL_EGLEXT_PROTOTYPES */
  1087     typedef EGLImageKHR(EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
  1088     typedef EGLBoolean(EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
  1089 #endif
  1090 
  1091 #ifndef EGL_NV_post_sub_buffer
  1092 #define EGL_NV_post_sub_buffer 1
  1093 #define EGL_POST_SUB_BUFFER_SUPPORTED_NV	0x30BE
  1094 #ifdef EGL_EGLEXT_PROTOTYPES
  1095     EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  1096 #endif /* EGL_EGLEXT_PROTOTYPES */
  1097     typedef EGLBoolean(EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  1098 #endif
  1099 
  1100 #ifndef EGL_ANGLE_query_surface_pointer
  1101 #define EGL_ANGLE_query_surface_pointer 1
  1102 #ifdef EGL_EGLEXT_PROTOTYPES
  1103     EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
  1104 #endif
  1105     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
  1106 #endif
  1107 
  1108 #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
  1109 #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
  1110 #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE	0x3200
  1111 #endif
  1112 
  1113 #ifndef EGL_NV_coverage_sample_resolve
  1114 #define EGL_NV_coverage_sample_resolve 1
  1115 #define EGL_COVERAGE_SAMPLE_RESOLVE_NV		0x3131
  1116 #define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV	0x3132
  1117 #define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV	0x3133
  1118 #endif
  1119 
  1120 #if KHRONOS_SUPPORT_INT64   /* EGLuint64NV requires 64-bit uint support */
  1121 #ifndef EGL_NV_system_time
  1122 #define EGL_NV_system_time 1
  1123     typedef khronos_utime_nanoseconds_t EGLuint64NV;
  1124 #ifdef EGL_EGLEXT_PROTOTYPES
  1125     EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
  1126     EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
  1127 #endif /* EGL_EGLEXT_PROTOTYPES */
  1128     typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
  1129     typedef EGLuint64NV(EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
  1130 #endif
  1131 #endif
  1132 
  1133 #if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */
  1134 #ifndef EGL_KHR_stream
  1135 #define EGL_KHR_stream 1
  1136     typedef void* EGLStreamKHR;
  1137     typedef khronos_uint64_t EGLuint64KHR;
  1138 #define EGL_NO_STREAM_KHR			((EGLStreamKHR)0)
  1139 #define EGL_CONSUMER_LATENCY_USEC_KHR		0x3210
  1140 #define EGL_PRODUCER_FRAME_KHR			0x3212
  1141 #define EGL_CONSUMER_FRAME_KHR			0x3213
  1142 #define EGL_STREAM_STATE_KHR			0x3214
  1143 #define EGL_STREAM_STATE_CREATED_KHR		0x3215
  1144 #define EGL_STREAM_STATE_CONNECTING_KHR		0x3216
  1145 #define EGL_STREAM_STATE_EMPTY_KHR		0x3217
  1146 #define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR    0x3218
  1147 #define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR    0x3219
  1148 #define EGL_STREAM_STATE_DISCONNECTED_KHR	0x321A
  1149 #define EGL_BAD_STREAM_KHR			0x321B
  1150 #define EGL_BAD_STATE_KHR			0x321C
  1151 #ifdef EGL_EGLEXT_PROTOTYPES
  1152     EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list);
  1153     EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1154     EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
  1155     EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
  1156     EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
  1157 #endif /* EGL_EGLEXT_PROTOTYPES */
  1158     typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list);
  1159     typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1160     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
  1161     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
  1162     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
  1163 #endif
  1164 #endif
  1165 
  1166 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1167 #ifndef EGL_KHR_stream_consumer_gltexture
  1168 #define EGL_KHR_stream_consumer_gltexture 1
  1169 #define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR	0x321E
  1170 #ifdef EGL_EGLEXT_PROTOTYPES
  1171     EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1172     EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1173     EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1174 #endif /* EGL_EGLEXT_PROTOTYPES */
  1175     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1176     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1177     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1178 #endif
  1179 #endif
  1180 
  1181 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1182 #ifndef EGL_KHR_stream_producer_eglsurface
  1183 #define EGL_KHR_stream_producer_eglsurface 1
  1184 #define EGL_STREAM_BIT_KHR			0x0800
  1185 #ifdef EGL_EGLEXT_PROTOTYPES
  1186     EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
  1187 #endif /* EGL_EGLEXT_PROTOTYPES */
  1188     typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
  1189 #endif
  1190 #endif
  1191 
  1192 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1193 #ifndef EGL_KHR_stream_producer_aldatalocator
  1194 #define EGL_KHR_stream_producer_aldatalocator 1
  1195 #endif
  1196 #endif
  1197 
  1198 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1199 #ifndef EGL_KHR_stream_fifo
  1200 #define EGL_KHR_stream_fifo 1
  1201     /* reuse EGLTimeKHR */
  1202 #define EGL_STREAM_FIFO_LENGTH_KHR		0x31FC
  1203 #define EGL_STREAM_TIME_NOW_KHR			0x31FD
  1204 #define EGL_STREAM_TIME_CONSUMER_KHR		0x31FE
  1205 #define EGL_STREAM_TIME_PRODUCER_KHR		0x31FF
  1206 #ifdef EGL_EGLEXT_PROTOTYPES
  1207     EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
  1208 #endif /* EGL_EGLEXT_PROTOTYPES */
  1209     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
  1210 #endif
  1211 #endif
  1212 
  1213 #ifndef EGL_EXT_create_context_robustness
  1214 #define EGL_EXT_create_context_robustness 1
  1215 #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT	0x30BF
  1216 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
  1217 #define EGL_NO_RESET_NOTIFICATION_EXT		0x31BE
  1218 #define EGL_LOSE_CONTEXT_ON_RESET_EXT		0x31BF
  1219 #endif
  1220 
  1221 #ifndef EGL_ANGLE_d3d_share_handle_client_buffer
  1222 #define EGL_ANGLE_d3d_share_handle_client_buffer 1
  1223     /* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */
  1224 #endif
  1225 
  1226 #ifndef EGL_KHR_create_context
  1227 #define EGL_KHR_create_context 1
  1228 #define EGL_CONTEXT_MAJOR_VERSION_KHR			    EGL_CONTEXT_CLIENT_VERSION
  1229 #define EGL_CONTEXT_MINOR_VERSION_KHR			    0x30FB
  1230 #define EGL_CONTEXT_FLAGS_KHR				    0x30FC
  1231 #define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR		    0x30FD
  1232 #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR  0x31BD
  1233 #define EGL_NO_RESET_NOTIFICATION_KHR			    0x31BE
  1234 #define EGL_LOSE_CONTEXT_ON_RESET_KHR			    0x31BF
  1235 #define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR		    0x00000001
  1236 #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR	    0x00000002
  1237 #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR	    0x00000004
  1238 #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR		    0x00000001
  1239 #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR    0x00000002
  1240 #define EGL_OPENGL_ES3_BIT_KHR				    0x00000040
  1241 #endif
  1242 
  1243 #ifndef EGL_KHR_surfaceless_context
  1244 #define EGL_KHR_surfaceless_context 1
  1245     /* No tokens/entry points, just relaxes an error condition */
  1246 #endif
  1247 
  1248 #ifdef EGL_KHR_stream /* Requires KHR_stream extension */
  1249 #ifndef EGL_KHR_stream_cross_process_fd
  1250 #define EGL_KHR_stream_cross_process_fd 1
  1251     typedef int EGLNativeFileDescriptorKHR;
  1252 #define EGL_NO_FILE_DESCRIPTOR_KHR		((EGLNativeFileDescriptorKHR)(-1))
  1253 #ifdef EGL_EGLEXT_PROTOTYPES
  1254     EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream);
  1255     EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  1256 #endif /* EGL_EGLEXT_PROTOTYPES */
  1257     typedef EGLNativeFileDescriptorKHR(EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
  1258     typedef EGLStreamKHR(EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  1259 #endif
  1260 #endif
  1261 
  1262 #ifndef EGL_EXT_multiview_window
  1263 #define EGL_EXT_multiview_window 1
  1264 #define EGL_MULTIVIEW_VIEW_COUNT_EXT		0x3134
  1265 #endif
  1266 
  1267 #ifndef EGL_KHR_wait_sync
  1268 #define EGL_KHR_wait_sync 1
  1269 #ifdef EGL_EGLEXT_PROTOTYPES
  1270     EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  1271 #endif /* EGL_EGLEXT_PROTOTYPES */
  1272     typedef EGLint(EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  1273 #endif
  1274 
  1275 #ifndef EGL_NV_post_convert_rounding
  1276 #define EGL_NV_post_convert_rounding 1
  1277     /* No tokens or entry points, just relaxes behavior of SwapBuffers */
  1278 #endif
  1279 
  1280 #ifndef EGL_NV_native_query
  1281 #define EGL_NV_native_query 1
  1282 #ifdef EGL_EGLEXT_PROTOTYPES
  1283     EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV(EGLDisplay dpy, EGLNativeDisplayType* display_id);
  1284     EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window);
  1285     EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap);
  1286 #endif /* EGL_EGLEXT_PROTOTYPES */
  1287     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id);
  1288     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
  1289     typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
  1290 #endif
  1291 
  1292 #ifndef EGL_NV_3dvision_surface
  1293 #define EGL_NV_3dvision_surface 1
  1294 #define EGL_AUTO_STEREO_NV			0x3136
  1295 #endif
  1296 
  1297 #ifndef EGL_ANDROID_framebuffer_target
  1298 #define EGL_ANDROID_framebuffer_target 1
  1299 #define EGL_FRAMEBUFFER_TARGET_ANDROID		0x3147
  1300 #endif
  1301 
  1302 #ifndef EGL_ANDROID_blob_cache
  1303 #define EGL_ANDROID_blob_cache 1
  1304     typedef khronos_ssize_t EGLsizeiANDROID;
  1305     typedef void(*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
  1306     typedef EGLsizeiANDROID(*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
  1307 #ifdef EGL_EGLEXT_PROTOTYPES
  1308     EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  1309 #endif /* EGL_EGLEXT_PROTOTYPES */
  1310     typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  1311 #endif
  1312 
  1313 #ifndef EGL_ANDROID_image_native_buffer
  1314 #define EGL_ANDROID_image_native_buffer 1
  1315 #define EGL_NATIVE_BUFFER_ANDROID		0x3140
  1316 #endif
  1317 
  1318 #ifndef EGL_ANDROID_native_fence_sync
  1319 #define EGL_ANDROID_native_fence_sync 1
  1320 #define EGL_SYNC_NATIVE_FENCE_ANDROID		0x3144
  1321 #define EGL_SYNC_NATIVE_FENCE_FD_ANDROID	0x3145
  1322 #define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID	0x3146
  1323 #define EGL_NO_NATIVE_FENCE_FD_ANDROID		-1
  1324 #ifdef EGL_EGLEXT_PROTOTYPES
  1325     EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR);
  1326 #endif /* EGL_EGLEXT_PROTOTYPES */
  1327     typedef EGLint(EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR);
  1328 #endif
  1329 
  1330 #ifndef EGL_ANDROID_recordable
  1331 #define EGL_ANDROID_recordable 1
  1332 #define EGL_RECORDABLE_ANDROID			0x3142
  1333 #endif
  1334 
  1335 #ifndef EGL_EXT_buffer_age
  1336 #define EGL_EXT_buffer_age 1
  1337 #define EGL_BUFFER_AGE_EXT			0x313D
  1338 #endif
  1339 
  1340 #ifndef EGL_EXT_image_dma_buf_import
  1341 #define EGL_EXT_image_dma_buf_import 1
  1342 #define EGL_LINUX_DMA_BUF_EXT			0x3270
  1343 #define EGL_LINUX_DRM_FOURCC_EXT		0x3271
  1344 #define EGL_DMA_BUF_PLANE0_FD_EXT		0x3272
  1345 #define EGL_DMA_BUF_PLANE0_OFFSET_EXT		0x3273
  1346 #define EGL_DMA_BUF_PLANE0_PITCH_EXT		0x3274
  1347 #define EGL_DMA_BUF_PLANE1_FD_EXT		0x3275
  1348 #define EGL_DMA_BUF_PLANE1_OFFSET_EXT		0x3276
  1349 #define EGL_DMA_BUF_PLANE1_PITCH_EXT		0x3277
  1350 #define EGL_DMA_BUF_PLANE2_FD_EXT		0x3278
  1351 #define EGL_DMA_BUF_PLANE2_OFFSET_EXT		0x3279
  1352 #define EGL_DMA_BUF_PLANE2_PITCH_EXT		0x327A
  1353 #define EGL_YUV_COLOR_SPACE_HINT_EXT		0x327B
  1354 #define EGL_SAMPLE_RANGE_HINT_EXT		0x327C
  1355 #define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
  1356 #define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
  1357 #define EGL_ITU_REC601_EXT			0x327F
  1358 #define EGL_ITU_REC709_EXT			0x3280
  1359 #define EGL_ITU_REC2020_EXT			0x3281
  1360 #define EGL_YUV_FULL_RANGE_EXT			0x3282
  1361 #define EGL_YUV_NARROW_RANGE_EXT		0x3283
  1362 #define EGL_YUV_CHROMA_SITING_0_EXT		0x3284
  1363 #define EGL_YUV_CHROMA_SITING_0_5_EXT		0x3285
  1364 #endif
  1365 
  1366 #ifndef EGL_ARM_pixmap_multisample_discard
  1367 #define EGL_ARM_pixmap_multisample_discard 1
  1368 #define EGL_DISCARD_SAMPLES_ARM			0x3286
  1369 #endif
  1370 
  1371 #ifndef EGL_EXT_swap_buffers_with_damage
  1372 #define EGL_EXT_swap_buffers_with_damage 1
  1373 #ifdef EGL_EGLEXT_PROTOTYPES
  1374     EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
  1375 #endif /* EGL_EGLEXT_PROTOTYPES */
  1376     typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
  1377 #endif
  1378 
  1379 /* #include <EGL/eglmesaext.h> */
  1380 
  1381 #ifdef __cplusplus
  1382 }
  1383 #endif
  1384 
  1385 #endif /* __eglext_h_ */
  1386 
  1387 
  1388 
  1389 #endif /* _MSC_VER */