blob: 146a4031a17c26a759875cea3a8a2db81baa08b5 [file] [log] [blame]
José Fonseca8fbdd3a2010-11-23 20:55:07 +00001##########################################################################
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é Fonseca4a826ed2010-11-30 16:58:22 +000027"""WGL API description"""
28
29
José Fonseca8fbdd3a2010-11-23 20:55:07 +000030from glapi import *
José Fonsecaf20c1262010-11-25 11:39:57 +000031from winapi import *
José Fonseca4bfa5ab2011-03-09 15:47:55 +000032from wglenum import *
José Fonseca8fbdd3a2010-11-23 20:55:07 +000033
34
José Fonseca81301932012-11-11 00:10:20 +000035wglapi = Module("WGL")
José Fonseca8fbdd3a2010-11-23 20:55:07 +000036
37
38HGLRC = Alias("HGLRC", HANDLE)
39PROC = Opaque("PROC")
40
41PFD = 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é Fonsecaf0442832011-03-09 14:29:26 +000056 "PFD_SUPPORT_COMPOSITION",
José Fonseca8fbdd3a2010-11-23 20:55:07 +000057 "PFD_DEPTH_DONTCARE",
58 "PFD_DOUBLEBUFFER_DONTCARE",
59 "PFD_STEREO_DONTCARE",
60])
61
62PIXELFORMATDESCRIPTOR = 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
91POINTFLOAT = Struct("POINTFLOAT", [
92 (FLOAT, "x"),
93 (FLOAT, "y"),
94])
95
96GLYPHMETRICSFLOAT = Struct("GLYPHMETRICSFLOAT", [
97 (FLOAT, "gmfBlackBoxX"),
98 (FLOAT, "gmfBlackBoxY"),
99 (POINTFLOAT, "gmfptGlyphOrigin"),
100 (FLOAT, "gmfCellIncX"),
101 (FLOAT, "gmfCellIncY"),
102])
103LPGLYPHMETRICSFLOAT = Pointer(GLYPHMETRICSFLOAT)
104
105COLORREF = Alias("COLORREF", DWORD)
106
107
108LAYERPLANEDESCRIPTOR = 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])
134LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR)
135
136WGLSWAP = Struct("WGLSWAP", [
José Fonseca19828972010-11-29 20:34:32 +0000137 (HDC, "hdc"),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000138 (UINT, "uiFlags"),
139])
140
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000141HPBUFFERARB = Alias("HPBUFFERARB", HANDLE)
José Fonsecae99d8cb2013-07-08 19:40:50 +0100142HPBUFFEREXT = Alias("HPBUFFEREXT", HANDLE)
143HPVIDEODEV = Alias("HPVIDEODEV", HANDLE)
144HVIDEOOUTPUTDEVICENV = Alias("HVIDEOOUTPUTDEVICENV", HANDLE)
145HVIDEOINPUTDEVICENV = Alias("HVIDEOINPUTDEVICENV", HANDLE)
146HGPUNV = Alias("HGPUNV", HANDLE)
147
148GPU_DEVICE = Struct("GPU_DEVICE", [
149 (DWORD, "cb"),
150 (CString, "DeviceName"),
151 (CString, "DeviceString"),
152 (DWORD, "Flags"),
153 (RECT, "rcVirtualScreen"),
154])
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000155
156
José Fonseca54f304a2012-01-14 19:33:08 +0000157wglapi.addFunctions([
José Fonsecaa9e80d02010-11-24 15:56:47 +0000158 # WGL
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000159 StdFunction(HGLRC, "wglCreateContext", [(HDC, "hdc")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000160 StdFunction(BOOL, "wglDeleteContext", [(HGLRC, "hglrc")]),
161 StdFunction(HGLRC, "wglGetCurrentContext", [], sideeffects=False),
José Fonsecafe3791e2010-11-25 11:28:52 +0000162 StdFunction(BOOL, "wglMakeCurrent", [(HDC, "hdc"), (HGLRC, "hglrc")]),
163 StdFunction(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000164 StdFunction(Int, "wglChoosePixelFormat", [(HDC, "hdc"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]),
165 StdFunction(Int, "wglDescribePixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (UINT, "nBytes"), Out(Pointer(PIXELFORMATDESCRIPTOR), "ppfd")]),
José Fonsecafe3791e2010-11-25 11:28:52 +0000166 StdFunction(HDC, "wglGetCurrentDC", [], sideeffects=False),
167 StdFunction(PROC, "wglGetDefaultProcAddress", [(LPCSTR, "lpszProc")], sideeffects=False),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000168 StdFunction(Int, "wglGetPixelFormat", [(HDC, "hdc")], sideeffects=False),
169 StdFunction(BOOL, "wglSetPixelFormat", [(HDC, "hdc"), (Int, "iPixelFormat"), (Pointer(Const(PIXELFORMATDESCRIPTOR)), "ppfd")]),
José Fonsecafe3791e2010-11-25 11:28:52 +0000170 StdFunction(BOOL, "wglSwapBuffers", [(HDC, "hdc")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000171 StdFunction(BOOL, "wglShareLists", [(HGLRC, "hglrc1"), (HGLRC, "hglrc2")]),
José Fonsecafe3791e2010-11-25 11:28:52 +0000172 StdFunction(HGLRC, "wglCreateLayerContext", [(HDC, "hdc"), (Int, "iLayerPlane")]),
173 StdFunction(BOOL, "wglDescribeLayerPlane", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nBytes"), Out(Pointer(LAYERPLANEDESCRIPTOR), "plpd")]),
174 StdFunction(Int, "wglSetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (Array(Const(COLORREF), "cEntries"), "pcr")]),
175 StdFunction(Int, "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), Out(Array(COLORREF, "cEntries"), "pcr")], sideeffects=False),
176 StdFunction(BOOL, "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]),
177 StdFunction(BOOL, "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000178 StdFunction(BOOL, "wglUseFontBitmapsA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]),
179 StdFunction(BOOL, "wglUseFontBitmapsW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase")]),
José Fonsecafe3791e2010-11-25 11:28:52 +0000180 StdFunction(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Array(Const(WGLSWAP), "n"), "ps")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000181 StdFunction(BOOL, "wglUseFontOutlinesA", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]),
182 StdFunction(BOOL, "wglUseFontOutlinesW", [(HDC, "hdc"), (DWORD, "first"), (DWORD, "count"), (DWORD, "listBase"), (FLOAT, "deviation"), (FLOAT, "extrusion"), (Int, "format"), (LPGLYPHMETRICSFLOAT, "lpgmf")]),
José Fonsecaa9e80d02010-11-24 15:56:47 +0000183
184 # WGL_ARB_buffer_region
185 StdFunction(HANDLE, "wglCreateBufferRegionARB", [(HDC, "hDC"), (Int, "iLayerPlane"), (UINT, "uType")]),
186 StdFunction(VOID, "wglDeleteBufferRegionARB", [(HANDLE, "hRegion")]),
187 StdFunction(BOOL, "wglSaveBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]),
188 StdFunction(BOOL, "wglRestoreBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height"), (Int, "xSrc"), (Int, "ySrc")]),
189
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000190 # WGL_ARB_extensions_string
José Fonsecabcfc81b2012-08-07 21:07:22 +0100191 StdFunction(ConstCString, "wglGetExtensionsStringARB", [(HDC, "hdc")], sideeffects=False),
José Fonsecaa9e80d02010-11-24 15:56:47 +0000192
José Fonsecac36f1482010-11-24 16:56:54 +0000193 # WGL_ARB_pixel_format
José Fonseca4bfa5ab2011-03-09 15:47:55 +0000194 StdFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
195 StdFunction(BOOL, "wglGetPixelFormatAttribfvARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False),
José Fonseca632a78d2012-04-19 07:18:59 +0100196 StdFunction(BOOL, "wglChoosePixelFormatARB", [(HDC, "hdc"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribIList)"), "piAttribIList"), (Array(Const(FLOAT), "_AttribPairList_size(pfAttribFList)"), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "(*nNumFormats)"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
José Fonsecac36f1482010-11-24 16:56:54 +0000197
José Fonseca01dc3792010-11-24 16:50:31 +0000198 # WGL_ARB_make_current_read
199 StdFunction(BOOL, "wglMakeContextCurrentARB", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]),
200 StdFunction(HDC, "wglGetCurrentReadDCARB", [], sideeffects=False),
201
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000202 # WGL_ARB_pbuffer
José Fonseca632a78d2012-04-19 07:18:59 +0100203 StdFunction(HPBUFFERARB, "wglCreatePbufferARB", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribList)"), "piAttribList")]),
José Fonseca62617d12011-05-05 21:12:54 +0100204 StdFunction(HDC, "wglGetPbufferDCARB", [(HPBUFFERARB, "hPbuffer")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000205 StdFunction(Int, "wglReleasePbufferDCARB", [(HPBUFFERARB, "hPbuffer"), (HDC, "hDC")]),
José Fonsecaa9e80d02010-11-24 15:56:47 +0000206 StdFunction(BOOL, "wglDestroyPbufferARB", [(HPBUFFERARB, "hPbuffer")]),
José Fonseca62617d12011-05-05 21:12:54 +0100207 StdFunction(BOOL, "wglQueryPbufferARB", [(HPBUFFERARB, "hPbuffer"), (WGLenum, "iAttribute"), Out(Pointer(Int), "piValue")], sideeffects=False),
José Fonsecaa9e80d02010-11-24 15:56:47 +0000208
José Fonsecac36f1482010-11-24 16:56:54 +0000209 # WGL_ARB_render_texture
210 StdFunction(BOOL, "wglBindTexImageARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iBuffer")]),
211 StdFunction(BOOL, "wglReleaseTexImageARB", [(HPBUFFERARB, "hPbuffer"), (Int, "iBuffer")]),
José Fonseca632a78d2012-04-19 07:18:59 +0100212 StdFunction(BOOL, "wglSetPbufferAttribARB", [(HPBUFFERARB, "hPbuffer"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribList)"), "piAttribList")]),
José Fonsecac36f1482010-11-24 16:56:54 +0000213
214 # WGL_ARB_create_context
José Fonseca632a78d2012-04-19 07:18:59 +0100215 StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (Array(Const(WGLenum), "_AttribPairList_size(attribList)"), "attribList")]),
José Fonsecaa9e80d02010-11-24 15:56:47 +0000216
José Fonsecae99d8cb2013-07-08 19:40:50 +0100217 # WGL_EXT_display_color_table
218 StdFunction(GLboolean, "wglCreateDisplayColorTableEXT", [(GLushort, "id")]),
219 StdFunction(GLboolean, "wglLoadDisplayColorTableEXT", [(Array(Const(GLushort), "length"), "table"), (GLuint, "length")]),
220 StdFunction(GLboolean, "wglBindDisplayColorTableEXT", [(GLushort, "id")]),
221 StdFunction(VOID, "wglDestroyDisplayColorTableEXT", [(GLushort, "id")]),
222
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000223 # WGL_EXT_extensions_string
José Fonsecabcfc81b2012-08-07 21:07:22 +0100224 StdFunction(ConstCString, "wglGetExtensionsStringEXT", [], sideeffects=False),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000225
José Fonseca01dc3792010-11-24 16:50:31 +0000226 # WGL_EXT_make_current_read
227 StdFunction(BOOL, "wglMakeContextCurrentEXT", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]),
228 StdFunction(HDC, "wglGetCurrentReadDCEXT", [], sideeffects=False),
229
José Fonsecae99d8cb2013-07-08 19:40:50 +0100230 # WGL_EXT_pbuffer
231 StdFunction(HPBUFFEREXT, "wglCreatePbufferEXT", [(HDC, "hDC"), (Int, "iPixelFormat"), (Int, "iWidth"), (Int, "iHeight"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribList)"), "piAttribList")]),
232 StdFunction(HDC, "wglGetPbufferDCEXT", [(HPBUFFEREXT, "hPbuffer")], sideeffects=False),
233 StdFunction(Int, "wglReleasePbufferDCEXT", [(HPBUFFEREXT, "hPbuffer"), (HDC, "hDC")]),
234 StdFunction(BOOL, "wglDestroyPbufferEXT", [(HPBUFFEREXT, "hPbuffer")]),
235 StdFunction(BOOL, "wglQueryPbufferEXT", [(HPBUFFEREXT, "hPbuffer"), (WGLenum, "iAttribute"), Out(Pointer(Int), "piValue")], sideeffects=False),
236
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000237 # WGL_EXT_pixel_format
José Fonseca4bfa5ab2011-03-09 15:47:55 +0000238 StdFunction(BOOL, "wglGetPixelFormatAttribivEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
239 StdFunction(BOOL, "wglGetPixelFormatAttribfvEXT", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(FLOAT, "nAttributes"), "pfValues")], sideeffects=False),
José Fonseca632a78d2012-04-19 07:18:59 +0100240 StdFunction(BOOL, "wglChoosePixelFormatEXT", [(HDC, "hdc"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribIList)"), "piAttribIList"), (Array(Const(FLOAT), "_AttribPairList_size(pfAttribFList)"), "pfAttribFList"), (UINT, "nMaxFormats"), Out(Array(Int, "*nNumFormats"), "piFormats"), Out(Pointer(UINT), "nNumFormats")]),
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000241
José Fonseca01dc3792010-11-24 16:50:31 +0000242 # WGL_EXT_swap_control
243 StdFunction(BOOL, "wglSwapIntervalEXT", [(Int, "interval")]),
244 StdFunction(Int, "wglGetSwapIntervalEXT", [], sideeffects=False),
245
José Fonseca76819862010-11-25 19:06:00 +0000246 # WGL_NV_vertex_array_range
247 StdFunction(OpaquePointer(Void), "wglAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]),
248 StdFunction(Void, "wglFreeMemoryNV", [(OpaquePointer(Void), "pointer")]),
249
José Fonsecae99d8cb2013-07-08 19:40:50 +0100250 # WGL_OML_sync_control
251 StdFunction(BOOL, "wglGetSyncValuesOML", [(HDC, "hdc"), Out(Pointer(INT64), "ust"), Out(Pointer(INT64), "msc"), Out(Pointer(INT64), "sbc")], sideeffects=False),
252 StdFunction(BOOL, "wglGetMscRateOML", [(HDC, "hdc"), Out(Pointer(INT32), "numerator"), Out(Pointer(INT32), "denominator")], sideeffects=False),
253 StdFunction(INT64, "wglSwapBuffersMscOML", [(HDC, "hdc"), (INT64, "target_msc"), (INT64, "divisor"), (INT64, "remainder")]),
254 StdFunction(INT64, "wglSwapLayerBuffersMscOML", [(HDC, "hdc"), (Int, "fuPlanes"), (INT64, "target_msc"), (INT64, "divisor"), (INT64, "remainder")]),
255 StdFunction(BOOL, "wglWaitForMscOML", [(HDC, "hdc"), (INT64, "target_msc"), (INT64, "divisor"), (INT64, "remainder"), Out(Pointer(INT64), "ust"), Out(Pointer(INT64), "msc"), Out(Pointer(INT64), "sbc")]),
256 StdFunction(BOOL, "wglWaitForSbcOML", [(HDC, "hdc"), (INT64, "target_sbc"), Out(Pointer(INT64), "ust"), Out(Pointer(INT64), "msc"), Out(Pointer(INT64), "sbc")]),
257
258 # WGL_I3D_digital_video_control
259 StdFunction(BOOL, "wglGetDigitalVideoParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), Out(OpaqueArray(Int, "_wglGetDigitalVideoParametersI3D_size(iAttribute)"), "piValue")], sideeffects=False),
260 StdFunction(BOOL, "wglSetDigitalVideoParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), (OpaqueArray(Const(Int), "_wglSetDigitalVideoParametersI3D_size(iAttribute)"), "piValue")]),
261
262 # WGL_I3D_gamma
263 StdFunction(BOOL, "wglGetGammaTableParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), Out(OpaqueArray(Int, "_wglGetGammaTableParametersI3D_size(iAttribute)"), "piValue")], sideeffects=False),
264 StdFunction(BOOL, "wglSetGammaTableParametersI3D", [(HDC, "hDC"), (Int, "iAttribute"), (OpaqueArray(Const(Int), "_wglSetGammaTableParametersI3D_size(iAttribute)"), "piValue")]),
265 StdFunction(BOOL, "wglGetGammaTableI3D", [(HDC, "hDC"), (Int, "iEntries"), Out(Array(USHORT, "iEntries"), "puRed"), Out(Array(USHORT, "iEntries"), "puGreen"), Out(Array(USHORT, "iEntries"), "puBlue")], sideeffects=False),
266 StdFunction(BOOL, "wglSetGammaTableI3D", [(HDC, "hDC"), (Int, "iEntries"), (Array(Const(USHORT), "iEntries"), "puRed"), (Array(Const(USHORT), "iEntries"), "puGreen"), (Array(Const(USHORT), "iEntries"), "puBlue")]),
267
268 # WGL_I3D_genlock
269 StdFunction(BOOL, "wglEnableGenlockI3D", [(HDC, "hDC")]),
270 StdFunction(BOOL, "wglDisableGenlockI3D", [(HDC, "hDC")]),
271 StdFunction(BOOL, "wglIsEnabledGenlockI3D", [(HDC, "hDC"), Out(Pointer(BOOL), "pFlag")], sideeffects=False),
272 StdFunction(BOOL, "wglGenlockSourceI3D", [(HDC, "hDC"), (UINT, "uSource")]),
273 StdFunction(BOOL, "wglGetGenlockSourceI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uSource")], sideeffects=False),
274 StdFunction(BOOL, "wglGenlockSourceEdgeI3D", [(HDC, "hDC"), (UINT, "uEdge")]),
275 StdFunction(BOOL, "wglGetGenlockSourceEdgeI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uEdge")], sideeffects=False),
276 StdFunction(BOOL, "wglGenlockSampleRateI3D", [(HDC, "hDC"), (UINT, "uRate")]),
277 StdFunction(BOOL, "wglGetGenlockSampleRateI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uRate")], sideeffects=False),
278 StdFunction(BOOL, "wglGenlockSourceDelayI3D", [(HDC, "hDC"), (UINT, "uDelay")]),
279 StdFunction(BOOL, "wglGetGenlockSourceDelayI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uDelay")], sideeffects=False),
280 StdFunction(BOOL, "wglQueryGenlockMaxSourceDelayI3D", [(HDC, "hDC"), Out(Pointer(UINT), "uMaxLineDelay"), Out(Pointer(UINT), "uMaxPixelDelay")]),
281
282 # WGL_I3D_image_buffer
283 StdFunction(LPVOID, "wglCreateImageBufferI3D", [(HDC, "hDC"), (DWORD, "dwSize"), (UINT, "uFlags")]),
284 StdFunction(BOOL, "wglDestroyImageBufferI3D", [(HDC, "hDC"), (LPVOID, "pAddress")]),
285 StdFunction(BOOL, "wglAssociateImageBufferEventsI3D", [(HDC, "hDC"), (Array(Const(HANDLE), "count"), "pEvent"), (Array(Const(LPVOID), "count"), "pAddress"), (Array(Const(DWORD), "count"), "pSize"), (UINT, "count")]),
286 StdFunction(BOOL, "wglReleaseImageBufferEventsI3D", [(HDC, "hDC"), (Array(Const(LPVOID), "count"), "pAddress"), (UINT, "count")]),
287
288 # WGL_I3D_swap_frame_lock
289 StdFunction(BOOL, "wglEnableFrameLockI3D", []),
290 StdFunction(BOOL, "wglDisableFrameLockI3D", []),
291 StdFunction(BOOL, "wglIsEnabledFrameLockI3D", [Out(Pointer(BOOL), "pFlag")], sideeffects=False),
292 StdFunction(BOOL, "wglQueryFrameLockMasterI3D", [Out(Pointer(BOOL), "pFlag")]),
293
294 # WGL_I3D_swap_frame_usage
295 StdFunction(BOOL, "wglGetFrameUsageI3D", [Out(Pointer(Float), "pUsage")], sideeffects=False),
296 StdFunction(BOOL, "wglBeginFrameTrackingI3D", []),
297 StdFunction(BOOL, "wglEndFrameTrackingI3D", []),
298 StdFunction(BOOL, "wglQueryFrameTrackingI3D", [Out(Pointer(DWORD), "pFrameCount"), Out(Pointer(DWORD), "pMissedFrames"), Out(Pointer(Float), "pLastMissedUsage")]),
299
300 # WGL_3DL_stereo_control
301 StdFunction(BOOL, "wglSetStereoEmitterState3DL", [(HDC, "hDC"), (UINT, "uState")]),
302
303 # WGL_NV_present_video
304 StdFunction(Int, "wglEnumerateVideoDevicesNV", [(HDC, "hDC"), Out(OpaquePointer(HVIDEOOUTPUTDEVICENV), "phDeviceList")]),
305 StdFunction(BOOL, "wglBindVideoDeviceNV", [(HDC, "hDC"), (UInt, "uVideoSlot"), (HVIDEOOUTPUTDEVICENV, "hVideoDevice"), (OpaqueArray(Const(Int), "_wglBindVideoDeviceNV_size()"), "piAttribList")]),
306 StdFunction(BOOL, "wglQueryCurrentContextNV", [(Int, "iAttribute"), Out(OpaqueArray(Int, "_wglQueryCurrentContextNV_size()"), "piValue")]),
307
308 # WGL_NV_video_output
309 StdFunction(BOOL, "wglGetVideoDeviceNV", [(HDC, "hDC"), (Int, "numDevices"), Out(Pointer(HPVIDEODEV), "hVideoDevice")], sideeffects=False),
310 StdFunction(BOOL, "wglReleaseVideoDeviceNV", [(HPVIDEODEV, "hVideoDevice")]),
311 StdFunction(BOOL, "wglBindVideoImageNV", [(HPVIDEODEV, "hVideoDevice"), (HPBUFFERARB, "hPbuffer"), (Int, "iVideoBuffer")]),
312 StdFunction(BOOL, "wglReleaseVideoImageNV", [(HPBUFFERARB, "hPbuffer"), (Int, "iVideoBuffer")]),
313 StdFunction(BOOL, "wglSendPbufferToVideoNV", [(HPBUFFERARB, "hPbuffer"), (Int, "iBufferType"), Out(Pointer(ULong), "pulCounterPbuffer"), (BOOL, "bBlock")]),
314 StdFunction(BOOL, "wglGetVideoInfoNV", [(HPVIDEODEV, "hpVideoDevice"), Out(Pointer(ULong), "pulCounterOutputPbuffer"), Out(Pointer(ULong), "pulCounterOutputVideo")], sideeffects=False),
315
316 # WGL_NV_swap_group
317 StdFunction(BOOL, "wglJoinSwapGroupNV", [(HDC, "hDC"), (GLuint, "group")]),
318 StdFunction(BOOL, "wglBindSwapBarrierNV", [(GLuint, "group"), (GLuint, "barrier")]),
319 StdFunction(BOOL, "wglQuerySwapGroupNV", [(HDC, "hDC"), Out(Pointer(GLuint), "group"), Out(Pointer(GLuint), "barrier")]),
320 StdFunction(BOOL, "wglQueryMaxSwapGroupsNV", [(HDC, "hDC"), Out(Pointer(GLuint), "maxGroups"), Out(Pointer(GLuint), "maxBarriers")]),
321 StdFunction(BOOL, "wglQueryFrameCountNV", [(HDC, "hDC"), Out(Pointer(GLuint), "count")]),
322 StdFunction(BOOL, "wglResetFrameCountNV", [(HDC, "hDC")]),
323
324 # WGL_NV_gpu_affinity
325 StdFunction(BOOL, "wglEnumGpusNV", [(UINT, "iGpuIndex"), Out(Pointer(HGPUNV), "phGpu")]),
326 StdFunction(BOOL, "wglEnumGpuDevicesNV", [(HGPUNV, "hGpu"), (UINT, "iDeviceIndex"), Out(Pointer(GPU_DEVICE), "lpGpuDevice")]),
327 StdFunction(HDC, "wglCreateAffinityDCNV", [(OpaqueArray(Const(HGPUNV), "_wglCreateAffinityDCNV_size()"), "phGpuList")]),
328 StdFunction(BOOL, "wglEnumGpusFromAffinityDCNV", [(HDC, "hAffinityDC"), (UINT, "iGpuIndex"), Out(Pointer(HGPUNV), "hGpu")]),
329 StdFunction(BOOL, "wglDeleteDCNV", [(HDC, "hdc")]),
330
331 # WGL_AMD_gpu_association
332 StdFunction(UINT, "wglGetGPUIDsAMD", [(UINT, "maxCount"), Out(Array(UINT, "maxCount"), "ids")], sideeffects=False),
333 StdFunction(INT, "wglGetGPUInfoAMD", [(UINT, "id"), (Int, "property"), (GLenum, "dataType"), (UINT, "size"), Out(OpaqueBlob(Void, "_wglGetGPUInfoAMD_size(dataType,size)"), "data")], sideeffects=False),
334 StdFunction(UINT, "wglGetContextGPUIDAMD", [(HGLRC, "hglrc")], sideeffects=False),
335 StdFunction(HGLRC, "wglCreateAssociatedContextAMD", [(UINT, "id")]),
336 StdFunction(HGLRC, "wglCreateAssociatedContextAttribsAMD", [(UINT, "id"), (HGLRC, "hShareContext"), (OpaqueArray(Const(Int), "_wglCreateAssociatedContextAttribsAMD_size()"), "attribList")]),
337 StdFunction(BOOL, "wglDeleteAssociatedContextAMD", [(HGLRC, "hglrc")]),
338 StdFunction(BOOL, "wglMakeAssociatedContextCurrentAMD", [(HGLRC, "hglrc")]),
339 StdFunction(HGLRC, "wglGetCurrentAssociatedContextAMD", [], sideeffects=False),
340 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")]),
341
342 # WGL_NV_video_capture
343 StdFunction(BOOL, "wglBindVideoCaptureDeviceNV", [(UINT, "uVideoSlot"), (HVIDEOINPUTDEVICENV, "hDevice")]),
344 StdFunction(UINT, "wglEnumerateVideoCaptureDevicesNV", [(HDC, "hDc"), Out(Pointer(HVIDEOINPUTDEVICENV), "phDeviceList")]),
345 StdFunction(BOOL, "wglLockVideoCaptureDeviceNV", [(HDC, "hDc"), (HVIDEOINPUTDEVICENV, "hDevice")]),
346 StdFunction(BOOL, "wglQueryVideoCaptureDeviceNV", [(HDC, "hDc"), (HVIDEOINPUTDEVICENV, "hDevice"), (Int, "iAttribute"), Out(Pointer(Int), "piValue")]),
347 StdFunction(BOOL, "wglReleaseVideoCaptureDeviceNV", [(HDC, "hDc"), (HVIDEOINPUTDEVICENV, "hDevice")]),
348
349 # WGL_NV_copy_image
350 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")]),
351
352 # WGL_NV_DX_interop
353 StdFunction(BOOL, "wglDXSetResourceShareHandleNV", [(OpaquePointer(Void), "dxObject"), (HANDLE, "shareHandle")]),
354 StdFunction(HANDLE, "wglDXOpenDeviceNV", [(OpaquePointer(Void), "dxDevice")]),
355 StdFunction(BOOL, "wglDXCloseDeviceNV", [(HANDLE, "hDevice")]),
356 StdFunction(HANDLE, "wglDXRegisterObjectNV", [(HANDLE, "hDevice"), (OpaquePointer(Void), "dxObject"), (GLuint, "name"), (GLenum, "type"), (GLenum, "access")]),
357 StdFunction(BOOL, "wglDXUnregisterObjectNV", [(HANDLE, "hDevice"), (HANDLE, "hObject")]),
358 StdFunction(BOOL, "wglDXObjectAccessNV", [(HANDLE, "hObject"), (GLenum, "access")]),
359 StdFunction(BOOL, "wglDXLockObjectsNV", [(HANDLE, "hDevice"), (GLint, "count"), Out(Array(HANDLE, "count"), "hObjects")]),
360 StdFunction(BOOL, "wglDXUnlockObjectsNV", [(HANDLE, "hDevice"), (GLint, "count"), Out(Array(HANDLE, "count"), "hObjects")]),
361
José Fonseca8fbdd3a2010-11-23 20:55:07 +0000362 # must be last
363 StdFunction(PROC, "wglGetProcAddress", [(LPCSTR, "lpszProc")]),
364])