diff options
author | Frank Richter <frank.richter@gmail.com> | 2017-07-26 11:27:30 +0200 |
---|---|---|
committer | Frank Richter <frank.richter@gmail.com> | 2019-09-10 09:17:24 +0200 |
commit | e77877f2079a74918c139b8ea7f6dc927246c20f (patch) | |
tree | 4b8ded77264e0bb5aa6d2efd56bf31ee9ec322a6 /src/plugins/platforms/windows/qwindowsglcontext.h | |
parent | c9291cbfd639308040cc2d92e91b01e27b4cafb9 (diff) |
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 <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsglcontext.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |