From e77877f2079a74918c139b8ea7f6dc927246c20f Mon Sep 17 00:00:00 2001 From: Frank Richter Date: Wed, 26 Jul 2017 11:27:30 +0200 Subject: Windows QPA: Also wrap DescribePixelFormat() GDI and the software rendering opengl32sw.dll may have very different pixel formats so use wglDescribePixelFormat() in that case. This mirrors the existing behavior for SetPixelFormat(). Change-Id: I55e658ab69bad84bb10cc5a042d62e84c005c0e6 Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowsglcontext.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/windows/qwindowsglcontext.h') diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h index 1abe2eb390..e962af39c2 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.h +++ b/src/plugins/platforms/windows/qwindowsglcontext.h @@ -107,6 +107,7 @@ struct QWindowsOpengl32DLL // Wrappers. Always use these instead of SwapBuffers/wglSwapBuffers/etc. BOOL swapBuffers(HDC dc); BOOL setPixelFormat(HDC dc, int pf, const PIXELFORMATDESCRIPTOR *pfd); + int describePixelFormat(HDC dc, int pf, UINT size, PIXELFORMATDESCRIPTOR *pfd); // WGL HGLRC (WINAPI * wglCreateContext)(HDC dc); @@ -130,6 +131,7 @@ private: // For Mesa llvmpipe shipped with a name other than opengl32.dll BOOL (WINAPI * wglSwapBuffers)(HDC dc); BOOL (WINAPI * wglSetPixelFormat)(HDC dc, int pf, const PIXELFORMATDESCRIPTOR *pfd); + int (WINAPI * wglDescribePixelFormat)(HDC dc, int pf, UINT size, PIXELFORMATDESCRIPTOR *pfd); }; class QOpenGLStaticContext : public QWindowsStaticOpenGLContext -- cgit v1.2.3