From b903fcf93eba0998ea20f1f1ca4787446d75b16e Mon Sep 17 00:00:00 2001 From: Tomi Korpipaa Date: Thu, 26 Apr 2018 13:10:03 +0300 Subject: [PATCH] Fix kria cluster macOS issues --- kria-cluster-3d-demo/main.cpp | 2 ++ .../presentation/mainPresentation.uip | 4 ++-- kria-cluster-3d-demo/qml/main.qml | 11 +++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/kria-cluster-3d-demo/main.cpp b/kria-cluster-3d-demo/main.cpp index c298285..5c2b0ec 100644 --- a/kria-cluster-3d-demo/main.cpp +++ b/kria-cluster-3d-demo/main.cpp @@ -66,6 +66,8 @@ int main(int argc, char *argv[]) QSurfaceFormat::setDefaultFormat(openGLFormat); #endif + qputenv("QML_DISABLE_DISK_CACHE", "true"); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); diff --git a/kria-cluster-3d-demo/presentation/mainPresentation.uip b/kria-cluster-3d-demo/presentation/mainPresentation.uip index 6594cf7..d67d706 100644 --- a/kria-cluster-3d-demo/presentation/mainPresentation.uip +++ b/kria-cluster-3d-demo/presentation/mainPresentation.uip @@ -199,7 +199,7 @@ - + @@ -658,7 +658,7 @@ - + 0 100 0 0 diff --git a/kria-cluster-3d-demo/qml/main.qml b/kria-cluster-3d-demo/qml/main.qml index 34cb14d..968f7aa 100644 --- a/kria-cluster-3d-demo/qml/main.qml +++ b/kria-cluster-3d-demo/qml/main.qml @@ -148,10 +148,14 @@ Item { qmlStreams: [ QmlStream { presentationId: "navigationStream" + // Load at start and set active & visible. Otherwise causes problems + // with macOS. Loader { id: contentStream - active: false - source: "" + active: true + visible: true + source: "qrc:/Navigation.qml" + asynchronous: false } } ] @@ -165,6 +169,8 @@ Item { // Hack. We need to draw something in QML in each frame to minimize the jamming of // Studio3D content. + /* + // This seems to mess up QML streaming for macOS. Enable if target device jams a lot. property bool direction: false onFrameUpdate: { direction = !direction; @@ -173,6 +179,7 @@ Item { else studio3D.x -= 0.1; } + */ } OverlayContainer { -- GitLab