Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 1 | ########################################################################## |
| 2 | # |
| 3 | # Copyright 2011 LunarG, Inc. |
| 4 | # All Rights Reserved. |
| 5 | # |
| 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | # of this software and associated documentation files (the "Software"), to deal |
| 8 | # in the Software without restriction, including without limitation the rights |
| 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | # copies of the Software, and to permit persons to whom the Software is |
| 11 | # furnished to do so, subject to the following conditions: |
| 12 | # |
| 13 | # The above copyright notice and this permission notice shall be included in |
| 14 | # all copies or substantial portions of the Software. |
| 15 | # |
| 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | # THE SOFTWARE. |
| 23 | # |
| 24 | ##########################################################################/ |
| 25 | |
| 26 | """EGL API description.""" |
| 27 | |
| 28 | |
| 29 | from stdapi import * |
Arnaud Vrac | fe93afd | 2011-12-19 02:42:15 +0100 | [diff] [blame] | 30 | from gltypes import * |
José Fonseca | 0765c82 | 2013-05-29 08:52:01 +0100 | [diff] [blame] | 31 | from eglenum import * |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 32 | |
| 33 | EGLNativeDisplayType = Opaque("EGLNativeDisplayType") |
| 34 | EGLNativeWindowType = Opaque("EGLNativeWindowType") |
| 35 | EGLNativePixmapType = Opaque("EGLNativePixmapType") |
| 36 | |
| 37 | EGLDisplay = Opaque("EGLDisplay") |
| 38 | EGLConfig = Opaque("EGLConfig") |
| 39 | EGLContext = Opaque("EGLContext") |
| 40 | EGLSurface = Opaque("EGLSurface") |
| 41 | |
| 42 | EGLClientBuffer = Opaque("EGLClientBuffer") |
| 43 | |
Chia-I Wu | 9b4e6d3 | 2011-12-07 17:03:23 +0800 | [diff] [blame] | 44 | EGLBoolean = Enum("EGLBoolean", [ |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 45 | "EGL_FALSE", |
| 46 | "EGL_TRUE", |
| 47 | ]) |
| 48 | |
| 49 | EGLint = Alias("EGLint", Int32) |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 50 | |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 51 | # an alias of EGLenum |
José Fonseca | 22ef2a5 | 2013-05-29 08:13:18 +0100 | [diff] [blame] | 52 | EGLint_enum = Alias("EGLint", EGLenum) |
| 53 | EGLattrib = EGLint_enum |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 54 | |
| 55 | # EGL_KHR_image_base |
| 56 | EGLImageKHR = Opaque("EGLImageKHR") |
| 57 | |
Chia-I Wu | d674932 | 2011-11-30 18:21:45 +0800 | [diff] [blame] | 58 | # EGL_KHR_reusable_sync |
| 59 | EGLSyncKHR = Opaque("EGLSyncKHR") |
| 60 | EGLTimeKHR = Alias("EGLTimeKHR", UInt64) |
| 61 | |
Chia-I Wu | 4b1c825 | 2011-11-30 18:43:23 +0800 | [diff] [blame] | 62 | # EGL_NV_sync |
| 63 | EGLSyncNV = Alias("EGLSyncNV", EGLSyncKHR) |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 64 | EGLTimeNV = Alias("EGLTimeNV", EGLTimeKHR) |
Chia-I Wu | 4b1c825 | 2011-11-30 18:43:23 +0800 | [diff] [blame] | 65 | |
Chia-I Wu | cba1890 | 2011-12-01 14:14:36 +0800 | [diff] [blame] | 66 | # EGL_HI_clientpixmap |
| 67 | EGLClientPixmapHI = Struct("struct EGLClientPixmapHI", [ |
| 68 | (OpaquePointer(Void), "pData"), |
| 69 | (EGLint, "iWidth"), |
| 70 | (EGLint, "iHeight"), |
| 71 | (EGLint, "iStride"), |
| 72 | ]) |
| 73 | |
Chia-I Wu | eb7f1bd | 2011-12-01 14:57:24 +0800 | [diff] [blame] | 74 | # EGL_NV_system_time |
| 75 | EGLuint64NV = Alias("EGLuint64NV", UInt64) |
| 76 | |
José Fonseca | 8130193 | 2012-11-11 00:10:20 +0000 | [diff] [blame] | 77 | eglapi = Module("EGL") |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 78 | |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 79 | EGLSurfaceFlags = Flags(Int, [ |
| 80 | 'EGL_MULTISAMPLE_RESOLVE_BOX_BIT', |
| 81 | 'EGL_PBUFFER_BIT', |
| 82 | 'EGL_PIXMAP_BIT', |
| 83 | 'EGL_SWAP_BEHAVIOR_PRESERVED_BIT', |
| 84 | 'EGL_VG_ALPHA_FORMAT_PRE_BIT', |
| 85 | 'EGL_VG_COLORSPACE_LINEAR_BIT', |
| 86 | 'EGL_WINDOW_BIT' |
| 87 | ]) |
| 88 | |
José Fonseca | 69523cb | 2014-05-25 12:28:08 +0100 | [diff] [blame] | 89 | EGLConformantFlags = Flags(Int, [ |
José Fonseca | 51b1ed3 | 2015-01-18 21:03:59 +0000 | [diff] [blame] | 90 | 'EGL_OPENGL_ES_BIT', # 0x0001 |
| 91 | 'EGL_OPENVG_BIT', # 0x0002 |
| 92 | 'EGL_OPENGL_ES2_BIT', # 0x0004 |
| 93 | 'EGL_OPENGL_BIT', # 0x0008 |
| 94 | 'EGL_OPENGL_ES3_BIT', # 0x0040 |
José Fonseca | 69523cb | 2014-05-25 12:28:08 +0100 | [diff] [blame] | 95 | ]) |
Andreas Hartmetz | da752ba | 2013-07-22 19:56:40 +0200 | [diff] [blame] | 96 | |
| 97 | EGLVGAlphaFormat = FakeEnum(Int, ['EGL_VG_ALPHA_FORMAT_NONPRE', 'EGL_VG_ALPHA_FORMAT_PRE']) |
| 98 | EGLVGColorspace = FakeEnum(Int, ['EGL_VG_COLORSPACE_sRGB', 'EGL_VG_COLORSPACE_LINEAR']) |
| 99 | EGLTextureFormat = FakeEnum(Int, ['EGL_NO_TEXTURE', 'EGL_TEXTURE_RGB', 'EGL_TEXTURE_RGBA']) |
Andreas Hartmetz | 91ccf28 | 2013-07-22 19:57:50 +0200 | [diff] [blame] | 100 | EGLTextureTarget = FakeEnum(Int, ['EGL_TEXTURE_2D', 'EGL_NO_TEXTURE']) |
Andreas Hartmetz | da752ba | 2013-07-22 19:56:40 +0200 | [diff] [blame] | 101 | |
| 102 | def EGLAttribArray(values): |
| 103 | return AttribArray(Const(EGLint_enum), values, terminator = 'EGL_NONE') |
| 104 | |
| 105 | EGLConfigAttribs = EGLAttribArray([ |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 106 | ('EGL_ALPHA_MASK_SIZE', UInt), |
| 107 | ('EGL_ALPHA_SIZE', UInt), |
| 108 | ('EGL_BIND_TO_TEXTURE_RGB', EGLBoolean), |
| 109 | ('EGL_BIND_TO_TEXTURE_RGBA', EGLBoolean), |
| 110 | ('EGL_BLUE_SIZE', UInt), |
| 111 | ('EGL_BUFFER_SIZE', UInt), |
| 112 | ('EGL_COLOR_BUFFER_TYPE', FakeEnum(Int, ['EGL_RGB_BUFFER', 'EGL_LUMINANCE_BUFFER'])), |
| 113 | ('EGL_CONFIG_CAVEAT', FakeEnum(Int, ['EGL_DONT_CARE', 'EGL_NONE', 'EGL_SLOW_CONFIG', 'EGL_NON_CONFORMANT_CONFIG'])), |
| 114 | ('EGL_CONFIG_ID', Int), |
| 115 | ('EGL_CONFORMANT', EGLConformantFlags), |
| 116 | ('EGL_DEPTH_SIZE', Int), |
| 117 | ('EGL_GREEN_SIZE', UInt), |
| 118 | ('EGL_LEVEL', Int), |
| 119 | ('EGL_LUMINANCE_SIZE', UInt), |
| 120 | ('EGL_MATCH_NATIVE_PIXMAP', Int), |
| 121 | ('EGL_NATIVE_RENDERABLE', FakeEnum(Int, ['EGL_DONT_CARE', 'EGL_TRUE', 'EGL_FALSE'])), |
| 122 | ('EGL_MAX_SWAP_INTERVAL', Int), |
| 123 | ('EGL_MIN_SWAP_INTERVAL', Int), |
| 124 | ('EGL_RED_SIZE', UInt), |
| 125 | ('EGL_SAMPLE_BUFFERS', Int), |
| 126 | ('EGL_SAMPLES', Int), |
| 127 | ('EGL_STENCIL_SIZE', UInt), |
| 128 | ('EGL_RENDERABLE_TYPE', EGLConformantFlags), |
| 129 | ('EGL_SURFACE_TYPE', EGLSurfaceFlags), |
| 130 | ('EGL_TRANSPARENT_TYPE', FakeEnum(Int, ['EGL_NONE', 'EGL_TRANSPARENT_RGB'])), |
| 131 | ('EGL_TRANSPARENT_RED_VALUE', Int), |
| 132 | ('EGL_TRANSPARENT_GREEN_VALUE', Int), |
| 133 | ('EGL_TRANSPARENT_BLUE_VALUE ', Int) |
| 134 | ]) |
| 135 | |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 136 | EGLWindowsSurfaceAttribs = EGLAttribArray([ |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 137 | ('EGL_RENDER_BUFFER', FakeEnum(Int, ['EGL_SINGLE_BUFFER', 'EGL_BACK_BUFFER'])), |
| 138 | ('EGL_VG_ALPHA_FORMAT', EGLVGAlphaFormat), |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 139 | ('EGL_VG_COLORSPACE', EGLVGColorspace)]) |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 140 | |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 141 | EGLPixmapSurfaceAttribs = EGLAttribArray([ |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 142 | ('EGL_VG_ALPHA_FORMAT', EGLVGAlphaFormat), |
| 143 | ('EGL_VG_COLORSPACE', EGLVGColorspace) |
| 144 | ]) |
| 145 | |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 146 | EGLPbufferAttribs = EGLAttribArray([ |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 147 | ('EGL_HEIGHT', Int), |
| 148 | ('EGL_LARGEST_PBUFFER', EGLBoolean), |
| 149 | ('EGL_MIPMAP_TEXTURE', UInt), |
| 150 | ('EGL_TEXTURE_FORMAT', EGLTextureFormat), |
| 151 | ('EGL_TEXTURE_TARGET', EGLTextureTarget), |
| 152 | ('EGL_VG_ALPHA_FORMAT', EGLVGAlphaFormat), |
| 153 | ('EGL_VG_COLORSPACE', EGLVGColorspace), |
| 154 | ('EGL_WIDTH', Int) |
| 155 | ]) |
| 156 | |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 157 | EGLPbufferFromClientBufferAttribs = EGLAttribArray([ |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 158 | ('EGL_MIPMAP_TEXTURE', EGLBoolean), |
| 159 | ('EGL_TEXTURE_FORMAT', EGLTextureFormat), |
| 160 | ('EGL_TEXTURE_TARGET', EGLTextureTarget) |
| 161 | ]) |
| 162 | |
José Fonseca | 166cd8a | 2014-05-23 23:06:23 +0100 | [diff] [blame] | 163 | EGLContextAttribs = EGLAttribArray([ |
José Fonseca | 69523cb | 2014-05-25 12:28:08 +0100 | [diff] [blame] | 164 | ('EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT', EGLBoolean), |
| 165 | ('EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT', EGLenum), |
José Fonseca | d5a7e82 | 2014-05-30 23:41:46 +0100 | [diff] [blame] | 166 | ('EGL_CONTEXT_MAJOR_VERSION', Int), # Alias for EGL_CONTEXT_CLIENT_VERSION |
| 167 | ('EGL_CONTEXT_MINOR_VERSION', Int), |
José Fonseca | 166cd8a | 2014-05-23 23:06:23 +0100 | [diff] [blame] | 168 | ('EGL_CONTEXT_FLAGS_KHR', Flags(Int, [ |
José Fonseca | 69523cb | 2014-05-25 12:28:08 +0100 | [diff] [blame] | 169 | 'EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR', |
| 170 | 'EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR', |
| 171 | 'EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR', |
| 172 | ])), |
José Fonseca | d5a7e82 | 2014-05-30 23:41:46 +0100 | [diff] [blame] | 173 | ('EGL_CONTEXT_OPENGL_PROFILE_MASK', Flags(Int, [ |
| 174 | 'EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT', |
| 175 | 'EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT', |
José Fonseca | 69523cb | 2014-05-25 12:28:08 +0100 | [diff] [blame] | 176 | ])), |
José Fonseca | d5a7e82 | 2014-05-30 23:41:46 +0100 | [diff] [blame] | 177 | ('EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY', EGLenum), |
José Fonseca | 166cd8a | 2014-05-23 23:06:23 +0100 | [diff] [blame] | 178 | ]) |
| 179 | |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 180 | EGLDrmImageMesaAttribs = EGLAttribArray([ |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 181 | ('EGL_DRM_BUFFER_FORMAT_MESA', FakeEnum(Int, ['EGL_DRM_BUFFER_FORMAT_ARGB32_MESA'])), |
| 182 | ('EGL_DRM_BUFFER_USE_MESA', Flags(Int, ['EGL_DRM_BUFFER_USE_SCANOUT_MESA', 'EGL_DRM_BUFFER_USE_SHARE_MESA'])) |
| 183 | ]) |
| 184 | |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 185 | EGLLockSurfaceKHRAttribs = EGLAttribArray([ |
| 186 | ('EGL_MAP_PRESERVE_PIXELS_KHR', EGLBoolean), |
| 187 | ('EGL_LOCK_USAGE_HINT_KHR', Flags(Int, ['EGL_READ_SURFACE_BIT_KHR', 'EGL_WRITE_SURFACE_BIT_KHR'])) |
| 188 | ]) |
| 189 | |
| 190 | EGLFenceSyncNVAttribs = EGLAttribArray([ |
| 191 | ('EGL_SYNC_STATUS_NV', Flags(Int, ['EGL_SIGNALED_NV', 'EGL_UNSIGNALED_NV'])) |
| 192 | ]) |
| 193 | |
José Fonseca | d93791e | 2012-04-20 07:15:38 +0100 | [diff] [blame] | 194 | EGLProc = Opaque("__eglMustCastToProperFunctionPointerType") |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 195 | |
Arnaud Vrac | fe93afd | 2011-12-19 02:42:15 +0100 | [diff] [blame] | 196 | def GlFunction(*args, **kwargs): |
| 197 | kwargs.setdefault('call', 'GL_APIENTRY') |
| 198 | return Function(*args, **kwargs) |
| 199 | |
José Fonseca | 54f304a | 2012-01-14 19:33:08 +0000 | [diff] [blame] | 200 | eglapi.addFunctions([ |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 201 | # EGL 1.4 |
José Fonseca | 22ef2a5 | 2013-05-29 08:13:18 +0100 | [diff] [blame] | 202 | Function(EGLint_enum, "eglGetError", [], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 203 | |
| 204 | Function(EGLDisplay, "eglGetDisplay", [(EGLNativeDisplayType, "display_id")]), |
| 205 | Function(EGLBoolean, "eglInitialize", [(EGLDisplay, "dpy"), Out(Pointer(EGLint), "major"), Out(Pointer(EGLint), "minor")]), |
| 206 | Function(EGLBoolean, "eglTerminate", [(EGLDisplay, "dpy")]), |
| 207 | |
José Fonseca | 22ef2a5 | 2013-05-29 08:13:18 +0100 | [diff] [blame] | 208 | Function(ConstCString, "eglQueryString", [(EGLDisplay, "dpy"), (EGLint_enum, "name")], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 209 | |
José Fonseca | 25a8a21 | 2014-02-26 16:20:57 +0000 | [diff] [blame] | 210 | Function(EGLBoolean, "eglGetConfigs", [(EGLDisplay, "dpy"), Out(Array(EGLConfig, "config_size"), "configs"), (EGLint, "config_size"), Out(Pointer(EGLint), "num_config")]), |
| 211 | Function(EGLBoolean, "eglChooseConfig", [(EGLDisplay, "dpy"), (EGLConfigAttribs, "attrib_list"), Out(Array(EGLConfig, "config_size"), "configs"), (EGLint, "config_size"), Out(Pointer(EGLint), "num_config")]), |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 212 | Function(EGLBoolean, "eglGetConfigAttrib", [(EGLDisplay, "dpy"), (EGLConfig, "config"), (EGLattrib, "attribute"), Out(Pointer(EGLint), "value")], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 213 | |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 214 | Function(EGLSurface, "eglCreateWindowSurface", [(EGLDisplay, "dpy"), (EGLConfig, "config"), (EGLNativeWindowType, "win"), (EGLWindowsSurfaceAttribs, "attrib_list")]), |
| 215 | Function(EGLSurface, "eglCreatePbufferSurface", [(EGLDisplay, "dpy"), (EGLConfig, "config"), (EGLPbufferAttribs, "attrib_list")]), |
| 216 | Function(EGLSurface, "eglCreatePixmapSurface", [(EGLDisplay, "dpy"), (EGLConfig, "config"), (EGLNativePixmapType, "pixmap"), (EGLPixmapSurfaceAttribs, "attrib_list")]), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 217 | Function(EGLBoolean, "eglDestroySurface", [(EGLDisplay, "dpy"), (EGLSurface, "surface")]), |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 218 | Function(EGLBoolean, "eglQuerySurface", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLattrib, "attribute"), Out(Pointer(EGLint), "value")], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 219 | |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 220 | Function(EGLBoolean, "eglBindAPI", [(EGLenum, "api")]), |
| 221 | Function(EGLenum, "eglQueryAPI", [], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 222 | |
| 223 | Function(EGLBoolean, "eglWaitClient", []), |
| 224 | |
| 225 | Function(EGLBoolean, "eglReleaseThread", []), |
| 226 | |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 227 | Function(EGLSurface, "eglCreatePbufferFromClientBuffer", [(EGLDisplay, "dpy"), (EGLenum, "buftype"), (EGLClientBuffer, "buffer"), (EGLConfig, "config"), (EGLPbufferFromClientBufferAttribs, "attrib_list")]), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 228 | |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 229 | Function(EGLBoolean, "eglSurfaceAttrib", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLattrib, "attribute"), (EGLint, "value")]), |
| 230 | Function(EGLBoolean, "eglBindTexImage", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLattrib, "buffer")]), |
| 231 | Function(EGLBoolean, "eglReleaseTexImage", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLattrib, "buffer")]), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 232 | |
| 233 | Function(EGLBoolean, "eglSwapInterval", [(EGLDisplay, "dpy"), (EGLint, "interval")]), |
| 234 | |
José Fonseca | 166cd8a | 2014-05-23 23:06:23 +0100 | [diff] [blame] | 235 | Function(EGLContext, "eglCreateContext", [(EGLDisplay, "dpy"), (EGLConfig, "config"), (EGLContext, "share_context"), (EGLContextAttribs, "attrib_list")]), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 236 | Function(EGLBoolean, "eglDestroyContext", [(EGLDisplay, "dpy"), (EGLContext, "ctx")]), |
| 237 | Function(EGLBoolean, "eglMakeCurrent", [(EGLDisplay, "dpy"), (EGLSurface, "draw"), (EGLSurface, "read"), (EGLContext, "ctx")]), |
| 238 | |
| 239 | Function(EGLContext, "eglGetCurrentContext", [], sideeffects=False), |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 240 | Function(EGLSurface, "eglGetCurrentSurface", [(EGLattrib, "readdraw")], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 241 | Function(EGLDisplay, "eglGetCurrentDisplay", [], sideeffects=False), |
| 242 | |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 243 | Function(EGLBoolean, "eglQueryContext", [(EGLDisplay, "dpy"), (EGLContext, "ctx"), (EGLattrib, "attribute"), Out(Pointer(EGLint), "value")], sideeffects=False), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 244 | |
| 245 | Function(EGLBoolean, "eglWaitGL", []), |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 246 | Function(EGLBoolean, "eglWaitNative", [(EGLattrib, "engine")]), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 247 | Function(EGLBoolean, "eglSwapBuffers", [(EGLDisplay, "dpy"), (EGLSurface, "surface")]), |
| 248 | Function(EGLBoolean, "eglCopyBuffers", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLNativePixmapType, "target")]), |
| 249 | |
José Fonseca | bcfc81b | 2012-08-07 21:07:22 +0100 | [diff] [blame] | 250 | Function(EGLProc, "eglGetProcAddress", [(ConstCString, "procname")]), |
Chia-I Wu | 7fbacb7 | 2011-11-30 17:52:40 +0800 | [diff] [blame] | 251 | |
| 252 | # EGL_KHR_lock_surface |
José Fonseca | 74ccf6e | 2013-05-30 10:26:04 +0100 | [diff] [blame] | 253 | # EGL_KHR_lock_surface2 |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 254 | Function(EGLBoolean, "eglLockSurfaceKHR", [(EGLDisplay, "display"), (EGLSurface, "surface"), (EGLLockSurfaceKHRAttribs, "attrib_list")]), |
Chia-I Wu | 7fbacb7 | 2011-11-30 17:52:40 +0800 | [diff] [blame] | 255 | Function(EGLBoolean, "eglUnlockSurfaceKHR", [(EGLDisplay, "display"), (EGLSurface, "surface")]), |
Chia-I Wu | bc61ec3 | 2011-11-30 17:58:03 +0800 | [diff] [blame] | 256 | |
| 257 | # EGL_KHR_image_base |
José Fonseca | ae4339f | 2013-07-22 19:26:01 +0100 | [diff] [blame] | 258 | Function(EGLImageKHR, "eglCreateImageKHR", [(EGLDisplay, "dpy"), (EGLContext, "ctx"), (EGLenum, "target"), (EGLClientBuffer, "buffer"), (EGLAttribArray([('EGL_IMAGE_PRESERVED_KHR', EGLBoolean)]), "attrib_list")]), |
Chia-I Wu | bc61ec3 | 2011-11-30 17:58:03 +0800 | [diff] [blame] | 259 | Function(EGLBoolean, "eglDestroyImageKHR", [(EGLDisplay, "dpy"), (EGLImageKHR, "image")]), |
Chia-I Wu | d674932 | 2011-11-30 18:21:45 +0800 | [diff] [blame] | 260 | |
José Fonseca | 74ccf6e | 2013-05-30 10:26:04 +0100 | [diff] [blame] | 261 | # EGL_KHR_fence_sync |
Chia-I Wu | d674932 | 2011-11-30 18:21:45 +0800 | [diff] [blame] | 262 | # EGL_KHR_reusable_sync |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 263 | Function(EGLSyncKHR, "eglCreateSyncKHR", [(EGLDisplay, "dpy"), (EGLenum, "type"), (EGLAttribArray([]), "attrib_list")]), |
Chia-I Wu | d674932 | 2011-11-30 18:21:45 +0800 | [diff] [blame] | 264 | Function(EGLBoolean, "eglDestroySyncKHR", [(EGLDisplay, "dpy"), (EGLSyncKHR, "sync")]), |
| 265 | Function(EGLint, "eglClientWaitSyncKHR", [(EGLDisplay, "dpy"), (EGLSyncKHR, "sync"), (EGLint, "flags"), (EGLTimeKHR, "timeout")]), |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 266 | Function(EGLBoolean, "eglSignalSyncKHR", [(EGLDisplay, "dpy"), (EGLSyncKHR, "sync"), (EGLenum, "mode")]), |
| 267 | Function(EGLBoolean, "eglGetSyncAttribKHR", [(EGLDisplay, "dpy"), (EGLSyncKHR, "sync"), (EGLattrib, "attribute"), Out(Pointer(EGLint), "value")], sideeffects=False), |
Chia-I Wu | 4b1c825 | 2011-11-30 18:43:23 +0800 | [diff] [blame] | 268 | |
| 269 | # EGL_NV_sync |
Andreas Hartmetz | 83c05ef | 2013-07-09 22:52:46 +0200 | [diff] [blame] | 270 | Function(EGLSyncNV, "eglCreateFenceSyncNV", [(EGLDisplay, "dpy"), (EGLenum, "condition"), (EGLFenceSyncNVAttribs, "attrib_list")]), |
Chia-I Wu | 4b1c825 | 2011-11-30 18:43:23 +0800 | [diff] [blame] | 271 | Function(EGLBoolean, "eglDestroySyncNV", [(EGLSyncNV, "sync")]), |
| 272 | Function(EGLBoolean, "eglFenceNV", [(EGLSyncNV, "sync")]), |
| 273 | Function(EGLint, "eglClientWaitSyncNV", [(EGLSyncNV, "sync"), (EGLint, "flags"), (EGLTimeNV, "timeout")]), |
| 274 | Function(EGLBoolean, "eglSignalSyncNV", [(EGLSyncNV, "sync"), (EGLenum, "mode")]), |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 275 | Function(EGLBoolean, "eglGetSyncAttribNV", [(EGLSyncNV, "sync"), (EGLattrib, "attribute"), Out(Pointer(EGLint), "value")], sideeffects=False), |
Chia-I Wu | cba1890 | 2011-12-01 14:14:36 +0800 | [diff] [blame] | 276 | |
| 277 | # EGL_HI_clientpixmap |
| 278 | Function(EGLSurface, "eglCreatePixmapSurfaceHI", [(EGLDisplay, "dpy"), (EGLConfig, "config"), (Pointer(EGLClientPixmapHI), "pixmap")]), |
Chia-I Wu | f45b647 | 2011-12-01 14:43:54 +0800 | [diff] [blame] | 279 | |
| 280 | # EGL_MESA_drm_image |
Andreas Hartmetz | 54bdb5a | 2013-07-08 12:31:45 +0200 | [diff] [blame] | 281 | Function(EGLImageKHR, "eglCreateDRMImageMESA", [(EGLDisplay, "dpy"), (EGLDrmImageMesaAttribs, "attrib_list")]), |
Chia-I Wu | f45b647 | 2011-12-01 14:43:54 +0800 | [diff] [blame] | 282 | Function(EGLBoolean, "eglExportDRMImageMESA", [(EGLDisplay, "dpy"), (EGLImageKHR, "image"), Out(Pointer(EGLint), "name"), Out(Pointer(EGLint), "handle"), Out(Pointer(EGLint), "stride")]), |
Chia-I Wu | 67be6f1 | 2011-12-01 14:47:02 +0800 | [diff] [blame] | 283 | |
| 284 | # EGL_NV_post_sub_buffer |
| 285 | Function(EGLBoolean, "eglPostSubBufferNV", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLint, "x"), (EGLint, "y"), (EGLint, "width"), (EGLint, "height")]), |
Chia-I Wu | 991b5f5 | 2011-12-01 14:49:53 +0800 | [diff] [blame] | 286 | |
| 287 | # EGL_ANGLE_query_surface_pointer |
Chia-I Wu | 76fe527 | 2011-12-07 17:03:50 +0800 | [diff] [blame] | 288 | Function(EGLBoolean, "eglQuerySurfacePointerANGLE", [(EGLDisplay, "dpy"), (EGLSurface, "surface"), (EGLattrib, "attribute"), Out(Pointer(OpaquePointer(Void)), "value")], sideeffects=False), |
Chia-I Wu | eb7f1bd | 2011-12-01 14:57:24 +0800 | [diff] [blame] | 289 | |
| 290 | # EGL_NV_system_time |
| 291 | Function(EGLuint64NV, "eglGetSystemTimeFrequencyNV", [], sideeffects=False), |
| 292 | Function(EGLuint64NV, "eglGetSystemTimeNV", [], sideeffects=False), |
Arnaud Vrac | fe93afd | 2011-12-19 02:42:15 +0100 | [diff] [blame] | 293 | |
| 294 | # GL_OES_EGL_image |
| 295 | GlFunction(Void, "glEGLImageTargetTexture2DOES", [(GLenum, "target"), (EGLImageKHR, "image")]), |
| 296 | GlFunction(Void, "glEGLImageTargetRenderbufferStorageOES", [(GLenum, "target"), (EGLImageKHR, "image")]), |
Chia-I Wu | c1d4c4d | 2011-11-03 12:23:21 +0800 | [diff] [blame] | 297 | ]) |