diff options
author | José Fonseca <[email protected]> | 2010-02-13 15:09:46 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-02-13 15:43:49 +0000 |
commit | a583c3ab476078332679f96d2ca7fe8aab4c8d2d (patch) | |
tree | 6471204b9fdb08dc9ed2c9c18a87fbb68f3e938c /src/gallium/state_trackers | |
parent | 6b1193820f8985e2a7182fcc983fbaf17802e139 (diff) |
wgl: Implement wglSwapMultipleBuffers.
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_ */ |