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 | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 32 | |
| 33 | |
| 34 | wglapi = API("WGL") |
| 35 | wglapi.add_functions(glapi.functions) |
| 36 | |
| 37 | |
| 38 | HGLRC = Alias("HGLRC", HANDLE) |
| 39 | PROC = Opaque("PROC") |
| 40 | |
| 41 | PFD = Flags(DWORD, [ |
| 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 | f044283 | 2011-03-09 14:29:26 +0000 | [diff] [blame] | 56 | "PFD_SUPPORT_COMPOSITION", |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 57 | "PFD_DEPTH_DONTCARE", |
| 58 | "PFD_DOUBLEBUFFER_DONTCARE", |
| 59 | "PFD_STEREO_DONTCARE", |
| 60 | ]) |
| 61 | |
| 62 | PIXELFORMATDESCRIPTOR = Struct("PIXELFORMATDESCRIPTOR", [ |
| 63 | (WORD, "nSize"), |
| 64 | (WORD, "nVersion"), |
| 65 | (PFD, "dwFlags"), |
| 66 | (BYTE, "iPixelType"), |
| 67 | (BYTE, "cColorBits"), |
| 68 | (BYTE, "cRedBits"), |
| 69 | (BYTE, "cRedShift"), |
| 70 | (BYTE, "cGreenBits"), |
| 71 | (BYTE, "cGreenShift"), |
| 72 | (BYTE, "cBlueBits"), |
| 73 | (BYTE, "cBlueShift"), |
| 74 | (BYTE, "cAlphaBits"), |
| 75 | (BYTE, "cAlphaShift"), |
| 76 | (BYTE, "cAccumBits"), |
| 77 | (BYTE, "cAccumRedBits"), |
| 78 | (BYTE, "cAccumGreenBits"), |
| 79 | (BYTE, "cAccumBlueBits"), |
| 80 | (BYTE, "cAccumAlphaBits"), |
| 81 | (BYTE, "cDepthBits"), |
| 82 | (BYTE, "cStencilBits"), |
| 83 | (BYTE, "cAuxBuffers"), |
| 84 | (BYTE, "iLayerType"), |
| 85 | (BYTE, "bReserved"), |
| 86 | (DWORD, "dwLayerMask"), |
| 87 | (DWORD, "dwVisibleMask"), |
| 88 | (DWORD, "dwDamageMask"), |
| 89 | ]) |
| 90 | |
| 91 | POINTFLOAT = Struct("POINTFLOAT", [ |
| 92 | (FLOAT, "x"), |
| 93 | (FLOAT, "y"), |
| 94 | ]) |
| 95 | |
| 96 | GLYPHMETRICSFLOAT = Struct("GLYPHMETRICSFLOAT", [ |
| 97 | (FLOAT, "gmfBlackBoxX"), |
| 98 | (FLOAT, "gmfBlackBoxY"), |
| 99 | (POINTFLOAT, "gmfptGlyphOrigin"), |
| 100 | (FLOAT, "gmfCellIncX"), |
| 101 | (FLOAT, "gmfCellIncY"), |
| 102 | ]) |
| 103 | LPGLYPHMETRICSFLOAT = Pointer(GLYPHMETRICSFLOAT) |
| 104 | |
| 105 | COLORREF = Alias("COLORREF", DWORD) |
| 106 | |
| 107 | |
| 108 | LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [ |
| 109 | (WORD, "nSize"), |
| 110 | (WORD, "nVersion"), |
| 111 | (DWORD, "dwFlags"), |
| 112 | (BYTE, "iPixelType"), |
| 113 | (BYTE, "cColorBits"), |
| 114 | (BYTE, "cRedBits"), |
| 115 | (BYTE, "cRedShift"), |
| 116 | (BYTE, "cGreenBits"), |
| 117 | (BYTE, "cGreenShift"), |
| 118 | (BYTE, "cBlueBits"), |
| 119 | (BYTE, "cBlueShift"), |
| 120 | (BYTE, "cAlphaBits"), |
| 121 | (BYTE, "cAlphaShift"), |
| 122 | (BYTE, "cAccumBits"), |
| 123 | (BYTE, "cAccumRedBits"), |
| 124 | (BYTE, "cAccumGreenBits"), |
| 125 | (BYTE, "cAccumBlueBits"), |
| 126 | (BYTE, "cAccumAlphaBits"), |
| 127 | (BYTE, "cDepthBits"), |
| 128 | (BYTE, "cStencilBits"), |
| 129 | (BYTE, "cAuxBuffers"), |
| 130 | (BYTE, "iLayerPlane"), |
| 131 | (BYTE, "bReserved"), |
| 132 | (COLORREF, "crTransparent"), |
| 133 | ]) |
| 134 | LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR) |
| 135 | |
| 136 | WGLSWAP = Struct("WGLSWAP", [ |
José Fonseca | 1982897 | 2010-11-29 20:34:32 +0000 | [diff] [blame] | 137 | (HDC, "hdc"), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 138 | (UINT, "uiFlags"), |
| 139 | ]) |
| 140 | |
| 141 | attribute = FakeEnum(Int, [ |
| 142 | "WGL_NUMBER_PIXEL_FORMATS_EXT", |
| 143 | "WGL_DRAW_TO_WINDOW_EXT", |
| 144 | "WGL_DRAW_TO_BITMAP_EXT", |
| 145 | "WGL_ACCELERATION_EXT", |
| 146 | "WGL_NEED_PALETTE_EXT", |
| 147 | "WGL_NEED_SYSTEM_PALETTE_EXT", |
| 148 | "WGL_SWAP_LAYER_BUFFERS_EXT", |
| 149 | "WGL_SWAP_METHOD_EXT", |
| 150 | "WGL_NUMBER_OVERLAYS_EXT", |
| 151 | "WGL_NUMBER_UNDERLAYS_EXT", |
| 152 | "WGL_TRANSPARENT_EXT", |
| 153 | "WGL_TRANSPARENT_VALUE_EXT", |
| 154 | "WGL_SHARE_DEPTH_EXT", |
| 155 | "WGL_SHARE_STENCIL_EXT", |
| 156 | "WGL_SHARE_ACCUM_EXT", |
| 157 | "WGL_SUPPORT_GDI_EXT", |
| 158 | "WGL_SUPPORT_OPENGL_EXT", |
| 159 | "WGL_DOUBLE_BUFFER_EXT", |
| 160 | "WGL_STEREO_EXT", |
| 161 | "WGL_PIXEL_TYPE_EXT", |
| 162 | "WGL_COLOR_BITS_EXT", |
| 163 | "WGL_RED_BITS_EXT", |
| 164 | "WGL_RED_SHIFT_EXT", |
| 165 | "WGL_GREEN_BITS_EXT", |
| 166 | "WGL_GREEN_SHIFT_EXT", |
| 167 | "WGL_BLUE_BITS_EXT", |
| 168 | "WGL_BLUE_SHIFT_EXT", |
| 169 | "WGL_ALPHA_BITS_EXT", |
| 170 | "WGL_ALPHA_SHIFT_EXT", |
| 171 | "WGL_ACCUM_BITS_EXT", |
| 172 | "WGL_ACCUM_RED_BITS_EXT", |
| 173 | "WGL_ACCUM_GREEN_BITS_EXT", |
| 174 | "WGL_ACCUM_BLUE_BITS_EXT", |
| 175 | "WGL_ACCUM_ALPHA_BITS_EXT", |
| 176 | "WGL_DEPTH_BITS_EXT", |
| 177 | "WGL_STENCIL_BITS_EXT", |
| 178 | "WGL_AUX_BUFFERS_EXT", |
| 179 | "WGL_NO_ACCELERATION_EXT", |
| 180 | "WGL_GENERIC_ACCELERATION_EXT", |
| 181 | "WGL_FULL_ACCELERATION_EXT", |
| 182 | "WGL_SWAP_EXCHANGE_EXT", |
| 183 | "WGL_SWAP_COPY_EXT", |
| 184 | "WGL_SWAP_UNDEFINED_EXT", |
| 185 | "WGL_TYPE_RGBA_EXT", |
| 186 | "WGL_TYPE_COLORINDEX_EXT", |
| 187 | ]) |
| 188 | |
| 189 | HPBUFFERARB = Alias("HPBUFFERARB", HANDLE) |
| 190 | |
| 191 | |
| 192 | wglapi.add_functions([ |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 193 | # WGL |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 194 | StdFunction(HGLRC, "wglCreateContext", [(HDC, "hdc")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 195 | StdFunction(BOOL, "wglDeleteContext", [(HGLRC, "hglrc")]), |
| 196 | StdFunction(HGLRC, "wglGetCurrentContext", [], sideeffects=False), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 197 | StdFunction(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]), |
| 198 | StdFunction(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 199 | StdFunction(Int, "wglChoosePixelFormat", [(HDC, "hdc"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), |
| 200 | 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] | 201 | StdFunction(HDC, "wglGetCurrentDC", [], sideeffects=False), |
| 202 | StdFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")], sideeffects=False), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 203 | StdFunction(Int, "wglGetPixelFormat", [(HDC, "hdc")], sideeffects=False), |
| 204 | StdFunction(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 205 | StdFunction(BOOL, "wglSwapBuffers", [(HDC, "hdc")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 206 | StdFunction(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 207 | StdFunction(HGLRC, "wglCreateLayerContext", [(HDC, "hdc"), (Int, "iLayerPlane")]), |
| 208 | StdFunction(BOOL, "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), Out(Pointer(LAYERPLANEDESCRIPTOR), "plpd")]), |
| 209 | StdFunction(Int, "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Array(Const(COLORREF), "cEntries"), "pcr")]), |
| 210 | StdFunction(Int, "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), Out(Array(COLORREF, "cEntries"), "pcr")], sideeffects=False), |
| 211 | StdFunction(BOOL, "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]), |
| 212 | StdFunction(BOOL, "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 213 | StdFunction(BOOL, "wglUseFontBitmapsA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]), |
| 214 | StdFunction(BOOL, "wglUseFontBitmapsW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]), |
José Fonseca | fe3791e | 2010-11-25 11:28:52 +0000 | [diff] [blame] | 215 | StdFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Array(Const(WGLSWAP), "n"), "ps")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 216 | StdFunction(BOOL, "wglUseFontOutlinesA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]), |
| 217 | StdFunction(BOOL, "wglUseFontOutlinesW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 218 | |
| 219 | # WGL_ARB_buffer_region |
| 220 | StdFunction(HANDLE, "wglCreateBufferRegionARB", [(HDC, "hDC"), (Int, "iLayerPlane"), (UINT, "uType")]), |
| 221 | StdFunction(VOID, "wglDeleteBufferRegionARB", [(HANDLE, "hRegion")]), |
| 222 | StdFunction(BOOL, "wglSaveBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]), |
| 223 | StdFunction(BOOL, "wglRestoreBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height"), (Int, "xSrc"), (Int, "ySrc")]), |
| 224 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 225 | # WGL_ARB_extensions_string |
José Fonseca | 5f81c3a | 2010-11-24 08:42:22 +0000 | [diff] [blame] | 226 | StdFunction(Const(CString), "wglGetExtensionsStringARB", [(HDC, "hdc")], sideeffects=False), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 227 | |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 228 | # WGL_ARB_pixel_format |
| 229 | StdFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False), |
| 230 | StdFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False), |
José Fonseca | 35eba8b | 2011-03-09 14:30:57 +0000 | [diff] [blame^] | 231 | StdFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Const(Array(Int, "__AttribList_size(piAttribIList)")), "piAttribIList"), (Const(Array(FLOAT, "__AttribList_size(pfAttribFList)")), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "(*nNumFormats)"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]), |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 232 | |
José Fonseca | 01dc379 | 2010-11-24 16:50:31 +0000 | [diff] [blame] | 233 | # WGL_ARB_make_current_read |
| 234 | StdFunction(BOOL, "wglMakeContextCurrentARB", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]), |
| 235 | StdFunction(HDC, "wglGetCurrentReadDCARB", [], sideeffects=False), |
| 236 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 237 | # WGL_ARB_pbuffer |
José Fonseca | 35eba8b | 2011-03-09 14:30:57 +0000 | [diff] [blame^] | 238 | StdFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Const(Array(Int, "__AttribList_size(piAttribList)")), "piAttribList")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 239 | StdFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")], sideeffects=False), |
| 240 | StdFunction(Int, "wglReleasePbufferDCARB", [(HPBUFFERARB, "hPbuffer"), (HDC, "hDC")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 241 | StdFunction(BOOL, "wglDestroyPbufferARB", [(HPBUFFERARB, "hPbuffer")]), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 242 | StdFunction(BOOL, "wglQueryPbufferARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iAttribute"), Out(Pointer(Int), "piValue")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 243 | |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 244 | # WGL_ARB_render_texture |
| 245 | StdFunction(BOOL, "wglBindTexImageARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iBuffer")]), |
| 246 | StdFunction(BOOL, "wglReleaseTexImageARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iBuffer")]), |
José Fonseca | 35eba8b | 2011-03-09 14:30:57 +0000 | [diff] [blame^] | 247 | StdFunction(BOOL, "wglSetPbufferAttribARB", [(HPBUFFERARB, "hPbuffer"), (Const(Array(Int, "__AttribList_size(piAttribList)")), "piAttribList")]), |
José Fonseca | c36f148 | 2010-11-24 16:56:54 +0000 | [diff] [blame] | 248 | |
| 249 | # WGL_ARB_create_context |
José Fonseca | 35eba8b | 2011-03-09 14:30:57 +0000 | [diff] [blame^] | 250 | StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (Const(Array(Int, "__AttribList_size(attribList)")), "attribList")]), |
José Fonseca | a9e80d0 | 2010-11-24 15:56:47 +0000 | [diff] [blame] | 251 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 252 | # WGL_EXT_extensions_string |
José Fonseca | 5f81c3a | 2010-11-24 08:42:22 +0000 | [diff] [blame] | 253 | StdFunction(Const(CString), "wglGetExtensionsStringEXT", [], sideeffects=False), |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 254 | |
José Fonseca | 01dc379 | 2010-11-24 16:50:31 +0000 | [diff] [blame] | 255 | # WGL_EXT_make_current_read |
| 256 | StdFunction(BOOL, "wglMakeContextCurrentEXT", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]), |
| 257 | StdFunction(HDC, "wglGetCurrentReadDCEXT", [], sideeffects=False), |
| 258 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 259 | # WGL_EXT_pixel_format |
| 260 | StdFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False), |
| 261 | StdFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(attribute, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False), |
| 262 | StdFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Pointer(Const(Int)), "piAttribIList"), (Pointer(Const(FLOAT)), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "nMaxFormats"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]), |
| 263 | |
José Fonseca | 01dc379 | 2010-11-24 16:50:31 +0000 | [diff] [blame] | 264 | # WGL_EXT_swap_control |
| 265 | StdFunction(BOOL, "wglSwapIntervalEXT", [(Int, "interval")]), |
| 266 | StdFunction(Int, "wglGetSwapIntervalEXT", [], sideeffects=False), |
| 267 | |
José Fonseca | 7681986 | 2010-11-25 19:06:00 +0000 | [diff] [blame] | 268 | # WGL_NV_vertex_array_range |
| 269 | StdFunction(OpaquePointer(Void), "wglAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]), |
| 270 | StdFunction(Void, "wglFreeMemoryNV", [(OpaquePointer(Void), "pointer")]), |
| 271 | |
José Fonseca | 4441baf | 2010-11-25 19:55:27 +0000 | [diff] [blame] | 272 | # GL_WIN_swap_hint |
| 273 | StdFunction(Void, "glAddSwapHintRectWIN", [(GLint, "x"), (GLint, "y"), (GLsizei, "width"), (GLsizei, "height")]), |
| 274 | |
José Fonseca | 8fbdd3a | 2010-11-23 20:55:07 +0000 | [diff] [blame] | 275 | # must be last |
| 276 | StdFunction(PROC, "wglGetProcAddress", [(LPCSTR, "lpszProc")]), |
| 277 | ]) |