diff options
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/wgl/opengl32.def | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/opengl32.mingw.def | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_wgl.c | 13 | ||||
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_wgl.h | 16 |
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 5daa6ddd413..01a29d0391d 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 6ebb31a6f1b..0bceee06979 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 bb199fdd252..5fbb7bf7cfd 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 a98179944aa..57baaf0a11f 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_ */ |