SDL_egl.h 55 KB

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