wgl: GDI support is not advertised with double buffering.
This commit is contained in:
parent
85867205e5
commit
5e6d3c15e7
|
@ -35,6 +35,9 @@ static int (WINAPI *pwglReleasePbufferDCARB)(HPBUFFERARB, HDC);
|
|||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
|
||||
static BOOL (WINAPI *pwglChoosePixelFormatARB)(HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||
static BOOL (WINAPI *pwglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int *, int *);
|
||||
|
||||
|
@ -225,6 +228,28 @@ static void test_colorbits(HDC hdc)
|
|||
iAttribRet[0], iAttribRet[1]);
|
||||
}
|
||||
|
||||
static void test_gdi_dbuf(HDC hdc)
|
||||
{
|
||||
const int iAttribList[] = { WGL_SUPPORT_GDI_ARB, WGL_DOUBLE_BUFFER_ARB };
|
||||
int iAttribRet[sizeof(iAttribList)/sizeof(iAttribList[0])];
|
||||
unsigned int nFormats;
|
||||
int iPixelFormat;
|
||||
int res;
|
||||
|
||||
nFormats = DescribePixelFormat(hdc, 0, 0, NULL);
|
||||
for(iPixelFormat = 1;iPixelFormat <= nFormats;iPixelFormat++)
|
||||
{
|
||||
res = pwglGetPixelFormatAttribivARB(hdc, iPixelFormat, 0,
|
||||
sizeof(iAttribList)/sizeof(iAttribList[0]), iAttribList,
|
||||
iAttribRet);
|
||||
ok(res!=FALSE, "wglGetPixelFormatAttribivARB failed for pixel format %d\n", iPixelFormat);
|
||||
if(res == FALSE)
|
||||
continue;
|
||||
|
||||
ok(!(iAttribRet[0] && iAttribRet[1]), "GDI support and double buffering on pixel format %d\n", iPixelFormat);
|
||||
}
|
||||
}
|
||||
|
||||
START_TEST(opengl)
|
||||
{
|
||||
HWND hwnd;
|
||||
|
@ -274,6 +299,7 @@ START_TEST(opengl)
|
|||
|
||||
test_setpixelformat();
|
||||
test_colorbits(hdc);
|
||||
test_gdi_dbuf(hdc);
|
||||
|
||||
wgl_extensions = pwglGetExtensionsStringARB(hdc);
|
||||
if(wgl_extensions == NULL) skip("Skipping opengl32 tests because this OpenGL implementation doesn't support WGL extensions!\n");
|
||||
|
|
|
@ -1301,7 +1301,11 @@ int X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
|
|||
if(value == GLX_SLOW_CONFIG)
|
||||
ppfd->dwFlags |= PFD_GENERIC_ACCELERATED;
|
||||
|
||||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DOUBLEBUFFER, &value); if (value) ppfd->dwFlags |= PFD_DOUBLEBUFFER;
|
||||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DOUBLEBUFFER, &value);
|
||||
if (value) {
|
||||
ppfd->dwFlags |= PFD_DOUBLEBUFFER;
|
||||
ppfd->dwFlags &= ~PFD_SUPPORT_GDI;
|
||||
}
|
||||
pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_STEREO, &value); if (value) ppfd->dwFlags |= PFD_STEREO;
|
||||
|
||||
/* Pixel type */
|
||||
|
@ -2773,6 +2777,13 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
|
|||
break;
|
||||
|
||||
case WGL_SUPPORT_GDI_ARB:
|
||||
if (!fmt) goto pix_error;
|
||||
hTest = pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DOUBLEBUFFER, &tmp);
|
||||
if (hTest) goto get_error;
|
||||
if(tmp) {
|
||||
piValues[i] = GL_FALSE;
|
||||
continue;
|
||||
}
|
||||
curGLXAttr = GLX_X_RENDERABLE;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue