wgl: Implement wglSwapMultipleBuffers.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 13 Feb 2010 15:09:46 +0000 (15:09 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 13 Feb 2010 15:43:49 +0000 (15:43 +0000)
src/gallium/state_trackers/wgl/opengl32.def
src/gallium/state_trackers/wgl/opengl32.mingw.def
src/gallium/state_trackers/wgl/stw_wgl.c
src/gallium/state_trackers/wgl/stw_wgl.h

index 5daa6ddd413b1c9ed9586755fb81365d2f18d34b..01a29d0391d7993629045277089d75ded5ce4fc9 100644 (file)
@@ -362,7 +362,7 @@ EXPORTS
        wglShareLists
        wglSwapBuffers
        wglSwapLayerBuffers
-;      wglSwapMultipleBuffers
+       wglSwapMultipleBuffers
        wglUseFontBitmapsA
        wglUseFontBitmapsW
        wglUseFontOutlinesA
index 6ebb31a6f1bba61b4ab6af28f2a8ad6f55abe086..0bceee06979b50fac80d7ee15c7a5cf819f9badc 100644 (file)
@@ -362,7 +362,7 @@ EXPORTS
        wglShareLists = wglShareLists@8
        wglSwapBuffers = wglSwapBuffers@4
        wglSwapLayerBuffers = wglSwapLayerBuffers@8
-;      wglSwapMultipleBuffers = wglSwapMultipleBuffers@8
+       wglSwapMultipleBuffers = wglSwapMultipleBuffers@8
        wglUseFontBitmapsA = wglUseFontBitmapsA@16
        wglUseFontBitmapsW = wglUseFontBitmapsW@16
        wglUseFontOutlinesA = wglUseFontOutlinesA@32
index bb199fdd2526c738f9a6618ac8197cd3d4c152b6..5fbb7bf7cfd6b8aefd102b73c4e2411497c48ab7 100644 (file)
@@ -97,6 +97,19 @@ wglSwapBuffers(
 }
 
 
+WINGDIAPI DWORD WINAPI
+wglSwapMultipleBuffers(UINT n,
+                       CONST WGLSWAP *ps)
+{
+   UINT i;
+
+   for (i =0; i < n; ++i)
+      wglSwapBuffers(ps->hdc);
+
+   return 0;
+}
+
+
 WINGDIAPI BOOL APIENTRY
 wglSwapLayerBuffers(
    HDC hdc,
index a98179944aa297b931eb566091468efa1e3d39a0..57baaf0a11fcddb4edb0ac82a546687f0231bea8 100644 (file)
@@ -59,5 +59,21 @@ wglSetPixelFormat(HDC hdc,
                   int iPixelFormat,
                   CONST PIXELFORMATDESCRIPTOR *ppfd);
 
+#if defined(__MINGW32__) || (WINVER < 0x0500)
+
+typedef struct _WGLSWAP
+{
+   HDC hdc;
+   UINT uiFlags;
+} WGLSWAP;
+
+#define WGL_SWAPMULTIPLE_MAX 16
+
+WINGDIAPI DWORD WINAPI
+wglSwapMultipleBuffers(UINT n,
+                       CONST WGLSWAP *ps);
+
+#endif
+
 
 #endif /* STW_WGL_H_ */