From 85844e506db5fde9a6691ea5248c30af1be78252 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 10 Jun 2002 02:28:42 +0000 Subject: [PATCH] Authors: Jesse Allen , Lionel Ulmer Added implementation of wglSwapLayerBuffers. --- dlls/opengl32/wgl.c | 13 +++++++++++-- include/wingdi.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 02e233f31e7..dfaf5d6c715 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -435,9 +435,18 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1, */ BOOL WINAPI wglSwapLayerBuffers(HDC hdc, UINT fuPlanes) { - FIXME("(): stub !\n"); + TRACE("(%08x, %08x)\n", hdc, fuPlanes); - return FALSE; + if (fuPlanes & WGL_SWAP_MAIN_PLANE) { + if (!SwapBuffers(hdc)) return FALSE; + fuPlanes &= ~WGL_SWAP_MAIN_PLANE; + } + + if (fuPlanes) { + WARN("Following layers unhandled : %08x\n", fuPlanes); + } + + return TRUE; } /*********************************************************************** diff --git a/include/wingdi.h b/include/wingdi.h index 55d404906b1..18066b7ae8c 100644 --- a/include/wingdi.h +++ b/include/wingdi.h @@ -3412,6 +3412,39 @@ BOOL WINAPI PolyTextOutA(HDC,PPOLYTEXTA,INT); BOOL WINAPI PolyTextOutW(HDC,PPOLYTEXTW,INT); #define PolyTextOut WINELIB_NAME_AW(PolyTextOut) +/* These defines are used by wglSwapLayerBuffers */ +#define WGL_SWAP_MAIN_PLANE (1 << 0) +#define WGL_SWAP_OVERLAY1 (1 << 1) +#define WGL_SWAP_OVERLAY2 (1 << 2) +#define WGL_SWAP_OVERLAY3 (1 << 3) +#define WGL_SWAP_OVERLAY4 (1 << 4) +#define WGL_SWAP_OVERLAY5 (1 << 5) +#define WGL_SWAP_OVERLAY6 (1 << 6) +#define WGL_SWAP_OVERLAY7 (1 << 7) +#define WGL_SWAP_OVERLAY8 (1 << 8) +#define WGL_SWAP_OVERLAY9 (1 << 9) +#define WGL_SWAP_OVERLAY10 (1 << 10) +#define WGL_SWAP_OVERLAY11 (1 << 11) +#define WGL_SWAP_OVERLAY12 (1 << 12) +#define WGL_SWAP_OVERLAY13 (1 << 13) +#define WGL_SWAP_OVERLAY14 (1 << 14) +#define WGL_SWAP_OVERLAY15 (1 << 15) +#define WGL_SWAP_UNDERLAY1 (1 << 16) +#define WGL_SWAP_UNDERLAY2 (1 << 17) +#define WGL_SWAP_UNDERLAY3 (1 << 18) +#define WGL_SWAP_UNDERLAY4 (1 << 19) +#define WGL_SWAP_UNDERLAY5 (1 << 20) +#define WGL_SWAP_UNDERLAY6 (1 << 21) +#define WGL_SWAP_UNDERLAY7 (1 << 22) +#define WGL_SWAP_UNDERLAY8 (1 << 23) +#define WGL_SWAP_UNDERLAY9 (1 << 24) +#define WGL_SWAP_UNDERLAY10 (1 << 25) +#define WGL_SWAP_UNDERLAY11 (1 << 26) +#define WGL_SWAP_UNDERLAY12 (1 << 27) +#define WGL_SWAP_UNDERLAY13 (1 << 28) +#define WGL_SWAP_UNDERLAY14 (1 << 29) +#define WGL_SWAP_UNDERLAY15 (1 << 30) + #ifdef __cplusplus } #endif