diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-08-07 19:54:41 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2017-12-15 08:45:45 +0000 |
commit | e739e984c3006ed2e88ef8f087455116cf9c4ebb (patch) | |
tree | 5b9b4c4fab50ca7308e4def79eb1dedcda4c26bf /src/plugins/platforms/cocoa/qcocoaglcontext.h | |
parent | ae55e75b1b6c2c07f4ef084ee27448fc0262c7c0 (diff) |
macOS: Make retina OpenGL work on VMware
Qt requests full resolution OpenGL surfaces by default.
However, when running as a VMware guest it looks like
the OS silently creates low-resolution surfaces.
This is not possible to detect using the standard NSWindow
APIs for converting to backing coordinates or for
reading the backing scale factor. The result of this
is that Qt will incorrectly display one quarter of
the window content only.
Fall back to detecting if the OpenGL renderer is the
Apple software renderer, which it will be on VMware.
Cancel the high-resolution surface request if this
is the case. This needs to be done while we have a
valid OpenGL context.
Task-number: QTBUG-62357
Change-Id: I33bf12b3bb0408249e6d66e0a8ca86b044bea781
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h index 1a66cec0e3..732b50d29e 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.h +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h @@ -84,6 +84,7 @@ private: NSOpenGLContext *m_shareContext; QSurfaceFormat m_format; QPointer<QWindow> m_currentWindow; + bool m_didCheckForSoftwareContext; }; QT_END_NAMESPACE |