summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/wgl
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-13 15:09:46 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-13 15:43:49 +0000
commita583c3ab476078332679f96d2ca7fe8aab4c8d2d (patch)
tree6471204b9fdb08dc9ed2c9c18a87fbb68f3e938c /src/gallium/state_trackers/wgl
parent6b1193820f8985e2a7182fcc983fbaf17802e139 (diff)
wgl: Implement wglSwapMultipleBuffers.
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r--src/gallium/state_trackers/wgl/opengl32.def2
-rw-r--r--src/gallium/state_trackers/wgl/opengl32.mingw.def2
-rw-r--r--src/gallium/state_trackers/wgl/stw_wgl.c13
-rw-r--r--src/gallium/state_trackers/wgl/stw_wgl.h16
4 files changed, 31 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/wgl/opengl32.def b/src/gallium/state_trackers/wgl/opengl32.def
index 5daa6ddd41..01a29d0391 100644
--- a/src/gallium/state_trackers/wgl/opengl32.def
+++ b/src/gallium/state_trackers/wgl/opengl32.def
@@ -362,7 +362,7 @@ EXPORTS
wglShareLists
wglSwapBuffers
wglSwapLayerBuffers
-; wglSwapMultipleBuffers
+ wglSwapMultipleBuffers
wglUseFontBitmapsA
wglUseFontBitmapsW
wglUseFontOutlinesA
diff --git a/src/gallium/state_trackers/wgl/opengl32.mingw.def b/src/gallium/state_trackers/wgl/opengl32.mingw.def
index 6ebb31a6f1..0bceee0697 100644
--- a/src/gallium/state_trackers/wgl/opengl32.mingw.def
+++ b/src/gallium/state_trackers/wgl/opengl32.mingw.def
@@ -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
diff --git a/src/gallium/state_trackers/wgl/stw_wgl.c b/src/gallium/state_trackers/wgl/stw_wgl.c
index bb199fdd25..5fbb7bf7cf 100644
--- a/src/gallium/state_trackers/wgl/stw_wgl.c
+++ b/src/gallium/state_trackers/wgl/stw_wgl.c
@@ -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,
diff --git a/src/gallium/state_trackers/wgl/stw_wgl.h b/src/gallium/state_trackers/wgl/stw_wgl.h
index a98179944a..57baaf0a11 100644
--- a/src/gallium/state_trackers/wgl/stw_wgl.h
+++ b/src/gallium/state_trackers/wgl/stw_wgl.h
@@ -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_ */