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