]> git.cworth.org Git - apitrace/commitdiff
MinGW portability fixes.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 4 May 2009 09:24:12 +0000 (10:24 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 4 May 2009 09:24:12 +0000 (10:24 +0100)
opengl32.def
opengl32.py

index 9e717a79a475ada02bb8ff74fbf188743030ed9a..a9e174f723ca04c34b2784a7f8adef88342939c4 100644 (file)
@@ -364,7 +364,7 @@ EXPORTS
        wglShareLists
        wglSwapBuffers
        wglSwapLayerBuffers
-       wglSwapMultipleBuffers
+;      wglSwapMultipleBuffers
        wglUseFontBitmapsA
        wglUseFontBitmapsW
        wglUseFontOutlinesA
index 992517ac89db94392f05bfcbc2cdfbce4ce09386..b8b61e39e1e9ee6b07ed14e817852513a6aa3066 100644 (file)
@@ -433,7 +433,7 @@ opengl32.functions += [
 ]
 
 HGLRC = Alias("HGLRC", HANDLE)
-PROC = Alias("PROC", LPVOID)
+PROC = Intrinsic("PROC", "%p")
 
 PFD = Flags(DWORD, [
     "PFD_DOUBLEBUFFER",
@@ -449,7 +449,7 @@ PFD = Flags(DWORD, [
     "PFD_SWAP_COPY",
     "PFD_SWAP_LAYER_BUFFERS",
     "PFD_GENERIC_ACCELERATED",
-    "PFD_SUPPORT_DIRECTDRAW",
+    #"PFD_SUPPORT_DIRECTDRAW",
 ])
 
 PIXELFORMATDESCRIPTOR = Struct("PIXELFORMATDESCRIPTOR", [
@@ -526,11 +526,6 @@ LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [
 ])
 LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR)
 
-WGLSWAP = Struct("WGLSWAP", [
-    (HDC, "hdc"),
-    (UINT, "uiFlags"),
-])
-
 opengl32.functions += [
     Function(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]),
     Function(HGLRC, "wglCreateContext", [(HDC, "hdc")]),
@@ -556,9 +551,18 @@ opengl32.functions += [
     Function(Int  , "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (OutPointer(COLORREF), "pcr")]),
     Function(BOOL , "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]),
     Function(BOOL , "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]),
-    Function(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]),
 ]
 
+if False:
+    WGLSWAP = Struct("WGLSWAP", [
+        (HDC, "hdc"),
+        (UINT, "uiFlags"),
+    ])
+
+    opengl32.functions += [
+        Function(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]),
+    ]
+
 if __name__ == '__main__':
     print
     print '#define _GDI32_'
@@ -569,4 +573,8 @@ if __name__ == '__main__':
     print
     print '#include "log.hpp"'
     print
+    print 'extern "C" {'
+    print
     wrap()
+    print
+    print '}'