from wglenum import *
-wglapi = API("WGL")
+wglapi = Module("WGL")
HGLRC = Alias("HGLRC", HANDLE)
(UINT, "uiFlags"),
])
+WGLContextAttribs = AttribArray(WGLenum, [
+ ('WGL_CONTEXT_MAJOR_VERSION_ARB', Int),
+ ('WGL_CONTEXT_MINOR_VERSION_ARB', Int),
+ ('WGL_CONTEXT_LAYER_PLANE_ARB', Int),
+ ('WGL_CONTEXT_FLAGS_ARB', Flags(Int, ["WGL_CONTEXT_DEBUG_BIT_ARB", "WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB"])),
+ ('WGL_CONTEXT_PROFILE_MASK_ARB', Flags(Int, ["WGL_CONTEXT_CORE_PROFILE_BIT_ARB", "WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB"]))
+])
+
HPBUFFERARB = Alias("HPBUFFERARB", HANDLE)
StdFunction(BOOL, "wglRestoreBufferRegionARB", [(HANDLE, "hRegion"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height"), (Int, "xSrc"), (Int, "ySrc")]),
# WGL_ARB_extensions_string
- StdFunction(Const(CString), "wglGetExtensionsStringARB", [(HDC, "hdc")], sideeffects=False),
+ StdFunction(ConstCString, "wglGetExtensionsStringARB", [(HDC, "hdc")], sideeffects=False),
# WGL_ARB_pixel_format
StdFunction(BOOL, "wglGetPixelFormatAttribivARB", [(HDC, "hdc"), (Int, "iPixelFormat"), (Int, "iLayerPlane"), (UINT, "nAttributes"), (Array(WGLenum, "nAttributes"), "piAttributes"), Out(Array(Int, "nAttributes"), "piValues")], sideeffects=False),
StdFunction(BOOL, "wglSetPbufferAttribARB", [(HPBUFFERARB, "hPbuffer"), (Array(Const(WGLenum), "_AttribPairList_size(piAttribList)"), "piAttribList")]),
# WGL_ARB_create_context
- StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (Array(Const(WGLenum), "_AttribPairList_size(attribList)"), "attribList")]),
+ StdFunction(HGLRC, "wglCreateContextAttribsARB", [(HDC, "hDC"), (HGLRC, "hShareContext"), (WGLContextAttribs, "attribList")]),
# WGL_EXT_extensions_string
- StdFunction(Const(CString), "wglGetExtensionsStringEXT", [], sideeffects=False),
+ StdFunction(ConstCString, "wglGetExtensionsStringEXT", [], sideeffects=False),
# WGL_EXT_make_current_read
StdFunction(BOOL, "wglMakeContextCurrentEXT", [(HDC, "hDrawDC"), (HDC, "hReadDC"), (HGLRC, "hglrc")]),