eglew.h 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  1. /*
  2. ** The OpenGL Extension Wrangler Library
  3. ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
  4. ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
  5. ** Copyright (C) 2002, Lev Povalahev
  6. ** All rights reserved.
  7. **
  8. ** Redistribution and use in source and binary forms, with or without
  9. ** modification, are permitted provided that the following conditions are met:
  10. **
  11. ** * Redistributions of source code must retain the above copyright notice,
  12. ** this list of conditions and the following disclaimer.
  13. ** * Redistributions in binary form must reproduce the above copyright notice,
  14. ** this list of conditions and the following disclaimer in the documentation
  15. ** and/or other materials provided with the distribution.
  16. ** * The name of the author may be used to endorse or promote products
  17. ** derived from this software without specific prior written permission.
  18. **
  19. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  20. ** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21. ** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. ** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  23. ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24. ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25. ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. ** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  27. ** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  28. ** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  29. ** THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. /*
  32. ** Copyright (c) 2007 The Khronos Group Inc.
  33. **
  34. ** Permission is hereby granted, free of charge, to any person obtaining a
  35. ** copy of this software and/or associated documentation files (the
  36. ** "Materials"), to deal in the Materials without restriction, including
  37. ** without limitation the rights to use, copy, modify, merge, publish,
  38. ** distribute, sublicense, and/or sell copies of the Materials, and to
  39. ** permit persons to whom the Materials are furnished to do so, subject to
  40. ** the following conditions:
  41. **
  42. ** The above copyright notice and this permission notice shall be included
  43. ** in all copies or substantial portions of the Materials.
  44. **
  45. ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  46. ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  47. ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  48. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  49. ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  50. ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  51. ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  52. */
  53. /*
  54. ** License Applicability. Except to the extent portions of this file are
  55. ** made subject to an alternative license as permitted in the SGI Free
  56. ** Software License B, Version 1.0 (the "License"), the contents of this
  57. ** file are subject only to the provisions of the License. You may not use
  58. ** this file except in compliance with the License. You may obtain a copy
  59. ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
  60. ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
  61. **
  62. ** http://oss.sgi.com/projects/FreeB
  63. **
  64. ** Note that, as provided in the License, the Software is distributed on an
  65. ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
  66. ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
  67. ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
  68. ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
  69. **
  70. ** Original Code. The Original Code is: OpenGL Sample Implementation,
  71. ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
  72. ** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
  73. ** Copyright in any portions created by third parties is as indicated
  74. ** elsewhere herein. All Rights Reserved.
  75. **
  76. ** Additional Notice Provisions: The application programming interfaces
  77. ** established by SGI in conjunction with the Original Code are The
  78. ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
  79. ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
  80. ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
  81. ** Window System(R) (Version 1.3), released October 19, 1998. This software
  82. ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
  83. ** published by SGI, but has not been independently verified as being
  84. ** compliant with the OpenGL(R) version 1.2.1 Specification.
  85. */
  86. /*
  87. ** Copyright (c) 2007-2009 The Khronos Group Inc.
  88. **
  89. ** Permission is hereby granted, free of charge, to any person obtaining a
  90. ** copy of this software and/or associated documentation files (the
  91. ** "Materials"), to deal in the Materials without restriction, including
  92. ** without limitation the rights to use, copy, modify, merge, publish,
  93. ** distribute, sublicense, and/or sell copies of the Materials, and to
  94. ** permit persons to whom the Materials are furnished to do so, subject to
  95. ** the following conditions:
  96. **
  97. ** The above copyright notice and this permission notice shall be included
  98. ** in all copies or substantial portions of the Materials.
  99. **
  100. ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  101. ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  102. ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  103. ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  104. ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  105. ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  106. ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  107. */
  108. /* Platform-specific types and definitions for egl.h
  109. * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
  110. *
  111. * Adopters may modify khrplatform.h and this file to suit their platform.
  112. * You are encouraged to submit all modifications to the Khronos group so that
  113. * they can be included in future versions of this file. Please submit changes
  114. * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
  115. * by filing a bug against product "EGL" component "Registry".
  116. */
  117. /* Copyright © 2011 Linaro Limited
  118. */
  119. #ifndef __eglew_h__
  120. #define __eglew_h__
  121. #define __EGLEW_H__
  122. #if defined(__egl_h_) || defined (__EGL_H_)
  123. #error egl.h included before glew.h
  124. #endif
  125. #if defined(__eglext_h_) || defined (__EGLEXT_H_)
  126. #error eglext.h included before glew.h
  127. #endif
  128. #if defined(__eglplatform_h_) || defined (__EGLPLATFORM_H_)
  129. #error eglplatform.h included before glew.h
  130. #endif
  131. #if defined(GLES_EGLTYPES_H) || defined (gles_egltypes_h)
  132. #error egltypes.h.h included before glew.h
  133. #endif
  134. #define __egl_h_
  135. #define __EGL_H_
  136. #define __eglext_h_
  137. #define __EGLEXT_H_
  138. #define GLES_EGLTYPES_H
  139. #define gles_egltypes_h
  140. #define __eglplatform_h_
  141. #define __EGLPLATFORM_H_
  142. /* TODO insert license */
  143. /* Includes */
  144. #include <GL/glew.h>
  145. /* Macros used in EGL function prototype declarations.
  146. *
  147. * EGL functions should be prototyped as:
  148. *
  149. * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
  150. * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
  151. *
  152. * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
  153. */
  154. #ifndef EGLAPI
  155. #define EGLAPI KHRONOS_APICALL
  156. #endif
  157. #ifndef EGLAPIENTRY
  158. #define EGLAPIENTRY KHRONOS_APIENTRY
  159. #endif
  160. #define EGLAPIENTRYP EGLAPIENTRY*
  161. /* The types NativeDisplayType, NativeWindowType, and NativePixmapType
  162. * are aliases of window-system-dependent types, such as X Display * or
  163. * Windows Device Context. They must be defined in platform-specific
  164. * code below. The EGL-prefixed versions of Native*Type are the same
  165. * types, renamed in EGL 1.3 so all types in the API start with "EGL".
  166. *
  167. * Khronos STRONGLY RECOMMENDS that you use the default definitions
  168. * provided below, since these changes affect both binary and source
  169. * portability of applications using EGL running on different EGL
  170. * implementations.
  171. */
  172. #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
  173. #ifndef WIN32_LEAN_AND_MEAN
  174. #define WIN32_LEAN_AND_MEAN 1
  175. #endif
  176. #include <windows.h>
  177. typedef HDC EGLNativeDisplayType;
  178. typedef HBITMAP EGLNativePixmapType;
  179. typedef HWND EGLNativeWindowType;
  180. #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
  181. typedef int EGLNativeDisplayType;
  182. typedef void *EGLNativeWindowType;
  183. typedef void *EGLNativePixmapType;
  184. #elif defined(__unix__)
  185. /* X11 (tentative) */
  186. #include <X11/Xlib.h>
  187. #include <X11/Xutil.h>
  188. typedef Display *EGLNativeDisplayType;
  189. typedef Pixmap EGLNativePixmapType;
  190. typedef Window EGLNativeWindowType;
  191. #elif defined(__APPLE__)
  192. typedef void *EGLNativeDisplayType;
  193. typedef void *EGLNativePixmapType;
  194. typedef void *EGLNativeWindowType;
  195. #endif
  196. /* EGL 1.2 types, renamed for consistency in EGL 1.3 */
  197. typedef EGLNativeDisplayType NativeDisplayType;
  198. typedef EGLNativePixmapType NativePixmapType;
  199. typedef EGLNativeWindowType NativeWindowType;
  200. /* Define EGLint. This must be a signed integral type large enough to contain
  201. * all legal attribute names and values passed into and out of EGL, whether
  202. * their type is boolean, bitmask, enumerant (symbolic constant), integer,
  203. * handle, or other. While in general a 32-bit integer will suffice, if
  204. * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
  205. * integer type.
  206. */
  207. typedef khronos_int32_t EGLint;
  208. /* Basic types */
  209. typedef int EGLBoolean;
  210. /* Internal types */
  211. typedef void *EGLDisplay;
  212. typedef void *EGLConfig;
  213. typedef void *EGLSurface;
  214. typedef void *EGLContext;
  215. /* Handle values */
  216. #define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)-1)
  217. #define EGL_NO_CONTEXT ((EGLContext)0)
  218. #define EGL_NO_DISPLAY ((EGLDisplay)0)
  219. #define EGL_NO_SURFACE ((EGLSurface)0)
  220. #define EGL_UNKNOWN ((EGLint)-1)
  221. #ifdef __cplusplus
  222. extern "C" {
  223. #endif
  224. /* ----------------------------- EGL_VERSION_1_1 ---------------------------- */
  225. #ifndef EGL_VERSION_1_1
  226. #define EGL_VERSION_1_0 1
  227. #define EGL_VERSION_1_1 1
  228. /*
  229. ** Boolean
  230. */
  231. #define EGL_FALSE 0
  232. #define EGL_TRUE 1
  233. /*
  234. ** Errors
  235. */
  236. #define EGL_SUCCESS 0x3000
  237. #define EGL_NOT_INITIALIZED 0x3001
  238. #define EGL_BAD_ACCESS 0x3002
  239. #define EGL_BAD_ALLOC 0x3003
  240. #define EGL_BAD_ATTRIBUTE 0x3004
  241. #define EGL_BAD_CONFIG 0x3005
  242. #define EGL_BAD_CONTEXT 0x3006
  243. #define EGL_BAD_CURRENT_SURFACE 0x3007
  244. #define EGL_BAD_DISPLAY 0x3008
  245. #define EGL_BAD_MATCH 0x3009
  246. #define EGL_BAD_NATIVE_PIXMAP 0x300A
  247. #define EGL_BAD_NATIVE_WINDOW 0x300B
  248. #define EGL_BAD_PARAMETER 0x300C
  249. #define EGL_BAD_SURFACE 0x300D
  250. #define EGL_CONTEXT_LOST 0x300E
  251. /* 0x300F - 0x301F reserved for additional errors. */
  252. /*
  253. ** Config attributes
  254. */
  255. #define EGL_BUFFER_SIZE 0x3020
  256. #define EGL_ALPHA_SIZE 0x3021
  257. #define EGL_BLUE_SIZE 0x3022
  258. #define EGL_GREEN_SIZE 0x3023
  259. #define EGL_RED_SIZE 0x3024
  260. #define EGL_DEPTH_SIZE 0x3025
  261. #define EGL_STENCIL_SIZE 0x3026
  262. #define EGL_CONFIG_CAVEAT 0x3027
  263. #define EGL_CONFIG_ID 0x3028
  264. #define EGL_LEVEL 0x3029
  265. #define EGL_MAX_PBUFFER_HEIGHT 0x302A
  266. #define EGL_MAX_PBUFFER_PIXELS 0x302B
  267. #define EGL_MAX_PBUFFER_WIDTH 0x302C
  268. #define EGL_NATIVE_RENDERABLE 0x302D
  269. #define EGL_NATIVE_VISUAL_ID 0x302E
  270. #define EGL_NATIVE_VISUAL_TYPE 0x302F
  271. /*#define EGL_PRESERVED_RESOURCES 0x3030*/
  272. #define EGL_SAMPLES 0x3031
  273. #define EGL_SAMPLE_BUFFERS 0x3032
  274. #define EGL_SURFACE_TYPE 0x3033
  275. #define EGL_TRANSPARENT_TYPE 0x3034
  276. #define EGL_TRANSPARENT_BLUE_VALUE 0x3035
  277. #define EGL_TRANSPARENT_GREEN_VALUE 0x3036
  278. #define EGL_TRANSPARENT_RED_VALUE 0x3037
  279. #define EGL_NONE 0x3038 /* Also a config value */
  280. #define EGL_BIND_TO_TEXTURE_RGB 0x3039
  281. #define EGL_BIND_TO_TEXTURE_RGBA 0x303A
  282. #define EGL_MIN_SWAP_INTERVAL 0x303B
  283. #define EGL_MAX_SWAP_INTERVAL 0x303C
  284. /*
  285. ** Config values
  286. */
  287. #define EGL_DONT_CARE ((EGLint) -1)
  288. #define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */
  289. #define EGL_NON_CONFORMANT_CONFIG 0x3051 /* " */
  290. #define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */
  291. #define EGL_NO_TEXTURE 0x305C /* EGL_TEXTURE_FORMAT/TARGET value */
  292. #define EGL_TEXTURE_RGB 0x305D /* EGL_TEXTURE_FORMAT value */
  293. #define EGL_TEXTURE_RGBA 0x305E /* " */
  294. #define EGL_TEXTURE_2D 0x305F /* EGL_TEXTURE_TARGET value */
  295. /*
  296. ** Config attribute mask bits
  297. */
  298. #define EGL_PBUFFER_BIT 0x01 /* EGL_SURFACE_TYPE mask bit */
  299. #define EGL_PIXMAP_BIT 0x02 /* " */
  300. #define EGL_WINDOW_BIT 0x04 /* " */
  301. /*
  302. ** String names
  303. */
  304. #define EGL_VENDOR 0x3053 /* eglQueryString target */
  305. #define EGL_VERSION 0x3054 /* " */
  306. #define EGL_EXTENSIONS 0x3055 /* " */
  307. /*
  308. ** Surface attributes
  309. */
  310. #define EGL_HEIGHT 0x3056
  311. #define EGL_WIDTH 0x3057
  312. #define EGL_LARGEST_PBUFFER 0x3058
  313. #define EGL_TEXTURE_FORMAT 0x3080 /* For pbuffers bound as textures */
  314. #define EGL_TEXTURE_TARGET 0x3081 /* " */
  315. #define EGL_MIPMAP_TEXTURE 0x3082 /* " */
  316. #define EGL_MIPMAP_LEVEL 0x3083 /* " */
  317. /*
  318. ** BindTexImage / ReleaseTexImage buffer target
  319. */
  320. #define EGL_BACK_BUFFER 0x3084
  321. /*
  322. ** Current surfaces
  323. */
  324. #define EGL_DRAW 0x3059
  325. #define EGL_READ 0x305A
  326. /*
  327. ** Engines
  328. */
  329. #define EGL_CORE_NATIVE_ENGINE 0x305B
  330. /* 0x305C-0x3FFFF reserved for future use */
  331. /*
  332. ** Functions
  333. */
  334. EGLAPI EGLint EGLAPIENTRY eglGetError (void);
  335. EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (NativeDisplayType display);
  336. EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
  337. EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
  338. EGLAPI const char * EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
  339. EGLAPI void (* EGLAPIENTRY eglGetProcAddress (const char *procname))();
  340. EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
  341. EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
  342. EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
  343. EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list);
  344. EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list);
  345. EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
  346. EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
  347. EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
  348. /* EGL 1.1 render-to-texture APIs */
  349. EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
  350. EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
  351. EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
  352. /* EGL 1.1 swap control API */
  353. EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
  354. EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list);
  355. EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
  356. EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
  357. EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
  358. EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
  359. EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
  360. EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
  361. EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
  362. EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
  363. EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface draw);
  364. EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target);
  365. #define EGLEW_VERSION_1_1 EGLEW_GET_VAR(__EGLEW_VERSION_1_1)
  366. #endif /* EGL_VERSION_1_1 */
  367. /* ---------------------------- EGL_VERSION_1_2 ---------------------------- */
  368. #if !defined(EGL_VERSION_1_2)
  369. #define EGL_VERSION_1_2 1
  370. #define EGL_OPENGL_ES_BIT 0x01
  371. #define EGL_OPENVG_BIT 0x02
  372. #define EGL_PRESERVED_RESOURCES 0x3030
  373. #define EGL_LUMINANCE_SIZE 0x303D
  374. #define EGL_ALPHA_MASK_SIZE 0x303E
  375. #define EGL_COLOR_BUFFER_TYPE 0x303F
  376. #define EGL_RENDERABLE_TYPE 0x3040
  377. #define EGL_SINGLE_BUFFER 0x3085
  378. #define EGL_RENDER_BUFFER 0x3086
  379. #define EGL_COLORSPACE 0x3087
  380. #define EGL_ALPHA_FORMAT 0x3088
  381. #define EGL_COLORSPACE_sRGB 0x3089
  382. #define EGL_COLORSPACE_LINEAR 0x308A
  383. #define EGL_ALPHA_FORMAT_NONPRE 0x308B
  384. #define EGL_ALPHA_FORMAT_PRE 0x308C
  385. #define EGL_CLIENT_APIS 0x308D
  386. #define EGL_RGB_BUFFER 0x308E
  387. #define EGL_LUMINANCE_BUFFER 0x308F
  388. #define EGL_HORIZONTAL_RESOLUTION 0x3090
  389. #define EGL_VERTICAL_RESOLUTION 0x3091
  390. #define EGL_PIXEL_ASPECT_RATIO 0x3092
  391. #define EGL_SWAP_BEHAVIOR 0x3093
  392. #define EGL_BUFFER_PRESERVED 0x3094
  393. #define EGL_BUFFER_DESTROYED 0x3095
  394. #define EGL_OPENVG_IMAGE 0x3096
  395. #define EGL_CONTEXT_CLIENT_TYPE 0x3097
  396. #define EGL_OPENGL_ES_API 0x30A0
  397. #define EGL_OPENVG_API 0x30A1
  398. #define EGL_DISPLAY_SCALING 10000
  399. typedef unsigned int EGLenum;
  400. typedef void *EGLClientBuffer;
  401. typedef EGLBoolean (EGLAPIENTRY * PFNEGLBINDAPIPROC) (EGLenum);
  402. typedef EGLSurface (EGLAPIENTRY * PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) (EGLDisplay, EGLenum, EGLClientBuffer, EGLConfig, const EGLint *);
  403. typedef EGLenum (EGLAPIENTRY * PFNEGLQUERYAPIPROC) (void);
  404. typedef EGLBoolean (EGLAPIENTRY * PFNEGLRELEASETHREADPROC) (void);
  405. typedef EGLBoolean (EGLAPIENTRY * PFNEGLWAITCLIENTPROC) (void);
  406. #define eglBindAPI EGLEW_GET_FUN(__eglewBindAPI)
  407. #define eglCreatePbufferFromClientBuffer EGLEW_GET_FUN(__eglewCreatePbufferFromClientBuffer)
  408. #define eglQueryAPI EGLEW_GET_FUN(__eglewQueryAPI)
  409. #define eglReleaseThread EGLEW_GET_FUN(__eglewReleaseThread)
  410. #define eglWaitClient EGLEW_GET_FUN(__eglewWaitClient)
  411. #define EGLEW_VERSION_1_2 EGLEW_GET_VAR(__EGLEW_VERSION_1_2)
  412. #endif /* !EGL_VERSION_1_2 */
  413. /* ---------------------------- EGL_VERSION_1_3 ---------------------------- */
  414. #if !defined(EGL_VERSION_1_3)
  415. #define EGL_VERSION_1_3 1
  416. #define EGL_OPENGL_ES2_BIT 0x04
  417. #define EGL_MATCH_NATIVE_PIXMAP 0x3041
  418. #define EGL_CONTEXT_CLIENT_VERSION 0x3098
  419. #define EGLEW_VERSION_1_3 EGLEW_GET_VAR(__EGLEW_VERSION_1_3)
  420. #endif /* !EGL_VERSION_1_3 */
  421. /* ---------------------------- EGL_VERSION_1_4 ---------------------------- */
  422. #if !defined(EGL_VERSION_1_4)
  423. #define EGL_VERSION_1_4 1
  424. #define EGL_OPENGL_BIT 0x0008
  425. #define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
  426. #define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
  427. #define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
  428. #define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
  429. #define EGL_VG_COLORSPACE 0x3087
  430. #define EGL_VG_ALPHA_FORMAT 0x3088
  431. #define EGL_VG_COLORSPACE_sRGB 0x3089
  432. #define EGL_VG_COLORSPACE_LINEAR 0x308A
  433. #define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
  434. #define EGL_VG_ALPHA_FORMAT_PRE 0x308C
  435. #define EGL_MULTISAMPLE_RESOLVE 0x3099
  436. #define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
  437. #define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
  438. #define EGL_OPENGL_API 0x30A2
  439. typedef void (*__eglMustCastToProperFunctionPointerType)(void);
  440. #define EGLEW_VERSION_1_4 EGLEW_GET_VAR(__EGLEW_VERSION_1_4)
  441. #endif /* !EGL_VERSION_1_4 */
  442. /* ---------------------------- EGL_VERSION_1_5 ---------------------------- */
  443. #if !defined(EGL_VERSION_1_5)
  444. #define EGL_VERSION_1_5 1
  445. typedef void *EGLSync;
  446. typedef intptr_t EGLAttrib;
  447. typedef khronos_utime_nanoseconds_t EGLTime;
  448. #define EGL_CONTEXT_MAJOR_VERSION 0x3098
  449. #define EGL_CONTEXT_MINOR_VERSION 0x30FB
  450. #define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
  451. #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
  452. #define EGL_NO_RESET_NOTIFICATION 0x31BE
  453. #define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
  454. #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
  455. #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
  456. #define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
  457. #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
  458. #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
  459. #define EGL_OPENGL_ES3_BIT 0x00000040
  460. #define EGL_CL_EVENT_HANDLE 0x309C
  461. #define EGL_SYNC_CL_EVENT 0x30FE
  462. #define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
  463. #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
  464. #define EGL_SYNC_TYPE 0x30F7
  465. #define EGL_SYNC_STATUS 0x30F1
  466. #define EGL_SYNC_CONDITION 0x30F8
  467. #define EGL_SIGNALED 0x30F2
  468. #define EGL_UNSIGNALED 0x30F3
  469. #define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
  470. #define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
  471. #define EGL_TIMEOUT_EXPIRED 0x30F5
  472. #define EGL_CONDITION_SATISFIED 0x30F6
  473. #define EGL_NO_SYNC ((EGLSync)0)
  474. #define EGL_SYNC_FENCE 0x30F9
  475. #define EGL_GL_COLORSPACE 0x309D
  476. #define EGL_GL_COLORSPACE_SRGB 0x3089
  477. #define EGL_GL_COLORSPACE_LINEAR 0x308A
  478. #define EGL_GL_RENDERBUFFER 0x30B9
  479. #define EGL_GL_TEXTURE_2D 0x30B1
  480. #define EGL_GL_TEXTURE_LEVEL 0x30BC
  481. #define EGL_GL_TEXTURE_3D 0x30B2
  482. #define EGL_GL_TEXTURE_ZOFFSET 0x30BD
  483. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
  484. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
  485. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
  486. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
  487. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
  488. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
  489. typedef EGLSync (EGLAPIENTRY * PFNCREATESYNC ) (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
  490. typedef EGLBoolean (EGLAPIENTRY * PFNDESTROYSYNC ) (EGLDisplay dpy, EGLSync sync);
  491. typedef EGLint (EGLAPIENTRY * PFNCLIENTWAITSYNC ) (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
  492. typedef EGLBoolean (EGLAPIENTRY * PFNGETSYNCATTRIB ) (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
  493. typedef EGLDisplay (EGLAPIENTRY * PFNGETPLATFORMDISPLAY ) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
  494. typedef EGLSurface (EGLAPIENTRY * PFNCREATEPLATFORMWINDOWSURFACE) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
  495. typedef EGLSurface (EGLAPIENTRY * PFNCREATEPLATFORMPIXMAPSURFACE) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
  496. typedef EGLBoolean (EGLAPIENTRY * PFNWAITSYNC ) (EGLDisplay dpy, EGLSync sync, EGLint flags);
  497. #define eglCreateSync EGLEW_GET_FUN(__eglewCreateSync )
  498. #define eglDestroySync EGLEW_GET_FUN(__eglewDestroySync )
  499. #define eglClientWaitSync EGLEW_GET_FUN(__eglewClientWaitSync )
  500. #define eglGetSyncAttrib EGLEW_GET_FUN(__eglewGetSyncAttrib )
  501. #define eglGetPlatformDisplay EGLEW_GET_FUN(__eglewGetPlatformDisplay )
  502. #define eglCreatePlatformWindowSurface EGLEW_GET_FUN(__eglewCreatePlatformWindowSurface)
  503. #define eglCreatePlatformPixmapSurface EGLEW_GET_FUN(__eglewCreatePlatformPixmapSurface)
  504. #define eglWaitSync EGLEW_GET_FUN(__eglewWaitSync )
  505. #define EGLEW_VERSION_1_5 EGLEW_GET_VAR(__EGLEW_VERSION_1_5)
  506. #endif /* !EGL_VERSION_1_5 */
  507. /* ------------------------- EGL_ANDROID_blob_cache ------------------------ */
  508. #if !defined(EGL_ANDROID_blob_cache)
  509. #define EGL_ANDROID_blob_cache 1
  510. typedef khronos_ssize_t EGLsizeiANDROID; // NOTE jwilkins: missing typedef
  511. typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void* key, EGLsizeiANDROID keySize, void* value, EGLsizeiANDROID valueSize); // NOTE jwilkins: missing typedef
  512. typedef void (*EGLSetBlobFuncANDROID) (const void* key, EGLsizeiANDROID keySize, const void* value, EGLsizeiANDROID valueSize); // NOTE jwilkins: missing typedef
  513. typedef void (EGLAPIENTRY * PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
  514. #define eglSetBlobCacheFuncsANDROID EGLEW_GET_FUN(__eglewSetBlobCacheFuncsANDROID)
  515. #define EGLEW_ANDROID_blob_cache EGLEW_GET_VAR(__EGLEW_ANDROID_blob_cache)
  516. #endif /* !EGL_ANDROID_blob_cache */
  517. /* --------------------- EGL_ANDROID_framebuffer_target -------------------- */
  518. #if !defined(EGL_ANDROID_framebuffer_target)
  519. #define EGL_ANDROID_framebuffer_target 1
  520. #define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147
  521. #define EGLEW_ANDROID_framebuffer_target EGLEW_GET_VAR(__EGLEW_ANDROID_framebuffer_target)
  522. #endif /* !EGL_ANDROID_framebuffer_target */
  523. /* -------------------- EGL_ANDROID_image_native_buffer -------------------- */
  524. #if !defined(EGL_ANDROID_image_native_buffer)
  525. #define EGL_ANDROID_image_native_buffer 1
  526. #define EGL_NATIVE_BUFFER_ANDROID 0x3140
  527. #define EGLEW_ANDROID_image_native_buffer EGLEW_GET_VAR(__EGLEW_ANDROID_image_native_buffer)
  528. #endif /* !EGL_ANDROID_image_native_buffer */
  529. /* --------------------- EGL_ANDROID_native_fence_sync --------------------- */
  530. #if !defined(EGL_ANDROID_native_fence_sync)
  531. #define EGL_ANDROID_native_fence_sync 1
  532. typedef void* EGLSyncKHR; // NOTE jwilkins: missing typedef
  533. #define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
  534. #define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
  535. #define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
  536. typedef EGLint (EGLAPIENTRY * PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR);
  537. #define eglDupNativeFenceFDANDROID EGLEW_GET_FUN(__eglewDupNativeFenceFDANDROID)
  538. #define EGLEW_ANDROID_native_fence_sync EGLEW_GET_VAR(__EGLEW_ANDROID_native_fence_sync)
  539. #endif /* !EGL_ANDROID_native_fence_sync */
  540. /* ------------------------- EGL_ANDROID_recordable ------------------------ */
  541. #if !defined(EGL_ANDROID_recordable)
  542. #define EGL_ANDROID_recordable 1
  543. #define EGL_RECORDABLE_ANDROID 0x3142
  544. #define EGLEW_ANDROID_recordable EGLEW_GET_VAR(__EGLEW_ANDROID_recordable)
  545. #endif /* !EGL_ANDROID_recordable */
  546. /* ---------------- EGL_ANGLE_d3d_share_handle_client_buffer --------------- */
  547. #if !defined(EGL_ANGLE_d3d_share_handle_client_buffer)
  548. #define EGL_ANGLE_d3d_share_handle_client_buffer 1
  549. #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
  550. #define EGLEW_ANGLE_d3d_share_handle_client_buffer EGLEW_GET_VAR(__EGLEW_ANGLE_d3d_share_handle_client_buffer)
  551. #endif /* !EGL_ANGLE_d3d_share_handle_client_buffer */
  552. /* -------------------- EGL_ANGLE_query_surface_pointer -------------------- */
  553. #if !defined(EGL_ANGLE_query_surface_pointer)
  554. #define EGL_ANGLE_query_surface_pointer 1
  555. typedef EGLBoolean (EGLAPIENTRY * PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void ** value);
  556. #define eglQuerySurfacePointerANGLE EGLEW_GET_FUN(__eglewQuerySurfacePointerANGLE)
  557. #define EGLEW_ANGLE_query_surface_pointer EGLEW_GET_VAR(__EGLEW_ANGLE_query_surface_pointer)
  558. #endif /* !EGL_ANGLE_query_surface_pointer */
  559. /* ------------- EGL_ANGLE_surface_d3d_texture_2d_share_handle ------------- */
  560. #if !defined(EGL_ANGLE_surface_d3d_texture_2d_share_handle)
  561. #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
  562. #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
  563. #define EGLEW_ANGLE_surface_d3d_texture_2d_share_handle EGLEW_GET_VAR(__EGLEW_ANGLE_surface_d3d_texture_2d_share_handle)
  564. #endif /* !EGL_ANGLE_surface_d3d_texture_2d_share_handle */
  565. /* --------------------------- EGL_EXT_buffer_age -------------------------- */
  566. #if !defined(EGL_EXT_buffer_age)
  567. #define EGL_EXT_buffer_age 1
  568. #define EGL_BUFFER_AGE_EXT 0x313D
  569. #define EGLEW_EXT_buffer_age EGLEW_GET_VAR(__EGLEW_EXT_buffer_age)
  570. #endif /* !EGL_EXT_buffer_age */
  571. /* ------------------- EGL_EXT_create_context_robustness ------------------- */
  572. #if !defined(EGL_EXT_create_context_robustness)
  573. #define EGL_EXT_create_context_robustness 1
  574. #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
  575. #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
  576. #define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
  577. #define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
  578. #define EGLEW_EXT_create_context_robustness EGLEW_GET_VAR(__EGLEW_EXT_create_context_robustness)
  579. #endif /* !EGL_EXT_create_context_robustness */
  580. /* ------------------------ EGL_EXT_multiview_window ----------------------- */
  581. #if !defined(EGL_EXT_multiview_window)
  582. #define EGL_EXT_multiview_window 1
  583. #define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134
  584. #define EGLEW_EXT_multiview_window EGLEW_GET_VAR(__EGLEW_EXT_multiview_window)
  585. #endif /* !EGL_EXT_multiview_window */
  586. /* -------------------------- EGL_HI_clientpixmap -------------------------- */
  587. #if !defined(EGL_HI_clientpixmap)
  588. #define EGL_HI_clientpixmap 1
  589. #define EGLEW_HI_clientpixmap EGLEW_GET_VAR(__EGLEW_HI_clientpixmap)
  590. #endif /* !EGL_HI_clientpixmap */
  591. /* -------------------------- EGL_HI_colorformats -------------------------- */
  592. #if !defined(EGL_HI_colorformats)
  593. #define EGL_HI_colorformats 1
  594. #define EGL_COLOR_FORMAT_HI 0x8F70
  595. #define EGL_COLOR_RGB_HI 0x8F71
  596. #define EGL_COLOR_RGBA_HI 0x8F72
  597. #define EGL_COLOR_ARGB_HI 0x8F73
  598. #define EGLEW_HI_colorformats EGLEW_GET_VAR(__EGLEW_HI_colorformats)
  599. #endif /* !EGL_HI_colorformats */
  600. /* ------------------------ EGL_IMG_context_priority ----------------------- */
  601. #if !defined(EGL_IMG_context_priority)
  602. #define EGL_IMG_context_priority 1
  603. #define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
  604. #define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
  605. #define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
  606. #define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
  607. #define EGLEW_IMG_context_priority EGLEW_GET_VAR(__EGLEW_IMG_context_priority)
  608. #endif /* !EGL_IMG_context_priority */
  609. /* ------------------------- EGL_KHR_config_attribs ------------------------ */
  610. #if !defined(EGL_KHR_config_attribs)
  611. #define EGL_KHR_config_attribs 1
  612. #define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020
  613. #define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040
  614. #define EGL_CONFORMANT_KHR 0x3042
  615. #define EGLEW_KHR_config_attribs EGLEW_GET_VAR(__EGLEW_KHR_config_attribs)
  616. #endif /* !EGL_KHR_config_attribs */
  617. /* ------------------------- EGL_KHR_create_context ------------------------ */
  618. #if !defined(EGL_KHR_create_context)
  619. #define EGL_KHR_create_context 1
  620. #define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
  621. #define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
  622. #define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
  623. #define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
  624. #define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
  625. #define EGL_OPENGL_ES3_BIT_KHR 0x0040
  626. #define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098
  627. #define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
  628. #define EGL_CONTEXT_FLAGS_KHR 0x30FC
  629. #define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
  630. #define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
  631. #define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
  632. #define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
  633. #define EGLEW_KHR_create_context EGLEW_GET_VAR(__EGLEW_KHR_create_context)
  634. #endif /* !EGL_KHR_create_context */
  635. /* --------------------------- EGL_KHR_fence_sync -------------------------- */
  636. #if !defined(EGL_KHR_fence_sync)
  637. #define EGL_KHR_fence_sync 1
  638. #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
  639. #define EGL_SYNC_CONDITION_KHR 0x30F8
  640. #define EGL_SYNC_FENCE_KHR 0x30F9
  641. #define EGLEW_KHR_fence_sync EGLEW_GET_VAR(__EGLEW_KHR_fence_sync)
  642. #endif /* !EGL_KHR_fence_sync */
  643. /* --------------------- EGL_KHR_gl_renderbuffer_image --------------------- */
  644. #if !defined(EGL_KHR_gl_renderbuffer_image)
  645. #define EGL_KHR_gl_renderbuffer_image 1
  646. #define EGLEW_KHR_gl_renderbuffer_image EGLEW_GET_VAR(__EGLEW_KHR_gl_renderbuffer_image)
  647. #endif /* !EGL_KHR_gl_renderbuffer_image */
  648. /* ---------------------- EGL_KHR_gl_texture_2D_image ---------------------- */
  649. #if !defined(EGL_KHR_gl_texture_2D_image)
  650. #define EGL_KHR_gl_texture_2D_image 1
  651. #define EGL_GL_TEXTURE_2D_KHR 0x30B1
  652. #define EGL_GL_TEXTURE_3D_KHR 0x30B2
  653. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3
  654. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4
  655. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5
  656. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6
  657. #define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7
  658. #define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8
  659. #define EGL_GL_RENDERBUFFER_KHR 0x30B9
  660. #define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC
  661. #define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD
  662. #define EGLEW_KHR_gl_texture_2D_image EGLEW_GET_VAR(__EGLEW_KHR_gl_texture_2D_image)
  663. #endif /* !EGL_KHR_gl_texture_2D_image */
  664. /* ---------------------- EGL_KHR_gl_texture_3D_image ---------------------- */
  665. #if !defined(EGL_KHR_gl_texture_3D_image)
  666. #define EGL_KHR_gl_texture_3D_image 1
  667. #define EGLEW_KHR_gl_texture_3D_image EGLEW_GET_VAR(__EGLEW_KHR_gl_texture_3D_image)
  668. #endif /* !EGL_KHR_gl_texture_3D_image */
  669. /* -------------------- EGL_KHR_gl_texture_cubemap_image ------------------- */
  670. #if !defined(EGL_KHR_gl_texture_cubemap_image)
  671. #define EGL_KHR_gl_texture_cubemap_image 1
  672. #define EGLEW_KHR_gl_texture_cubemap_image EGLEW_GET_VAR(__EGLEW_KHR_gl_texture_cubemap_image)
  673. #endif /* !EGL_KHR_gl_texture_cubemap_image */
  674. /* ----------------------------- EGL_KHR_image ----------------------------- */
  675. #if !defined(EGL_KHR_image)
  676. #define EGL_KHR_image 1
  677. #define EGLEW_KHR_image EGLEW_GET_VAR(__EGLEW_KHR_image)
  678. #endif /* !EGL_KHR_image */
  679. /* --------------------------- EGL_KHR_image_base -------------------------- */
  680. #if !defined(EGL_KHR_image_base)
  681. #define EGL_KHR_image_base 1
  682. #define EGL_IMAGE_PRESERVED_KHR 0x30D2
  683. typedef void *EGLImageKHR;
  684. typedef EGLImageKHR (EGLAPIENTRY * PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list);
  685. typedef EGLBoolean (EGLAPIENTRY * PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
  686. #define eglCreateImageKHR EGLEW_GET_FUN(__eglewCreateImageKHR)
  687. #define eglDestroyImageKHR EGLEW_GET_FUN(__eglewDestroyImageKHR)
  688. #define EGLEW_KHR_image_base EGLEW_GET_VAR(__EGLEW_KHR_image_base)
  689. #endif /* !EGL_KHR_image_base */
  690. /* -------------------------- EGL_KHR_image_pixmap ------------------------- */
  691. #if !defined(EGL_KHR_image_pixmap)
  692. #define EGL_KHR_image_pixmap 1
  693. #define EGL_NATIVE_PIXMAP_KHR 0x30B0
  694. #define EGLEW_KHR_image_pixmap EGLEW_GET_VAR(__EGLEW_KHR_image_pixmap)
  695. #endif /* !EGL_KHR_image_pixmap */
  696. /* -------------------------- EGL_KHR_lock_surface ------------------------- */
  697. #if !defined(EGL_KHR_lock_surface)
  698. #define EGL_KHR_lock_surface 1
  699. #define EGL_READ_SURFACE_BIT_KHR 0x0001
  700. #define EGL_WRITE_SURFACE_BIT_KHR 0x0002
  701. #define EGL_LOCK_SURFACE_BIT_KHR 0x0080
  702. #define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100
  703. #define EGL_MATCH_FORMAT_KHR 0x3043
  704. #define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0
  705. #define EGL_FORMAT_RGB_565_KHR 0x30C1
  706. #define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2
  707. #define EGL_FORMAT_RGBA_8888_KHR 0x30C3
  708. #define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4
  709. #define EGL_LOCK_USAGE_HINT_KHR 0x30C5
  710. #define EGL_BITMAP_POINTER_KHR 0x30C6
  711. #define EGL_BITMAP_PITCH_KHR 0x30C7
  712. #define EGL_BITMAP_ORIGIN_KHR 0x30C8
  713. #define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9
  714. #define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
  715. #define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB
  716. #define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
  717. #define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
  718. #define EGL_LOWER_LEFT_KHR 0x30CE
  719. #define EGL_UPPER_LEFT_KHR 0x30CF
  720. typedef EGLBoolean (EGLAPIENTRY * PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint* attrib_list);
  721. typedef EGLBoolean (EGLAPIENTRY * PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
  722. #define eglLockSurfaceKHR EGLEW_GET_FUN(__eglewLockSurfaceKHR)
  723. #define eglUnlockSurfaceKHR EGLEW_GET_FUN(__eglewUnlockSurfaceKHR)
  724. #define EGLEW_KHR_lock_surface EGLEW_GET_VAR(__EGLEW_KHR_lock_surface)
  725. #endif /* !EGL_KHR_lock_surface */
  726. /* ------------------------- EGL_KHR_lock_surface2 ------------------------- */
  727. #if !defined(EGL_KHR_lock_surface2)
  728. #define EGL_KHR_lock_surface2 1
  729. #define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
  730. #define EGLEW_KHR_lock_surface2 EGLEW_GET_VAR(__EGLEW_KHR_lock_surface2)
  731. #endif /* !EGL_KHR_lock_surface2 */
  732. /* ------------------------- EGL_KHR_reusable_sync ------------------------- */
  733. #if !defined(EGL_KHR_reusable_sync)
  734. #define EGL_KHR_reusable_sync 1
  735. #define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001
  736. #define EGL_SYNC_STATUS_KHR 0x30F1
  737. #define EGL_SIGNALED_KHR 0x30F2
  738. #define EGL_UNSIGNALED_KHR 0x30F3
  739. #define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
  740. #define EGL_CONDITION_SATISFIED_KHR 0x30F6
  741. #define EGL_SYNC_TYPE_KHR 0x30F7
  742. #define EGL_SYNC_REUSABLE_KHR 0x30FA
  743. #define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFF
  744. typedef khronos_utime_nanoseconds_t EGLTimeKHR;
  745. typedef void* EGLSyncKHR;
  746. typedef EGLint (EGLAPIENTRY * PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
  747. typedef EGLSyncKHR (EGLAPIENTRY * PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint* attrib_list);
  748. typedef EGLBoolean (EGLAPIENTRY * PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
  749. typedef EGLBoolean (EGLAPIENTRY * PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint* value);
  750. typedef EGLBoolean (EGLAPIENTRY * PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
  751. #define eglClientWaitSyncKHR EGLEW_GET_FUN(__eglewClientWaitSyncKHR)
  752. #define eglCreateSyncKHR EGLEW_GET_FUN(__eglewCreateSyncKHR)
  753. #define eglDestroySyncKHR EGLEW_GET_FUN(__eglewDestroySyncKHR)
  754. #define eglGetSyncAttribKHR EGLEW_GET_FUN(__eglewGetSyncAttribKHR)
  755. #define eglSignalSyncKHR EGLEW_GET_FUN(__eglewSignalSyncKHR)
  756. #define EGLEW_KHR_reusable_sync EGLEW_GET_VAR(__EGLEW_KHR_reusable_sync)
  757. #endif /* !EGL_KHR_reusable_sync */
  758. /* ----------------------------- EGL_KHR_stream ---------------------------- */
  759. #if !defined(EGL_KHR_stream)
  760. #define EGL_KHR_stream 1
  761. #define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
  762. #define EGL_PRODUCER_FRAME_KHR 0x3212
  763. #define EGL_CONSUMER_FRAME_KHR 0x3213
  764. #define EGL_STREAM_STATE_KHR 0x3214
  765. #define EGL_STREAM_STATE_CREATED_KHR 0x3215
  766. #define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
  767. #define EGL_STREAM_STATE_EMPTY_KHR 0x3217
  768. #define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
  769. #define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
  770. #define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
  771. #define EGL_BAD_STREAM_KHR 0x321B
  772. #define EGL_BAD_STATE_KHR 0x321C
  773. #define EGLEW_KHR_stream EGLEW_GET_VAR(__EGLEW_KHR_stream)
  774. #endif /* !EGL_KHR_stream */
  775. /* ------------------- EGL_KHR_stream_consumer_gltexture ------------------- */
  776. #if !defined(EGL_KHR_stream_consumer_gltexture)
  777. #define EGL_KHR_stream_consumer_gltexture 1
  778. #define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
  779. typedef void* EGLStreamKHR; // NOTE jwilkins: missing typedef
  780. typedef EGLBoolean (EGLAPIENTRY * PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
  781. typedef EGLBoolean (EGLAPIENTRY * PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
  782. typedef EGLBoolean (EGLAPIENTRY * PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
  783. #define eglStreamConsumerAcquireKHR EGLEW_GET_FUN(__eglewStreamConsumerAcquireKHR)
  784. #define eglStreamConsumerGLTextureExternalKHR EGLEW_GET_FUN(__eglewStreamConsumerGLTextureExternalKHR)
  785. #define eglStreamConsumerReleaseKHR EGLEW_GET_FUN(__eglewStreamConsumerReleaseKHR)
  786. #define EGLEW_KHR_stream_consumer_gltexture EGLEW_GET_VAR(__EGLEW_KHR_stream_consumer_gltexture)
  787. #endif /* !EGL_KHR_stream_consumer_gltexture */
  788. /* -------------------- EGL_KHR_stream_cross_process_fd -------------------- */
  789. #if !defined(EGL_KHR_stream_cross_process_fd)
  790. #define EGL_KHR_stream_cross_process_fd 1
  791. typedef int EGLNativeFileDescriptorKHR; // NOTE jwilkins: missing typedef
  792. typedef EGLStreamKHR (EGLAPIENTRY * PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
  793. typedef EGLNativeFileDescriptorKHR (EGLAPIENTRY * PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
  794. #define eglCreateStreamFromFileDescriptorKHR EGLEW_GET_FUN(__eglewCreateStreamFromFileDescriptorKHR)
  795. #define eglGetStreamFileDescriptorKHR EGLEW_GET_FUN(__eglewGetStreamFileDescriptorKHR)
  796. #define EGLEW_KHR_stream_cross_process_fd EGLEW_GET_VAR(__EGLEW_KHR_stream_cross_process_fd)
  797. #endif /* !EGL_KHR_stream_cross_process_fd */
  798. /* -------------------------- EGL_KHR_stream_fifo -------------------------- */
  799. #if !defined(EGL_KHR_stream_fifo)
  800. #define EGL_KHR_stream_fifo 1
  801. #define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
  802. #define EGL_STREAM_TIME_NOW_KHR 0x31FD
  803. #define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
  804. #define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
  805. #define EGLEW_KHR_stream_fifo EGLEW_GET_VAR(__EGLEW_KHR_stream_fifo)
  806. #endif /* !EGL_KHR_stream_fifo */
  807. /* ----------------- EGL_KHR_stream_producer_aldatalocator ----------------- */
  808. #if !defined(EGL_KHR_stream_producer_aldatalocator)
  809. #define EGL_KHR_stream_producer_aldatalocator 1
  810. #define EGLEW_KHR_stream_producer_aldatalocator EGLEW_GET_VAR(__EGLEW_KHR_stream_producer_aldatalocator)
  811. #endif /* !EGL_KHR_stream_producer_aldatalocator */
  812. /* ------------------- EGL_KHR_stream_producer_eglsurface ------------------ */
  813. #if !defined(EGL_KHR_stream_producer_eglsurface)
  814. #define EGL_KHR_stream_producer_eglsurface 1
  815. #define EGL_STREAM_BIT_KHR 0x0800
  816. typedef EGLSurface (EGLAPIENTRY * PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint* attrib_list);
  817. #define eglCreateStreamProducerSurfaceKHR EGLEW_GET_FUN(__eglewCreateStreamProducerSurfaceKHR)
  818. #define EGLEW_KHR_stream_producer_eglsurface EGLEW_GET_VAR(__EGLEW_KHR_stream_producer_eglsurface)
  819. #endif /* !EGL_KHR_stream_producer_eglsurface */
  820. /* ---------------------- EGL_KHR_surfaceless_context ---------------------- */
  821. #if !defined(EGL_KHR_surfaceless_context)
  822. #define EGL_KHR_surfaceless_context 1
  823. #define EGLEW_KHR_surfaceless_context EGLEW_GET_VAR(__EGLEW_KHR_surfaceless_context)
  824. #endif /* !EGL_KHR_surfaceless_context */
  825. /* ------------------------ EGL_KHR_vg_parent_image ------------------------ */
  826. #if !defined(EGL_KHR_vg_parent_image)
  827. #define EGL_KHR_vg_parent_image 1
  828. #define EGL_VG_PARENT_IMAGE_KHR 0x30BA
  829. #define EGLEW_KHR_vg_parent_image EGLEW_GET_VAR(__EGLEW_KHR_vg_parent_image)
  830. #endif /* !EGL_KHR_vg_parent_image */
  831. /* --------------------------- EGL_KHR_wait_sync --------------------------- */
  832. #if !defined(EGL_KHR_wait_sync)
  833. #define EGL_KHR_wait_sync 1
  834. typedef void* EGLSyncKHR; // NOTE jwilkins: missing typedef
  835. typedef EGLint (EGLAPIENTRY * PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
  836. #define eglWaitSyncKHR EGLEW_GET_FUN(__eglewWaitSyncKHR)
  837. #define EGLEW_KHR_wait_sync EGLEW_GET_VAR(__EGLEW_KHR_wait_sync)
  838. #endif /* !EGL_KHR_wait_sync */
  839. /* --------------------------- EGL_MESA_drm_image -------------------------- */
  840. #if !defined(EGL_MESA_drm_image)
  841. #define EGL_MESA_drm_image 1
  842. #define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001
  843. #define EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002
  844. #define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0
  845. #define EGL_DRM_BUFFER_USE_MESA 0x31D1
  846. #define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
  847. #define EGL_DRM_BUFFER_MESA 0x31D3
  848. #define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
  849. typedef EGLImageKHR (EGLAPIENTRY * PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint* attrib_list);
  850. typedef EGLBoolean (EGLAPIENTRY * PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint* name, EGLint *handle, EGLint *stride);
  851. #define eglCreateDRMImageMESA EGLEW_GET_FUN(__eglewCreateDRMImageMESA)
  852. #define eglExportDRMImageMESA EGLEW_GET_FUN(__eglewExportDRMImageMESA)
  853. #define EGLEW_MESA_drm_image EGLEW_GET_VAR(__EGLEW_MESA_drm_image)
  854. #endif /* !EGL_MESA_drm_image */
  855. /* ------------------------ EGL_NV_3dvision_surface ------------------------ */
  856. #if !defined(EGL_NV_3dvision_surface)
  857. #define EGL_NV_3dvision_surface 1
  858. #define EGL_AUTO_STEREO_NV 0x3136
  859. #define EGLEW_NV_3dvision_surface EGLEW_GET_VAR(__EGLEW_NV_3dvision_surface)
  860. #endif /* !EGL_NV_3dvision_surface */
  861. /* ------------------------- EGL_NV_coverage_sample ------------------------ */
  862. #if !defined(EGL_NV_coverage_sample)
  863. #define EGL_NV_coverage_sample 1
  864. #define EGL_COVERAGE_BUFFERS_NV 0x30E0
  865. #define EGL_COVERAGE_SAMPLES_NV 0x30E1
  866. #define EGLEW_NV_coverage_sample EGLEW_GET_VAR(__EGLEW_NV_coverage_sample)
  867. #endif /* !EGL_NV_coverage_sample */
  868. /* --------------------- EGL_NV_coverage_sample_resolve -------------------- */
  869. #if !defined(EGL_NV_coverage_sample_resolve)
  870. #define EGL_NV_coverage_sample_resolve 1
  871. #define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
  872. #define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
  873. #define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
  874. #define EGLEW_NV_coverage_sample_resolve EGLEW_GET_VAR(__EGLEW_NV_coverage_sample_resolve)
  875. #endif /* !EGL_NV_coverage_sample_resolve */
  876. /* ------------------------- EGL_NV_depth_nonlinear ------------------------ */
  877. #if !defined(EGL_NV_depth_nonlinear)
  878. #define EGL_NV_depth_nonlinear 1
  879. #define EGL_DEPTH_ENCODING_NONE_NV 0
  880. #define EGL_DEPTH_ENCODING_NV 0x30E2
  881. #define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
  882. #define EGLEW_NV_depth_nonlinear EGLEW_GET_VAR(__EGLEW_NV_depth_nonlinear)
  883. #endif /* !EGL_NV_depth_nonlinear */
  884. /* -------------------------- EGL_NV_native_query -------------------------- */
  885. #if !defined(EGL_NV_native_query)
  886. #define EGL_NV_native_query 1
  887. typedef EGLBoolean (EGLAPIENTRY * PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType* display_id);
  888. typedef EGLBoolean (EGLAPIENTRY * PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap);
  889. typedef EGLBoolean (EGLAPIENTRY * PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window);
  890. #define eglQueryNativeDisplayNV EGLEW_GET_FUN(__eglewQueryNativeDisplayNV)
  891. #define eglQueryNativePixmapNV EGLEW_GET_FUN(__eglewQueryNativePixmapNV)
  892. #define eglQueryNativeWindowNV EGLEW_GET_FUN(__eglewQueryNativeWindowNV)
  893. #define EGLEW_NV_native_query EGLEW_GET_VAR(__EGLEW_NV_native_query)
  894. #endif /* !EGL_NV_native_query */
  895. /* ---------------------- EGL_NV_post_convert_rounding --------------------- */
  896. #if !defined(EGL_NV_post_convert_rounding)
  897. #define EGL_NV_post_convert_rounding 1
  898. #define EGLEW_NV_post_convert_rounding EGLEW_GET_VAR(__EGLEW_NV_post_convert_rounding)
  899. #endif /* !EGL_NV_post_convert_rounding */
  900. /* ------------------------- EGL_NV_post_sub_buffer ------------------------ */
  901. #if !defined(EGL_NV_post_sub_buffer)
  902. #define EGL_NV_post_sub_buffer 1
  903. #define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
  904. typedef EGLBoolean (EGLAPIENTRY * PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
  905. #define eglPostSubBufferNV EGLEW_GET_FUN(__eglewPostSubBufferNV)
  906. #define EGLEW_NV_post_sub_buffer EGLEW_GET_VAR(__EGLEW_NV_post_sub_buffer)
  907. #endif /* !EGL_NV_post_sub_buffer */
  908. /* ------------------------------ EGL_NV_sync ------------------------------ */
  909. #if !defined(EGL_NV_sync)
  910. #define EGL_NV_sync 1
  911. #define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
  912. #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
  913. #define EGL_SYNC_STATUS_NV 0x30E7
  914. #define EGL_SIGNALED_NV 0x30E8
  915. #define EGL_UNSIGNALED_NV 0x30E9
  916. #define EGL_ALREADY_SIGNALED_NV 0x30EA
  917. #define EGL_TIMEOUT_EXPIRED_NV 0x30EB
  918. #define EGL_CONDITION_SATISFIED_NV 0x30EC
  919. #define EGL_SYNC_TYPE_NV 0x30ED
  920. #define EGL_SYNC_CONDITION_NV 0x30EE
  921. #define EGL_SYNC_FENCE_NV 0x30EF
  922. #define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFF
  923. typedef khronos_utime_nanoseconds_t EGLTimeNV;
  924. typedef void* EGLSyncNV;
  925. typedef EGLint (EGLAPIENTRY * PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
  926. typedef EGLSyncNV (EGLAPIENTRY * PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint* attrib_list);
  927. typedef EGLBoolean (EGLAPIENTRY * PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
  928. typedef EGLBoolean (EGLAPIENTRY * PFNEGLFENCENVPROC) (EGLSyncNV sync);
  929. typedef EGLBoolean (EGLAPIENTRY * PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint* value);
  930. typedef EGLBoolean (EGLAPIENTRY * PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
  931. #define eglClientWaitSyncNV EGLEW_GET_FUN(__eglewClientWaitSyncNV)
  932. #define eglCreateFenceSyncNV EGLEW_GET_FUN(__eglewCreateFenceSyncNV)
  933. #define eglDestroySyncNV EGLEW_GET_FUN(__eglewDestroySyncNV)
  934. #define eglFenceNV EGLEW_GET_FUN(__eglewFenceNV)
  935. #define eglGetSyncAttribNV EGLEW_GET_FUN(__eglewGetSyncAttribNV)
  936. #define eglSignalSyncNV EGLEW_GET_FUN(__eglewSignalSyncNV)
  937. #define EGLEW_NV_sync EGLEW_GET_VAR(__EGLEW_NV_sync)
  938. #endif /* !EGL_NV_sync */
  939. /* --------------------------- EGL_NV_system_time -------------------------- */
  940. #if !defined(EGL_NV_system_time)
  941. #define EGL_NV_system_time 1
  942. typedef khronos_utime_nanoseconds_t EGLuint64NV;
  943. typedef EGLuint64NV (EGLAPIENTRY * PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
  944. typedef EGLuint64NV (EGLAPIENTRY * PFNEGLGETSYSTEMTIMENVPROC) (void);
  945. #define eglGetSystemTimeFrequencyNV EGLEW_GET_FUN(__eglewGetSystemTimeFrequencyNV)
  946. #define eglGetSystemTimeNV EGLEW_GET_FUN(__eglewGetSystemTimeNV)
  947. #define EGLEW_NV_system_time EGLEW_GET_VAR(__EGLEW_NV_system_time)
  948. #endif /* !EGL_NV_system_time */
  949. /* ------------------------------------------------------------------------- */
  950. #if defined(GLEW_MX) && defined(_WIN32)
  951. #define EGLEW_FUN_EXPORT
  952. #else
  953. #define EGLEW_FUN_EXPORT GLEWAPI
  954. #endif /* GLEW_MX */
  955. #if defined(GLEW_MX)
  956. #define EGLEW_VAR_EXPORT
  957. #else
  958. #define EGLEW_VAR_EXPORT GLEWAPI
  959. #endif /* GLEW_MX */
  960. #if defined (GLEW_MX) && defined(_WIN32)
  961. struct EGLEWContextStruct
  962. {
  963. #endif /* GLEW_MX */
  964. EGLEW_FUN_EXPORT PFNCREATESYNC __eglewCreateSync;
  965. EGLEW_FUN_EXPORT PFNDESTROYSYNC __eglewDestroySync;
  966. EGLEW_FUN_EXPORT PFNCLIENTWAITSYNC __eglewClientWaitSync;
  967. EGLEW_FUN_EXPORT PFNGETSYNCATTRIB __eglewGetSyncAttrib;
  968. EGLEW_FUN_EXPORT PFNGETPLATFORMDISPLAY __eglewGetPlatformDisplay;
  969. EGLEW_FUN_EXPORT PFNCREATEPLATFORMWINDOWSURFACE __eglewCreatePlatformWindowSurface;
  970. EGLEW_FUN_EXPORT PFNCREATEPLATFORMPIXMAPSURFACE __eglewCreatePlatformPixmapSurface;
  971. EGLEW_FUN_EXPORT PFNWAITSYNC __eglewWaitSync;
  972. EGLEW_FUN_EXPORT PFNEGLBINDAPIPROC __eglewBindAPI;
  973. EGLEW_FUN_EXPORT PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC __eglewCreatePbufferFromClientBuffer;
  974. EGLEW_FUN_EXPORT PFNEGLQUERYAPIPROC __eglewQueryAPI;
  975. EGLEW_FUN_EXPORT PFNEGLRELEASETHREADPROC __eglewReleaseThread;
  976. EGLEW_FUN_EXPORT PFNEGLWAITCLIENTPROC __eglewWaitClient;
  977. EGLEW_FUN_EXPORT PFNEGLSETBLOBCACHEFUNCSANDROIDPROC __eglewSetBlobCacheFuncsANDROID;
  978. EGLEW_FUN_EXPORT PFNEGLDUPNATIVEFENCEFDANDROIDPROC __eglewDupNativeFenceFDANDROID;
  979. EGLEW_FUN_EXPORT PFNEGLQUERYSURFACEPOINTERANGLEPROC __eglewQuerySurfacePointerANGLE;
  980. EGLEW_FUN_EXPORT PFNEGLCREATEIMAGEKHRPROC __eglewCreateImageKHR;
  981. EGLEW_FUN_EXPORT PFNEGLDESTROYIMAGEKHRPROC __eglewDestroyImageKHR;
  982. EGLEW_FUN_EXPORT PFNEGLLOCKSURFACEKHRPROC __eglewLockSurfaceKHR;
  983. EGLEW_FUN_EXPORT PFNEGLUNLOCKSURFACEKHRPROC __eglewUnlockSurfaceKHR;
  984. EGLEW_FUN_EXPORT PFNEGLCLIENTWAITSYNCKHRPROC __eglewClientWaitSyncKHR;
  985. EGLEW_FUN_EXPORT PFNEGLCREATESYNCKHRPROC __eglewCreateSyncKHR;
  986. EGLEW_FUN_EXPORT PFNEGLDESTROYSYNCKHRPROC __eglewDestroySyncKHR;
  987. EGLEW_FUN_EXPORT PFNEGLGETSYNCATTRIBKHRPROC __eglewGetSyncAttribKHR;
  988. EGLEW_FUN_EXPORT PFNEGLSIGNALSYNCKHRPROC __eglewSignalSyncKHR;
  989. EGLEW_FUN_EXPORT PFNEGLSTREAMCONSUMERACQUIREKHRPROC __eglewStreamConsumerAcquireKHR;
  990. EGLEW_FUN_EXPORT PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC __eglewStreamConsumerGLTextureExternalKHR;
  991. EGLEW_FUN_EXPORT PFNEGLSTREAMCONSUMERRELEASEKHRPROC __eglewStreamConsumerReleaseKHR;
  992. EGLEW_FUN_EXPORT PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC __eglewCreateStreamFromFileDescriptorKHR;
  993. EGLEW_FUN_EXPORT PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC __eglewGetStreamFileDescriptorKHR;
  994. EGLEW_FUN_EXPORT PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC __eglewCreateStreamProducerSurfaceKHR;
  995. EGLEW_FUN_EXPORT PFNEGLWAITSYNCKHRPROC __eglewWaitSyncKHR;
  996. EGLEW_FUN_EXPORT PFNEGLCREATEDRMIMAGEMESAPROC __eglewCreateDRMImageMESA;
  997. EGLEW_FUN_EXPORT PFNEGLEXPORTDRMIMAGEMESAPROC __eglewExportDRMImageMESA;
  998. EGLEW_FUN_EXPORT PFNEGLQUERYNATIVEDISPLAYNVPROC __eglewQueryNativeDisplayNV;
  999. EGLEW_FUN_EXPORT PFNEGLQUERYNATIVEPIXMAPNVPROC __eglewQueryNativePixmapNV;
  1000. EGLEW_FUN_EXPORT PFNEGLQUERYNATIVEWINDOWNVPROC __eglewQueryNativeWindowNV;
  1001. EGLEW_FUN_EXPORT PFNEGLPOSTSUBBUFFERNVPROC __eglewPostSubBufferNV;
  1002. EGLEW_FUN_EXPORT PFNEGLCLIENTWAITSYNCNVPROC __eglewClientWaitSyncNV;
  1003. EGLEW_FUN_EXPORT PFNEGLCREATEFENCESYNCNVPROC __eglewCreateFenceSyncNV;
  1004. EGLEW_FUN_EXPORT PFNEGLDESTROYSYNCNVPROC __eglewDestroySyncNV;
  1005. EGLEW_FUN_EXPORT PFNEGLFENCENVPROC __eglewFenceNV;
  1006. EGLEW_FUN_EXPORT PFNEGLGETSYNCATTRIBNVPROC __eglewGetSyncAttribNV;
  1007. EGLEW_FUN_EXPORT PFNEGLSIGNALSYNCNVPROC __eglewSignalSyncNV;
  1008. EGLEW_FUN_EXPORT PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC __eglewGetSystemTimeFrequencyNV;
  1009. EGLEW_FUN_EXPORT PFNEGLGETSYSTEMTIMENVPROC __eglewGetSystemTimeNV;
  1010. #if defined(GLEW_MX) && !defined(_WIN32)
  1011. struct EGLEWContextStruct
  1012. {
  1013. #endif /* GLEW_MX */
  1014. EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_1;
  1015. EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_2;
  1016. EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_3;
  1017. EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_4;
  1018. EGLEW_VAR_EXPORT GLboolean __EGLEW_VERSION_1_5;
  1019. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_blob_cache;
  1020. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_framebuffer_target;
  1021. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_image_native_buffer;
  1022. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_native_fence_sync;
  1023. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANDROID_recordable;
  1024. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_d3d_share_handle_client_buffer;
  1025. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_query_surface_pointer;
  1026. EGLEW_VAR_EXPORT GLboolean __EGLEW_ANGLE_surface_d3d_texture_2d_share_handle;
  1027. EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_buffer_age;
  1028. EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_create_context_robustness;
  1029. EGLEW_VAR_EXPORT GLboolean __EGLEW_EXT_multiview_window;
  1030. EGLEW_VAR_EXPORT GLboolean __EGLEW_HI_clientpixmap;
  1031. EGLEW_VAR_EXPORT GLboolean __EGLEW_HI_colorformats;
  1032. EGLEW_VAR_EXPORT GLboolean __EGLEW_IMG_context_priority;
  1033. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_config_attribs;
  1034. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_create_context;
  1035. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_fence_sync;
  1036. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_renderbuffer_image;
  1037. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_texture_2D_image;
  1038. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_texture_3D_image;
  1039. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_gl_texture_cubemap_image;
  1040. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_image;
  1041. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_image_base;
  1042. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_image_pixmap;
  1043. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_lock_surface;
  1044. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_lock_surface2;
  1045. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_reusable_sync;
  1046. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream;
  1047. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_consumer_gltexture;
  1048. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_cross_process_fd;
  1049. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_fifo;
  1050. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_producer_aldatalocator;
  1051. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_stream_producer_eglsurface;
  1052. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_surfaceless_context;
  1053. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_vg_parent_image;
  1054. EGLEW_VAR_EXPORT GLboolean __EGLEW_KHR_wait_sync;
  1055. EGLEW_VAR_EXPORT GLboolean __EGLEW_MESA_drm_image;
  1056. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_3dvision_surface;
  1057. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_coverage_sample;
  1058. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_coverage_sample_resolve;
  1059. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_depth_nonlinear;
  1060. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_native_query;
  1061. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_post_convert_rounding;
  1062. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_post_sub_buffer;
  1063. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_sync;
  1064. EGLEW_VAR_EXPORT GLboolean __EGLEW_NV_system_time;
  1065. #ifdef GLEW_MX
  1066. }; /* EGLEWContextStruct */
  1067. #endif /* GLEW_MX */
  1068. /* ------------------------------------------------------------------------ */
  1069. #ifdef GLEW_MX
  1070. typedef struct EGLEWContextStruct EGLEWContext;
  1071. extern GLenum eglewContextInit (EGLDisplay display, EGLEWContext* ctx);
  1072. extern GLboolean eglewContextIsSupported (const EGLEWContext* ctx, const char* name);
  1073. #define eglewInit(display) eglewContextInit(display, eglewGetContext())
  1074. #define eglewIsSupported(x) eglewContextIsSupported(eglewGetContext(), x)
  1075. #define EGLEW_GET_VAR(x) (*(const GLboolean*)&(eglewGetContext()->x))
  1076. #ifdef _WIN32
  1077. # define EGLEW_GET_FUN(x) eglewGetContext()->x
  1078. #else
  1079. # define EGLEW_GET_FUN(x) x
  1080. #endif
  1081. #else /* GLEW_MX */
  1082. #define EGLEW_GET_VAR(x) (*(const GLboolean*)&x)
  1083. #define EGLEW_GET_FUN(x) x
  1084. extern GLenum eglewContextInit(EGLDisplay display); // NOTE jwilkins: context handling not really written yet?
  1085. #define eglewInit eglewContextInit // NOTE jwilkins: context handling not really written yet?
  1086. extern GLboolean eglewIsSupported (const char* name);
  1087. #endif /* GLEW_MX */
  1088. extern GLboolean eglewGetExtension (const char* name);
  1089. #ifdef __cplusplus
  1090. }
  1091. #endif
  1092. #undef GLEWAPI
  1093. #endif /* __eglew_h__ */