summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2017-11-29 12:30:29 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2017-11-29 10:35:50 +0000
commit746138a1c600b1b3ebe6bfe31617627d2c4e16ef (patch)
treee38d53518a4749540a941dce998f812b734910f9
parent7c6ca41087cc22ad641a0725a02a42aaef573996 (diff)
Fix macOS crash with 2x and 4x multisampling
Note: This is a temporary fix for the problem. Actual one should be made for 1.0.1 (or 1.1) Task-number: QT3DS-590 Change-Id: If577d8e004ed74cb0e1ed84a566459dc1644dbae Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Runtime/Source/Qt3DSRender/Source/backends/gl/Qt3DSRenderContextGL.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Runtime/Source/Qt3DSRender/Source/backends/gl/Qt3DSRenderContextGL.cpp b/src/Runtime/Source/Qt3DSRender/Source/backends/gl/Qt3DSRenderContextGL.cpp
index 93229199..88670ef7 100644
--- a/src/Runtime/Source/Qt3DSRender/Source/backends/gl/Qt3DSRenderContextGL.cpp
+++ b/src/Runtime/Source/Qt3DSRender/Source/backends/gl/Qt3DSRenderContextGL.cpp
@@ -65,9 +65,17 @@ namespace render {
format);
} else if (format.majorVersion() == 4
|| (isES && format.majorVersion() == 3 && format.minorVersion() >= 1)) {
+#ifdef Q_OS_MACOS
+ // TODO: macOS crashes with glTextStorage2DMultisample, so fall back to OpenGL3
+ // for now (QT3DS-590)
+ theBackend = QT3DS_NEW(foundation.getAllocator(), NVRenderBackendGL3Impl)(foundation,
+ *theStringTable,
+ format);
+#else
theBackend = QT3DS_NEW(foundation.getAllocator(), NVRenderBackendGL4Impl)(foundation,
*theStringTable,
format);
+#endif
} else {
QT3DS_ASSERT(false);
qCCritical(INTERNAL_ERROR) << "Can't find a suitable OpenGL version for" << format;