Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1389 lines
55 KiB

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