José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 1 | ########################################################################## |
| 2 | # |
| 3 | # Copyright 2008-2010 VMware, 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 | |
José Fonseca | 4a826ed | 2010-11-30 16:58:22 +0000 | [diff] [blame] | 27 | """WGL API description""" |
| 28 | |
| 29 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 30 | from glapi import * |
José Fonseca | f20c126 | 2010-11-25 11:39:57 +0000 | [diff] [blame] | 31 | from winapi import * |
José Fonseca | 4bfa5ab | 2011-03-09 15:47:55 +0000 | [diff] [blame] | 32 | from wglenum import * |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 33 | |
| 34 | |
José Fonseca | 8130193 | 2012-11-11 00:10:20 +0000 | [diff] [blame] | 35 | wglapi = Module("WGL") |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 36 | |
| 37 | |
Jose Fonseca | 214a0f1 | 2015-07-17 12:20:30 +0100 | [diff] [blame] | 38 | HGLRC = DECLARE_HANDLE("HGLRC") |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 39 | PROC = Opaque("PROC") |
| 40 | |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 41 | PFD_FLAGS = Flags(DWORD, [ |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 42 | "PFD_DOUBLEBUFFER", |
| 43 | "PFD_STEREO", |
| 44 | "PFD_DRAW_TO_WINDOW", |
| 45 | "PFD_DRAW_TO_BITMAP", |
| 46 | "PFD_SUPPORT_GDI", |
| 47 | "PFD_SUPPORT_OPENGL", |
| 48 | "PFD_GENERIC_FORMAT", |
| 49 | "PFD_NEED_PALETTE", |
| 50 | "PFD_NEED_SYSTEM_PALETTE", |
| 51 | "PFD_SWAP_EXCHANGE", |
| 52 | "PFD_SWAP_COPY", |
| 53 | "PFD_SWAP_LAYER_BUFFERS", |
| 54 | "PFD_GENERIC_ACCELERATED", |
| 55 | "PFD_SUPPORT_DIRECTDRAW", |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 56 | "PFD_DIRECT3D_ACCELERATED", |
José Fonseca | f044283 | 2011-03-09 14:29:26 +0000 | [diff] [blame] | 57 | "PFD_SUPPORT_COMPOSITION", |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 58 | "PFD_DEPTH_DONTCARE", |
| 59 | "PFD_DOUBLEBUFFER_DONTCARE", |
| 60 | "PFD_STEREO_DONTCARE", |
| 61 | ]) |
| 62 | |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 63 | PFD_TYPE = FakeEnum(BYTE, [ |
| 64 | "PFD_TYPE_RGBA", |
| 65 | "PFD_TYPE_COLORINDEX", |
| 66 | ]) |
| 67 | |
| 68 | PFD_PLANE = FakeEnum(BYTE, [ |
| 69 | "PFD_MAIN_PLANE", |
| 70 | "PFD_OVERLAY_PLANE", |
| 71 | "PFD_UNDERLAY_PLANE", |
| 72 | ]) |
| 73 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 74 | PIXELFORMATDESCRIPTOR = Struct("PIXELFORMATDESCRIPTOR", [ |
| 75 | (WORD, "nSize"), |
| 76 | (WORD, "nVersion"), |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 77 | (PFD_FLAGS, "dwFlags"), |
| 78 | (PFD_TYPE, "iPixelType"), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 79 | (BYTE, "cColorBits"), |
| 80 | (BYTE, "cRedBits"), |
| 81 | (BYTE, "cRedShift"), |
| 82 | (BYTE, "cGreenBits"), |
| 83 | (BYTE, "cGreenShift"), |
| 84 | (BYTE, "cBlueBits"), |
| 85 | (BYTE, "cBlueShift"), |
| 86 | (BYTE, "cAlphaBits"), |
| 87 | (BYTE, "cAlphaShift"), |
| 88 | (BYTE, "cAccumBits"), |
| 89 | (BYTE, "cAccumRedBits"), |
| 90 | (BYTE, "cAccumGreenBits"), |
| 91 | (BYTE, "cAccumBlueBits"), |
| 92 | (BYTE, "cAccumAlphaBits"), |
| 93 | (BYTE, "cDepthBits"), |
| 94 | (BYTE, "cStencilBits"), |
| 95 | (BYTE, "cAuxBuffers"), |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 96 | (PFD_PLANE, "iLayerType"), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 97 | (BYTE, "bReserved"), |
| 98 | (DWORD, "dwLayerMask"), |
| 99 | (DWORD, "dwVisibleMask"), |
| 100 | (DWORD, "dwDamageMask"), |
| 101 | ]) |
| 102 | |
| 103 | POINTFLOAT = Struct("POINTFLOAT", [ |
| 104 | (FLOAT, "x"), |
| 105 | (FLOAT, "y"), |
| 106 | ]) |
| 107 | |
| 108 | GLYPHMETRICSFLOAT = Struct("GLYPHMETRICSFLOAT", [ |
| 109 | (FLOAT, "gmfBlackBoxX"), |
| 110 | (FLOAT, "gmfBlackBoxY"), |
| 111 | (POINTFLOAT, "gmfptGlyphOrigin"), |
| 112 | (FLOAT, "gmfCellIncX"), |
| 113 | (FLOAT, "gmfCellIncY"), |
| 114 | ]) |
| 115 | LPGLYPHMETRICSFLOAT = Pointer(GLYPHMETRICSFLOAT) |
| 116 | |
José Fonseca | b6f8267 | 2014-11-18 22:15:29 +0000 | [diff] [blame] | 117 | WGLFontFormat = FakeEnum(Int, [ |
| 118 | 'WGL_FONT_LINES', |
| 119 | 'WGL_FONT_POLYGONS', |
| 120 | ]) |
| 121 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 122 | COLORREF = Alias("COLORREF", DWORD) |
| 123 | |
| 124 | |
| 125 | LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [ |
| 126 | (WORD, "nSize"), |
| 127 | (WORD, "nVersion"), |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 128 | (PFD_FLAGS, "dwFlags"), |
| 129 | (PFD_TYPE, "iPixelType"), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 130 | (BYTE, "cColorBits"), |
| 131 | (BYTE, "cRedBits"), |
| 132 | (BYTE, "cRedShift"), |
| 133 | (BYTE, "cGreenBits"), |
| 134 | (BYTE, "cGreenShift"), |
| 135 | (BYTE, "cBlueBits"), |
| 136 | (BYTE, "cBlueShift"), |
| 137 | (BYTE, "cAlphaBits"), |
| 138 | (BYTE, "cAlphaShift"), |
| 139 | (BYTE, "cAccumBits"), |
| 140 | (BYTE, "cAccumRedBits"), |
| 141 | (BYTE, "cAccumGreenBits"), |
| 142 | (BYTE, "cAccumBlueBits"), |
| 143 | (BYTE, "cAccumAlphaBits"), |
| 144 | (BYTE, "cDepthBits"), |
| 145 | (BYTE, "cStencilBits"), |
| 146 | (BYTE, "cAuxBuffers"), |
José Fonseca | 5258cb7 | 2014-11-19 16:29:15 +0000 | [diff] [blame] | 147 | (PFD_PLANE, "iLayerPlane"), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 148 | (BYTE, "bReserved"), |
| 149 | (COLORREF, "crTransparent"), |
| 150 | ]) |
| 151 | LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR) |
| 152 | |
| 153 | WGLSWAP = Struct("WGLSWAP", [ |
José Fonseca | 1982897 | 2010-11-29 20:34:32 +0000 | [diff] [blame] | 154 | (HDC, "hdc"), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 155 | (UINT, "uiFlags"), |
| 156 | ]) |
| 157 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 158 | WGLContextAttribs = AttribArray(Const(WGLenum), [ |
Andreas Hartmetz | 13cd0ab | 2013-07-09 22:56:31 +0200 | [diff] [blame] | 159 | ('WGL_CONTEXT_MAJOR_VERSION_ARB', Int), |
| 160 | ('WGL_CONTEXT_MINOR_VERSION_ARB', Int), |
| 161 | ('WGL_CONTEXT_LAYER_PLANE_ARB', Int), |
José Fonseca | 2a2150e | 2014-05-30 23:41:53 +0100 | [diff] [blame] | 162 | ('WGL_CONTEXT_FLAGS_ARB', Flags(Int, [ |
| 163 | "WGL_CONTEXT_DEBUG_BIT_ARB", |
| 164 | "WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB", |
| 165 | "WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB", |
José Fonseca | 29603ba | 2015-03-12 11:00:31 +0000 | [diff] [blame] | 166 | "WGL_CONTEXT_RESET_ISOLATION_BIT_ARB", |
José Fonseca | 2a2150e | 2014-05-30 23:41:53 +0100 | [diff] [blame] | 167 | ])), |
| 168 | ('WGL_CONTEXT_PROFILE_MASK_ARB', Flags(Int, [ |
| 169 | "WGL_CONTEXT_CORE_PROFILE_BIT_ARB", |
| 170 | "WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB", |
José Fonseca | cc32fe5 | 2014-07-23 17:14:42 +0100 | [diff] [blame] | 171 | "WGL_CONTEXT_ES_PROFILE_BIT_EXT", |
José Fonseca | 0d70970 | 2014-08-13 18:40:28 +0100 | [diff] [blame] | 172 | ])), |
| 173 | ('WGL_CONTEXT_RELEASE_BEHAVIOR_ARB', FakeEnum(Int, [ |
| 174 | 'WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB', |
| 175 | 'WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB', |
| 176 | ])), |
Andreas Hartmetz | 13cd0ab | 2013-07-09 22:56:31 +0200 | [diff] [blame] | 177 | ]) |
| 178 | |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 179 | WGLPixelFormatAttribsList = [ |
José Fonseca | 29603ba | 2015-03-12 11:00:31 +0000 | [diff] [blame] | 180 | # WGL_ARB_pixel_format/WGL_EXT_pixel_format |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 181 | ('WGL_DRAW_TO_WINDOW_ARB', BOOL), |
| 182 | ('WGL_DRAW_TO_BITMAP_ARB', BOOL), |
| 183 | ('WGL_ACCELERATION_ARB', FakeEnum(Int, ['WGL_NO_ACCELERATION_ARB', 'WGL_GENERIC_ACCELERATION_ARB', 'WGL_FULL_ACCELERATION_ARB'])), |
| 184 | ('WGL_NEED_PALETTE_ARB', BOOL), |
| 185 | ('WGL_NEED_SYSTEM_PALETTE_ARB', BOOL), |
| 186 | ('WGL_SWAP_LAYER_BUFFERS_ARB', BOOL), |
| 187 | ('WGL_SWAP_METHOD_ARB', FakeEnum(Int, ['WGL_SWAP_EXCHANGE_ARB', 'WGL_SWAP_COPY_ARB', 'WGL_SWAP_UNDEFINED_ARB'])), |
| 188 | ('WGL_NUMBER_OVERLAYS_ARB', Int), |
| 189 | ('WGL_NUMBER_UNDERLAYS_ARB', Int), |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 190 | ('WGL_TRANSPARENT_EXT', BOOL), |
| 191 | ('WGL_TRANSPARENT_VALUE_EXT', Int), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 192 | ('WGL_SHARE_DEPTH_ARB', BOOL), |
| 193 | ('WGL_SHARE_STENCIL_ARB', BOOL), |
| 194 | ('WGL_SHARE_ACCUM_ARB', BOOL), |
| 195 | ('WGL_SUPPORT_GDI_ARB', BOOL), |
| 196 | ('WGL_SUPPORT_OPENGL_ARB', BOOL), |
| 197 | ('WGL_DOUBLE_BUFFER_ARB', BOOL), |
| 198 | ('WGL_STEREO_ARB', BOOL), |
| 199 | ('WGL_PIXEL_TYPE_ARB', FakeEnum(Int, ['WGL_TYPE_RGBA_ARB', 'WGL_TYPE_COLORINDEX_ARB'])), |
| 200 | ('WGL_COLOR_BITS_ARB', Int), |
| 201 | ('WGL_RED_BITS_ARB', Int), |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 202 | ('WGL_RED_SHIFT_EXT', Int), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 203 | ('WGL_GREEN_BITS_ARB', Int), |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 204 | ('WGL_GREEN_SHIFT_EXT', Int), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 205 | ('WGL_BLUE_BITS_ARB', Int), |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 206 | ('WGL_BLUE_SHIFT_EXT', Int), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 207 | ('WGL_ALPHA_BITS_ARB', Int), |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 208 | ('WGL_ALPHA_SHIFT_EXT', Int), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 209 | ('WGL_ACCUM_BITS_ARB', Int), |
| 210 | ('WGL_ACCUM_RED_BITS_ARB', Int), |
| 211 | ('WGL_ACCUM_GREEN_BITS_ARB', Int), |
| 212 | ('WGL_ACCUM_BLUE_BITS_ARB', Int), |
| 213 | ('WGL_ACCUM_ALPHA_BITS_ARB', Int), |
| 214 | ('WGL_DEPTH_BITS_ARB', Int), |
| 215 | ('WGL_STENCIL_BITS_ARB', Int), |
José Fonseca | da7bbff | 2013-07-20 14:54:02 +0100 | [diff] [blame] | 216 | ('WGL_AUX_BUFFERS_ARB', Int), |
| 217 | ('WGL_SAMPLE_BUFFERS_ARB', Int), |
| 218 | ('WGL_SAMPLES_ARB', Int), |
José Fonseca | 29603ba | 2015-03-12 11:00:31 +0000 | [diff] [blame] | 219 | # WGL_ARB_pbuffer |
José Fonseca | f1e3957 | 2015-03-12 11:00:07 +0000 | [diff] [blame] | 220 | ('WGL_DRAW_TO_PBUFFER_ARB', BOOL), |
José Fonseca | 29603ba | 2015-03-12 11:00:31 +0000 | [diff] [blame] | 221 | # WGL_ARB_render_texture |
| 222 | ('WGL_BIND_TO_TEXTURE_RGB_ARB', BOOL), |
| 223 | ('WGL_BIND_TO_TEXTURE_RGBA_ARB', BOOL), |
Jose Fonseca | 23fb43b | 2019-01-22 18:33:50 +0000 | [diff] [blame^] | 224 | # WGL_NV_float_buffer |
| 225 | ('WGL_FLOAT_COMPONENTS_NV', Int), |
| 226 | ('WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV', BOOL), |
| 227 | ('WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV', BOOL), |
| 228 | ('WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV', BOOL), |
| 229 | ('WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV', BOOL), |
José Fonseca | 29603ba | 2015-03-12 11:00:31 +0000 | [diff] [blame] | 230 | # WGL_NV_video_output |
| 231 | ('WGL_BIND_TO_VIDEO_RGB_NV', BOOL), |
| 232 | ('WGL_BIND_TO_VIDEO_RGBA_NV', BOOL), |
| 233 | ('WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV', BOOL), |
Jose Fonseca | 874b1dd | 2017-08-29 10:18:38 +0100 | [diff] [blame] | 234 | # WGL_ARB_framebuffer_sRGB |
| 235 | ('WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB', BOOL), |
Andreas Hartmetz | 207ced3 | 2013-07-12 11:50:39 +0200 | [diff] [blame] | 236 | ] |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 237 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 238 | WGLPixelFormatAttribs = AttribArray(Const(WGLenum), WGLPixelFormatAttribsList) |
| 239 | WGLPixelFormatFloatAttribs = AttribArray(Const(FLOAT), WGLPixelFormatAttribsList) |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 240 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 241 | WGLCreatePbufferARBAttribs = AttribArray(Const(WGLenum), [ |
Jose Fonseca | f3474cc | 2015-06-22 16:35:27 +0100 | [diff] [blame] | 242 | ('WGL_PBUFFER_LARGEST_ARB', Int), |
| 243 | # WGL_ARB_render_texture |
| 244 | ('WGL_TEXTURE_FORMAT_ARB', WGLenum), |
| 245 | ('WGL_TEXTURE_TARGET_ARB', WGLenum), |
| 246 | ('WGL_MIPMAP_TEXTURE_ARB', BOOL), |
| 247 | # WGL_NV_render_depth_texture |
| 248 | ('WGL_DEPTH_TEXTURE_FORMAT_NV', WGLenum), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 249 | ]) |
| 250 | |
| 251 | CubeFaceEnum = FakeEnum(Int, [ |
| 252 | 'WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB', |
| 253 | 'WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB', |
| 254 | 'WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB', |
| 255 | 'WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB', |
| 256 | 'WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB', |
| 257 | 'WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB' |
| 258 | ]) |
| 259 | |
José Fonseca | 48a92b9 | 2013-07-20 15:34:24 +0100 | [diff] [blame] | 260 | WGLSetPbufferARBAttribs = AttribArray(Const(WGLenum), [ |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 261 | ('WGL_MIPMAP_LEVEL_ARB', Int), |
| 262 | ('WGL_CUBE_MAP_FACE_ARB', CubeFaceEnum) |
| 263 | ]) |
| 264 | |
Jose Fonseca | 214a0f1 | 2015-07-17 12:20:30 +0100 | [diff] [blame] | 265 | HPBUFFERARB = DECLARE_HANDLE("HPBUFFERARB") |
| 266 | HPBUFFEREXT = DECLARE_HANDLE("HPBUFFEREXT") |
| 267 | HPVIDEODEV = DECLARE_HANDLE("HPVIDEODEV") |
| 268 | HVIDEOOUTPUTDEVICENV = DECLARE_HANDLE("HVIDEOOUTPUTDEVICENV") |
| 269 | HVIDEOINPUTDEVICENV = DECLARE_HANDLE("HVIDEOINPUTDEVICENV") |
| 270 | HGPUNV = DECLARE_HANDLE("HGPUNV") |
José Fonseca | e99d8cb | 2013-07-08 19:40:50 +0100 | [diff] [blame] | 271 | |
José Fonseca | 8d6273e | 2013-11-29 16:25:36 +0000 | [diff] [blame] | 272 | GPU_DEVICE = Struct("_GPU_DEVICE", [ |
José Fonseca | e99d8cb | 2013-07-08 19:40:50 +0100 | [diff] [blame] | 273 | (DWORD, "cb"), |
| 274 | (CString, "DeviceName"), |
| 275 | (CString, "DeviceString"), |
| 276 | (DWORD, "Flags"), |
| 277 | (RECT, "rcVirtualScreen"), |
| 278 | ]) |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 279 | |
José Fonseca | b6f8267 | 2014-11-18 22:15:29 +0000 | [diff] [blame] | 280 | WGLlist = Handle("list", DWORD) |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 281 | |
José Fonseca | 54f304a | 2012-01-14 19:33:08 +0000 | [diff] [blame] | 282 | wglapi.addFunctions([ |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 283 | # WGL |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 284 | StdFunction(HGLRC, "wglCreateContext", [(HDC, "hdc")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 285 | StdFunction(BOOL, "wglDeleteContext", [(HGLRC, "hglrc")]), |
| 286 | StdFunction(HGLRC, "wglGetCurrentContext", [], sideeffects=False), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 287 | StdFunction(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]), |
José Fonseca | c80b956 | 2014-11-19 16:29:46 +0000 | [diff] [blame] | 288 | StdFunction(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (Flags(UINT, GLbitfield_attrib.values), "mask")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 289 | StdFunction(Int, "wglChoosePixelFormat", [(HDC, "hdc"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), |
| 290 | StdFunction(Int, "wglDescribePixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (UINT, "nBytes"), Out(Pointer(PIXELFORMATDESCRIPTOR), "ppfd")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 291 | StdFunction(HDC, "wglGetCurrentDC", [], sideeffects=False), |
| 292 | StdFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")], sideeffects=False), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 293 | StdFunction(Int, "wglGetPixelFormat", [(HDC, "hdc")], sideeffects=False), |
| 294 | StdFunction(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 295 | StdFunction(BOOL, "wglSwapBuffers", [(HDC, "hdc")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 296 | StdFunction(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 297 | StdFunction(HGLRC, "wglCreateLayerContext", [(HDC, "hdc"), (Int, "iLayerPlane")]), |
| 298 | StdFunction(BOOL, "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), Out(Pointer(LAYERPLANEDESCRIPTOR), "plpd")]), |
| 299 | StdFunction(Int, "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Array(Const(COLORREF), "cEntries"), "pcr")]), |
| 300 | StdFunction(Int, "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), Out(Array(COLORREF, "cEntries"), "pcr")], sideeffects=False), |
| 301 | StdFunction(BOOL, "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]), |
| 302 | StdFunction(BOOL, "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]), |
José Fonseca | b6f8267 | 2014-11-18 22:15:29 +0000 | [diff] [blame] | 303 | StdFunction(BOOL, "wglUseFontBitmapsA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (WGLlist, "listBase")]), |
| 304 | StdFunction(BOOL, "wglUseFontBitmapsW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (WGLlist, "listBase")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 305 | StdFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Array(Const(WGLSWAP), "n"), "ps")]), |
José Fonseca | b6f8267 | 2014-11-18 22:15:29 +0000 | [diff] [blame] | 306 | StdFunction(BOOL, "wglUseFontOutlinesA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (WGLlist, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (WGLFontFormat, "format"), Out(Array(GLYPHMETRICSFLOAT, "count"), "lpgmf")]), |
| 307 | StdFunction(BOOL, "wglUseFontOutlinesW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (WGLlist, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (WGLFontFormat, "format"), Out(Array(GLYPHMETRICSFLOAT, "count"), "lpgmf")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 308 | |
| 309 | # WGL_ARB_buffer_region |
| 310 | StdFunction(HANDLE, "wglCreateBufferRegionARB", [(HDC, "hDC"), (Int, "iLayerPlane"), (UINT, "uType")]), |
| 311 | StdFunction(VOID, "wglDeleteBufferRegionARB", [(HANDLE, "hRegion")]), |
| 312 | StdFunction(BOOL, "wglSaveBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]), |
| 313 | StdFunction(BOOL, "wglRestoreBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height"), (Int, "xSrc"), (Int, "ySrc")]), |
| 314 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 315 | # WGL_ARB_extensions_string |
José Fonseca | bcfc81b | 2012-08-07 21:07:22 +0100 | [diff] [blame] | 316 | StdFunction(ConstCString, "wglGetExtensionsStringARB", [(HDC, "hdc")], sideeffects=False), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 317 | |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 318 | # WGL_ARB_pixel_format |
José Fonseca | 4bfa5ab | 2011-03-09 15:47:55 +0000 | [diff] [blame] | 319 | StdFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False), |
| 320 | StdFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False), |
José Fonseca | de0af4b | 2014-11-07 19:42:04 +0000 | [diff] [blame] | 321 | StdFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (WGLPixelFormatAttribs, "piAttribIList"), (WGLPixelFormatFloatAttribs, "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "std::min(nMaxFormats, *nNumFormats)"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]), |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 322 | |
José Fonseca | 01dc379 | 2010-11-24 16:50:31 +0000 | [diff] [blame] | 323 | # WGL_ARB_make_current_read |
| 324 | StdFunction(BOOL, "wglMakeContextCurrentARB", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]), |
| 325 | StdFunction(HDC, "wglGetCurrentReadDCARB", [], sideeffects=False), |
| 326 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 327 | # WGL_ARB_pbuffer |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 328 | StdFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (WGLCreatePbufferARBAttribs, "piAttribList")]), |
José Fonseca | 62617d1 | 2011-05-05 21:12:54 +0100 | [diff] [blame] | 329 | StdFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 330 | StdFunction(Int, "wglReleasePbufferDCARB", [(HPBUFFERARB, "hPbuffer"), (HDC, "hDC")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 331 | StdFunction(BOOL, "wglDestroyPbufferARB", [(HPBUFFERARB, "hPbuffer")]), |
José Fonseca | 62617d1 | 2011-05-05 21:12:54 +0100 | [diff] [blame] | 332 | StdFunction(BOOL, "wglQueryPbufferARB", [(HPBUFFERARB, "hPbuffer"), (WGLenum, "iAttribute"), Out(Pointer(Int), "piValue")], sideeffects=False), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 333 | |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 334 | # WGL_ARB_render_texture |
Jose Fonseca | 23fb43b | 2019-01-22 18:33:50 +0000 | [diff] [blame^] | 335 | StdFunction(BOOL, "wglBindTexImageARB", [(HPBUFFERARB, "hPbuffer"), (WGLenum, "iBuffer")]), |
| 336 | StdFunction(BOOL, "wglReleaseTexImageARB", [(HPBUFFERARB, "hPbuffer"), (WGLenum, "iBuffer")]), |
Andreas Hartmetz | 8b095e5 | 2013-07-10 00:12:39 +0200 | [diff] [blame] | 337 | StdFunction(BOOL, "wglSetPbufferAttribARB", [(HPBUFFERARB, "hPbuffer"), (WGLSetPbufferARBAttribs, "piAttribList")]), |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 338 | |
| 339 | # WGL_ARB_create_context |
Andreas Hartmetz | 13cd0ab | 2013-07-09 22:56:31 +0200 | [diff] [blame] | 340 | StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (WGLContextAttribs, "attribList")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 341 | |
José Fonseca | e99d8cb | 2013-07-08 19:40:50 +0100 | [diff] [blame] | 342 | # WGL_EXT_display_color_table |
| 343 | StdFunction(GLboolean, "wglCreateDisplayColorTableEXT", [(GLushort, "id")]), |
| 344 | StdFunction(GLboolean, "wglLoadDisplayColorTableEXT", [(Array(Const(GLushort), "length"), "table"), (GLuint, "length")]), |
| 345 | StdFunction(GLboolean, "wglBindDisplayColorTableEXT", [(GLushort, "id")]), |
| 346 | StdFunction(VOID, "wglDestroyDisplayColorTableEXT", [(GLushort, "id")]), |
| 347 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 348 | # WGL_EXT_extensions_string |
José Fonseca | bcfc81b | 2012-08-07 21:07:22 +0100 | [diff] [blame] | 349 | StdFunction(ConstCString, "wglGetExtensionsStringEXT", [], sideeffects=False), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 350 | |
José Fonseca | 01dc379 | 2010-11-24 16:50:31 +0000 | [diff] [blame] | 351 | # WGL_EXT_make_current_read |
| 352 | StdFunction(BOOL, "wglMakeContextCurrentEXT", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]), |
| 353 | StdFunction(HDC, "wglGetCurrentReadDCEXT", [], sideeffects=False), |
| 354 | |
José Fonseca | e99d8cb | 2013-07-08 19:40:50 +0100 | [diff] [blame] | 355 | # WGL_EXT_pbuffer |
José Fonseca | c037ae2 | 2013-07-20 14:53:14 +0100 | [diff] [blame] | 356 | StdFunction(HPBUFFEREXT, "wglCreatePbufferEXT", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (WGLCreatePbufferARBAttribs, "piAttribList")]), |
José Fonseca | e99d8cb | 2013-07-08 19:40:50 +0100 | [diff] [blame] | 357 | StdFunction(HDC, "wglGetPbufferDCEXT", [(HPBUFFEREXT, "hPbuffer")], sideeffects=False), |
| 358 | StdFunction(Int, "wglReleasePbufferDCEXT", [(HPBUFFEREXT, "hPbuffer"), (HDC, "hDC")]), |
| 359 | StdFunction(BOOL, "wglDestroyPbufferEXT", [(HPBUFFEREXT, "hPbuffer")]), |
| 360 | StdFunction(BOOL, "wglQueryPbufferEXT", [(HPBUFFEREXT, "hPbuffer"), (WGLenum, "iAttribute"), Out(Pointer(Int), "piValue")], sideeffects=False), |
| 361 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 362 | # WGL_EXT_pixel_format |
José Fonseca | 4bfa5ab | 2011-03-09 15:47:55 +0000 | [diff] [blame] | 363 | StdFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False), |
| 364 | StdFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False), |
José Fonseca | de0af4b | 2014-11-07 19:42:04 +0000 | [diff] [blame] | 365 | StdFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (WGLPixelFormatAttribs, "piAttribIList"), (WGLPixelFormatFloatAttribs, "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "std::min(nMaxFormats, *nNumFormats)"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 366 | |
José Fonseca | 01dc379 | 2010-11-24 16:50:31 +0000 | [diff] [blame] | 367 | # WGL_EXT_swap_control |
| 368 | StdFunction(BOOL, "wglSwapIntervalEXT", [(Int, "interval")]), |
| 369 | StdFunction(Int, "wglGetSwapIntervalEXT", [], sideeffects=False), |
| 370 | |
José Fonseca | 7681986 | 2010-11-25 19:06:00 +0000 | [diff] [blame] | 371 | # WGL_NV_vertex_array_range |
| 372 | StdFunction(OpaquePointer(Void), "wglAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]), |
| 373 | StdFunction(Void, "wglFreeMemoryNV", [(OpaquePointer(Void), "pointer")]), |
| 374 | |
José Fonseca | e99d8cb | 2013-07-08 19:40:50 +0100 | [diff] [blame] | 375 | # WGL_OML_sync_control |
| 376 | StdFunction(BOOL, "wglGetSyncValuesOML", [(HDC, "hdc"), Out(Pointer(INT64), "ust"), Out(Pointer(INT64), "msc"), Out(Pointer(INT64), "sbc")], sideeffects=False), |
| 377 | StdFunction(BOOL, "wglGetMscRateOML", [(HDC, "hdc"), Out(Pointer(INT32), "numerator"), Out(Pointer(INT32), "denominator")], sideeffects=False), |
| 378 | StdFunction(INT64, "wglSwapBuffersMscOML", [(HDC, "hdc"), (INT64, "target_msc"), (INT64, "divisor"), (INT64, "remainder")]), |
| 379 | StdFunction(INT64, "wglSwapLayerBuffersMscOML", [(HDC, "hdc"), (Int, "fuPlanes"), (INT64, "target_msc"), (INT64, "divisor"), (INT64, "remainder")]), |
| 380 | StdFunction(BOOL, "wglWaitForMscOML", [(HDC, "hdc"), (INT64, "target_msc"), (INT64, "divisor"), (INT64, "remainder"), Out(Pointer(INT64), "ust"), Out(Pointer(INT64), "msc"), Out(Pointer(INT64), "sbc")]), |
| 381 | StdFunction(BOOL, "wglWaitForSbcOML", [(HDC, "hdc"), (INT64, "target_sbc"), Out(Pointer(INT64), "ust"), Out(Pointer(INT64), "msc"), Out(Pointer(INT64), "sbc")]), |
| 382 | |
| 383 | # WGL_I3D_digital_video_control |
| 384 | StdFunction(BOOL, "wglGetDigitalVideoParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), Out(OpaqueArray(Int, "_wglGetDigitalVideoParametersI3D_size(iAttribute)"), "piValue")], sideeffects=False), |
| 385 | StdFunction(BOOL, "wglSetDigitalVideoParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), (OpaqueArray(Const(Int), "_wglSetDigitalVideoParametersI3D_size(iAttribute)"), "piValue")]), |
| 386 | |
| 387 | # WGL_I3D_gamma |
| 388 | StdFunction(BOOL, "wglGetGammaTableParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), Out(OpaqueArray(Int, "_wglGetGammaTableParametersI3D_size(iAttribute)"), "piValue")], sideeffects=False), |
| 389 | StdFunction(BOOL, "wglSetGammaTableParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), (OpaqueArray(Const(Int), "_wglSetGammaTableParametersI3D_size(iAttribute)"), "piValue")]), |
| 390 | StdFunction(BOOL, "wglGetGammaTableI3D", [(HDC, "hDC"), (Int, "iEntries"), Out(Array(USHORT, "iEntries"), "puRed"), Out(Array(USHORT, "iEntries"), "puGreen"), Out(Array(USHORT, "iEntries"), "puBlue")], sideeffects=False), |
| 391 | StdFunction(BOOL, "wglSetGammaTableI3D", [(HDC, "hDC"), (Int, "iEntries"), (Array(Const(USHORT), "iEntries"), "puRed"), (Array(Const(USHORT), "iEntries"), "puGreen"), (Array(Const(USHORT), "iEntries"), "puBlue")]), |
| 392 | |
| 393 | # WGL_I3D_genlock |
| 394 | StdFunction(BOOL, "wglEnableGenlockI3D", [(HDC, "hDC")]), |
| 395 | StdFunction(BOOL, "wglDisableGenlockI3D", [(HDC, "hDC")]), |
| 396 | StdFunction(BOOL, "wglIsEnabledGenlockI3D", [(HDC, "hDC"), Out(Pointer(BOOL), "pFlag")], sideeffects=False), |
| 397 | StdFunction(BOOL, "wglGenlockSourceI3D", [(HDC, "hDC"), (UINT, "uSource")]), |
| 398 | StdFunction(BOOL, "wglGetGenlockSourceI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uSource")], sideeffects=False), |
| 399 | StdFunction(BOOL, "wglGenlockSourceEdgeI3D", [(HDC, "hDC"), (UINT, "uEdge")]), |
| 400 | StdFunction(BOOL, "wglGetGenlockSourceEdgeI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uEdge")], sideeffects=False), |
| 401 | StdFunction(BOOL, "wglGenlockSampleRateI3D", [(HDC, "hDC"), (UINT, "uRate")]), |
| 402 | StdFunction(BOOL, "wglGetGenlockSampleRateI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uRate")], sideeffects=False), |
| 403 | StdFunction(BOOL, "wglGenlockSourceDelayI3D", [(HDC, "hDC"), (UINT, "uDelay")]), |
| 404 | StdFunction(BOOL, "wglGetGenlockSourceDelayI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uDelay")], sideeffects=False), |
| 405 | StdFunction(BOOL, "wglQueryGenlockMaxSourceDelayI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uMaxLineDelay"), Out(Pointer(UINT), "uMaxPixelDelay")]), |
| 406 | |
| 407 | # WGL_I3D_image_buffer |
| 408 | StdFunction(LPVOID, "wglCreateImageBufferI3D", [(HDC, "hDC"), (DWORD, "dwSize"), (UINT, "uFlags")]), |
| 409 | StdFunction(BOOL, "wglDestroyImageBufferI3D", [(HDC, "hDC"), (LPVOID, "pAddress")]), |
| 410 | StdFunction(BOOL, "wglAssociateImageBufferEventsI3D", [(HDC, "hDC"), (Array(Const(HANDLE), "count"), "pEvent"), (Array(Const(LPVOID), "count"), "pAddress"), (Array(Const(DWORD), "count"), "pSize"), (UINT, "count")]), |
| 411 | StdFunction(BOOL, "wglReleaseImageBufferEventsI3D", [(HDC, "hDC"), (Array(Const(LPVOID), "count"), "pAddress"), (UINT, "count")]), |
| 412 | |
| 413 | # WGL_I3D_swap_frame_lock |
| 414 | StdFunction(BOOL, "wglEnableFrameLockI3D", []), |
| 415 | StdFunction(BOOL, "wglDisableFrameLockI3D", []), |
| 416 | StdFunction(BOOL, "wglIsEnabledFrameLockI3D", [Out(Pointer(BOOL), "pFlag")], sideeffects=False), |
| 417 | StdFunction(BOOL, "wglQueryFrameLockMasterI3D", [Out(Pointer(BOOL), "pFlag")]), |
| 418 | |
| 419 | # WGL_I3D_swap_frame_usage |
| 420 | StdFunction(BOOL, "wglGetFrameUsageI3D", [Out(Pointer(Float), "pUsage")], sideeffects=False), |
| 421 | StdFunction(BOOL, "wglBeginFrameTrackingI3D", []), |
| 422 | StdFunction(BOOL, "wglEndFrameTrackingI3D", []), |
| 423 | StdFunction(BOOL, "wglQueryFrameTrackingI3D", [Out(Pointer(DWORD), "pFrameCount"), Out(Pointer(DWORD), "pMissedFrames"), Out(Pointer(Float), "pLastMissedUsage")]), |
| 424 | |
| 425 | # WGL_3DL_stereo_control |
| 426 | StdFunction(BOOL, "wglSetStereoEmitterState3DL", [(HDC, "hDC"), (UINT, "uState")]), |
| 427 | |
| 428 | # WGL_NV_present_video |
| 429 | StdFunction(Int, "wglEnumerateVideoDevicesNV", [(HDC, "hDC"), Out(OpaquePointer(HVIDEOOUTPUTDEVICENV), "phDeviceList")]), |
| 430 | StdFunction(BOOL, "wglBindVideoDeviceNV", [(HDC, "hDC"), (UInt, "uVideoSlot"), (HVIDEOOUTPUTDEVICENV, "hVideoDevice"), (OpaqueArray(Const(Int), "_wglBindVideoDeviceNV_size()"), "piAttribList")]), |
| 431 | StdFunction(BOOL, "wglQueryCurrentContextNV", [(Int, "iAttribute"), Out(OpaqueArray(Int, "_wglQueryCurrentContextNV_size()"), "piValue")]), |
| 432 | |
| 433 | # WGL_NV_video_output |
| 434 | StdFunction(BOOL, "wglGetVideoDeviceNV", [(HDC, "hDC"), (Int, "numDevices"), Out(Pointer(HPVIDEODEV), "hVideoDevice")], sideeffects=False), |
| 435 | StdFunction(BOOL, "wglReleaseVideoDeviceNV", [(HPVIDEODEV, "hVideoDevice")]), |
| 436 | StdFunction(BOOL, "wglBindVideoImageNV", [(HPVIDEODEV, "hVideoDevice"), (HPBUFFERARB, "hPbuffer"), (Int, "iVideoBuffer")]), |
| 437 | StdFunction(BOOL, "wglReleaseVideoImageNV", [(HPBUFFERARB, "hPbuffer"), (Int, "iVideoBuffer")]), |
| 438 | StdFunction(BOOL, "wglSendPbufferToVideoNV", [(HPBUFFERARB, "hPbuffer"), (Int, "iBufferType"), Out(Pointer(ULong), "pulCounterPbuffer"), (BOOL, "bBlock")]), |
| 439 | StdFunction(BOOL, "wglGetVideoInfoNV", [(HPVIDEODEV, "hpVideoDevice"), Out(Pointer(ULong), "pulCounterOutputPbuffer"), Out(Pointer(ULong), "pulCounterOutputVideo")], sideeffects=False), |
| 440 | |
| 441 | # WGL_NV_swap_group |
| 442 | StdFunction(BOOL, "wglJoinSwapGroupNV", [(HDC, "hDC"), (GLuint, "group")]), |
| 443 | StdFunction(BOOL, "wglBindSwapBarrierNV", [(GLuint, "group"), (GLuint, "barrier")]), |
| 444 | StdFunction(BOOL, "wglQuerySwapGroupNV", [(HDC, "hDC"), Out(Pointer(GLuint), "group"), Out(Pointer(GLuint), "barrier")]), |
| 445 | StdFunction(BOOL, "wglQueryMaxSwapGroupsNV", [(HDC, "hDC"), Out(Pointer(GLuint), "maxGroups"), Out(Pointer(GLuint), "maxBarriers")]), |
| 446 | StdFunction(BOOL, "wglQueryFrameCountNV", [(HDC, "hDC"), Out(Pointer(GLuint), "count")]), |
| 447 | StdFunction(BOOL, "wglResetFrameCountNV", [(HDC, "hDC")]), |
| 448 | |
| 449 | # WGL_NV_gpu_affinity |
| 450 | StdFunction(BOOL, "wglEnumGpusNV", [(UINT, "iGpuIndex"), Out(Pointer(HGPUNV), "phGpu")]), |
| 451 | StdFunction(BOOL, "wglEnumGpuDevicesNV", [(HGPUNV, "hGpu"), (UINT, "iDeviceIndex"), Out(Pointer(GPU_DEVICE), "lpGpuDevice")]), |
| 452 | StdFunction(HDC, "wglCreateAffinityDCNV", [(OpaqueArray(Const(HGPUNV), "_wglCreateAffinityDCNV_size()"), "phGpuList")]), |
| 453 | StdFunction(BOOL, "wglEnumGpusFromAffinityDCNV", [(HDC, "hAffinityDC"), (UINT, "iGpuIndex"), Out(Pointer(HGPUNV), "hGpu")]), |
| 454 | StdFunction(BOOL, "wglDeleteDCNV", [(HDC, "hdc")]), |
| 455 | |
| 456 | # WGL_AMD_gpu_association |
| 457 | StdFunction(UINT, "wglGetGPUIDsAMD", [(UINT, "maxCount"), Out(Array(UINT, "maxCount"), "ids")], sideeffects=False), |
| 458 | StdFunction(INT, "wglGetGPUInfoAMD", [(UINT, "id"), (Int, "property"), (GLenum, "dataType"), (UINT, "size"), Out(OpaqueBlob(Void, "_wglGetGPUInfoAMD_size(dataType,size)"), "data")], sideeffects=False), |
| 459 | StdFunction(UINT, "wglGetContextGPUIDAMD", [(HGLRC, "hglrc")], sideeffects=False), |
| 460 | StdFunction(HGLRC, "wglCreateAssociatedContextAMD", [(UINT, "id")]), |
| 461 | StdFunction(HGLRC, "wglCreateAssociatedContextAttribsAMD", [(UINT, "id"), (HGLRC, "hShareContext"), (OpaqueArray(Const(Int), "_wglCreateAssociatedContextAttribsAMD_size()"), "attribList")]), |
| 462 | StdFunction(BOOL, "wglDeleteAssociatedContextAMD", [(HGLRC, "hglrc")]), |
| 463 | StdFunction(BOOL, "wglMakeAssociatedContextCurrentAMD", [(HGLRC, "hglrc")]), |
| 464 | StdFunction(HGLRC, "wglGetCurrentAssociatedContextAMD", [], sideeffects=False), |
| 465 | StdFunction(VOID, "wglBlitContextFramebufferAMD", [(HGLRC, "dstCtx"), (GLint, "srcX0"), (GLint, "srcY0"), (GLint, "srcX1"), (GLint, "srcY1"), (GLint, "dstX0"), (GLint, "dstY0"), (GLint, "dstX1"), (GLint, "dstY1"), (GLbitfield, "mask"), (GLenum, "filter")]), |
| 466 | |
| 467 | # WGL_NV_video_capture |
| 468 | StdFunction(BOOL, "wglBindVideoCaptureDeviceNV", [(UINT, "uVideoSlot"), (HVIDEOINPUTDEVICENV, "hDevice")]), |
| 469 | StdFunction(UINT, "wglEnumerateVideoCaptureDevicesNV", [(HDC, "hDc"), Out(Pointer(HVIDEOINPUTDEVICENV), "phDeviceList")]), |
| 470 | StdFunction(BOOL, "wglLockVideoCaptureDeviceNV", [(HDC, "hDc"), (HVIDEOINPUTDEVICENV, "hDevice")]), |
| 471 | StdFunction(BOOL, "wglQueryVideoCaptureDeviceNV", [(HDC, "hDc"), (HVIDEOINPUTDEVICENV, "hDevice"), (Int, "iAttribute"), Out(Pointer(Int), "piValue")]), |
| 472 | StdFunction(BOOL, "wglReleaseVideoCaptureDeviceNV", [(HDC, "hDc"), (HVIDEOINPUTDEVICENV, "hDevice")]), |
| 473 | |
| 474 | # WGL_NV_copy_image |
| 475 | StdFunction(BOOL, "wglCopyImageSubDataNV", [(HGLRC, "hSrcRC"), (GLuint, "srcName"), (GLenum, "srcTarget"), (GLint, "srcLevel"), (GLint, "srcX"), (GLint, "srcY"), (GLint, "srcZ"), (HGLRC, "hDstRC"), (GLuint, "dstName"), (GLenum, "dstTarget"), (GLint, "dstLevel"), (GLint, "dstX"), (GLint, "dstY"), (GLint, "dstZ"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth")]), |
| 476 | |
| 477 | # WGL_NV_DX_interop |
| 478 | StdFunction(BOOL, "wglDXSetResourceShareHandleNV", [(OpaquePointer(Void), "dxObject"), (HANDLE, "shareHandle")]), |
| 479 | StdFunction(HANDLE, "wglDXOpenDeviceNV", [(OpaquePointer(Void), "dxDevice")]), |
| 480 | StdFunction(BOOL, "wglDXCloseDeviceNV", [(HANDLE, "hDevice")]), |
| 481 | StdFunction(HANDLE, "wglDXRegisterObjectNV", [(HANDLE, "hDevice"), (OpaquePointer(Void), "dxObject"), (GLuint, "name"), (GLenum, "type"), (GLenum, "access")]), |
| 482 | StdFunction(BOOL, "wglDXUnregisterObjectNV", [(HANDLE, "hDevice"), (HANDLE, "hObject")]), |
| 483 | StdFunction(BOOL, "wglDXObjectAccessNV", [(HANDLE, "hObject"), (GLenum, "access")]), |
| 484 | StdFunction(BOOL, "wglDXLockObjectsNV", [(HANDLE, "hDevice"), (GLint, "count"), Out(Array(HANDLE, "count"), "hObjects")]), |
| 485 | StdFunction(BOOL, "wglDXUnlockObjectsNV", [(HANDLE, "hDevice"), (GLint, "count"), Out(Array(HANDLE, "count"), "hObjects")]), |
| 486 | |
José Fonseca | c0d8c5c | 2014-05-30 16:23:03 +0100 | [diff] [blame] | 487 | # WGL_NV_delay_before_swap |
| 488 | StdFunction(BOOL, "wglDelayBeforeSwapNV", [(HDC, "hDC"), (GLfloat, "seconds")]), |
| 489 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 490 | # must be last |
| 491 | StdFunction(PROC, "wglGetProcAddress", [(LPCSTR, "lpszProc")]), |
| 492 | ]) |