summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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_ */