From 695f0a75b0b0cd9bc9f0f4ff6ec6c9fb57f50ba7 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 22 Oct 2015 11:12:51 -0700 Subject: [PATCH 1/4] fixes for builds with qt 5.5 --- libraries/render-utils/src/GlWindow.cpp | 6 ++-- libraries/ui/src/VrMenu.cpp | 40 +++++++++---------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/libraries/render-utils/src/GlWindow.cpp b/libraries/render-utils/src/GlWindow.cpp index 78ac046b59..248b9305e2 100644 --- a/libraries/render-utils/src/GlWindow.cpp +++ b/libraries/render-utils/src/GlWindow.cpp @@ -43,11 +43,9 @@ bool GlWindow::makeCurrent() { qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER)); }); - #ifndef QT_NO_DEBUG - QOpenGLContext * currentContext = - #endif - QOpenGLContext::currentContext(); + QOpenGLContext * currentContext = QOpenGLContext::currentContext(); Q_ASSERT(_context == currentContext); + return makeCurrentResult; } diff --git a/libraries/ui/src/VrMenu.cpp b/libraries/ui/src/VrMenu.cpp index a2cc7f0214..57df4d5306 100644 --- a/libraries/ui/src/VrMenu.cpp +++ b/libraries/ui/src/VrMenu.cpp @@ -108,13 +108,10 @@ void VrMenu::addMenu(QMenu* menu) { Q_ASSERT(false); } QVariant returnedValue; - #ifndef QT_NO_DEBUG - bool invokeResult = - #endif - QMetaObject::invokeMethod(this, "addMenu", Qt::DirectConnection, - Q_RETURN_ARG(QVariant, returnedValue), - Q_ARG(QVariant, QVariant::fromValue(qmlParent)), - Q_ARG(QVariant, QVariant::fromValue(menu->title()))); + bool invokeResult = QMetaObject::invokeMethod(this, "addMenu", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, returnedValue), + Q_ARG(QVariant, QVariant::fromValue(qmlParent)), + Q_ARG(QVariant, QVariant::fromValue(menu->title()))); Q_ASSERT(invokeResult); QObject* result = returnedValue.value(); Q_ASSERT(result); @@ -150,13 +147,11 @@ void VrMenu::addAction(QMenu* menu, QAction* action) { QObject* menuQml = findMenuObject(userData->uuid.toString()); Q_ASSERT(menuQml); QVariant returnedValue; - #ifndef QT_NO_DEBUG - bool invokeResult = - #endif - QMetaObject::invokeMethod(this, "addItem", Qt::DirectConnection, - Q_RETURN_ARG(QVariant, returnedValue), - Q_ARG(QVariant, QVariant::fromValue(menuQml)), - Q_ARG(QVariant, QVariant::fromValue(action->text()))); + + bool invokeResult = QMetaObject::invokeMethod(this, "addItem", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, returnedValue), + Q_ARG(QVariant, QVariant::fromValue(menuQml)), + Q_ARG(QVariant, QVariant::fromValue(action->text()))); Q_ASSERT(invokeResult); QObject* result = returnedValue.value(); Q_ASSERT(result); @@ -173,14 +168,11 @@ void VrMenu::insertAction(QAction* before, QAction* action) { } QObject* menu = beforeQml->parent(); QVariant returnedValue; - #ifndef QT_NO_DEBUG - bool invokeResult = - #endif - QMetaObject::invokeMethod(this, "insertItem", Qt::DirectConnection, - Q_RETURN_ARG(QVariant, returnedValue), - Q_ARG(QVariant, QVariant::fromValue(menu)), - Q_ARG(QVariant, QVariant::fromValue(beforeQml)), - Q_ARG(QVariant, QVariant::fromValue(action->text()))); + bool invokeResult = QMetaObject::invokeMethod(this, "insertItem", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, returnedValue), + Q_ARG(QVariant, QVariant::fromValue(menu)), + Q_ARG(QVariant, QVariant::fromValue(beforeQml)), + Q_ARG(QVariant, QVariant::fromValue(action->text()))); Q_ASSERT(invokeResult); QObject* result = returnedValue.value(); Q_ASSERT(result); @@ -199,9 +191,5 @@ void VrMenu::removeAction(QAction* action) { bool invokeResult = QMetaObject::invokeMethod(this, "removeItem", Qt::DirectConnection, Q_ARG(QVariant, QVariant::fromValue(menu)), Q_ARG(QVariant, QVariant::fromValue(item))); -#ifndef QT_NO_DEBUG Q_ASSERT(invokeResult); -#else - Q_UNUSED(invokeResult); -#endif } From a44ac4cbfd13e54aa68bf101334a00f21f30dc45 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 22 Oct 2015 11:40:56 -0700 Subject: [PATCH 2/4] Fiing the dark colors for surfaces without texture --- libraries/render-utils/src/MeshPartPayload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render-utils/src/MeshPartPayload.cpp b/libraries/render-utils/src/MeshPartPayload.cpp index 80327b7e54..30b72891dd 100644 --- a/libraries/render-utils/src/MeshPartPayload.cpp +++ b/libraries/render-utils/src/MeshPartPayload.cpp @@ -147,7 +147,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ModelRender::Locatio batch.setResourceTexture(ModelRender::DIFFUSE_MAP_SLOT, textureCache->getGrayTexture()); } } else { - batch.setResourceTexture(ModelRender::DIFFUSE_MAP_SLOT, textureCache->getGrayTexture()); + batch.setResourceTexture(ModelRender::DIFFUSE_MAP_SLOT, textureCache->getWhiteTexture()); } // Normal map From ea917f85f472332cc2ccc953cf1b10b17f36e09c Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Thu, 22 Oct 2015 12:56:45 -0700 Subject: [PATCH 3/4] added ability to set keyhole radius on EntityViewer --- libraries/octree/src/OctreeHeadlessViewer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/octree/src/OctreeHeadlessViewer.h b/libraries/octree/src/OctreeHeadlessViewer.h index 605db15cd2..cebfa5a928 100644 --- a/libraries/octree/src/OctreeHeadlessViewer.h +++ b/libraries/octree/src/OctreeHeadlessViewer.h @@ -46,6 +46,7 @@ public slots: // setters for camera attributes void setPosition(const glm::vec3& position) { _viewFrustum.setPosition(position); } void setOrientation(const glm::quat& orientation) { _viewFrustum.setOrientation(orientation); } + void setKeyholeRadius(float keyholdRadius) { _viewFrustum.setKeyholeRadius(keyholdRadius); } // setters for LOD and PPS void setVoxelSizeScale(float sizeScale) { _voxelSizeScale = sizeScale; } From 6392b7080b5dfa7f908f0639cf36638ac2e13961 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Fri, 23 Oct 2015 10:36:32 -0700 Subject: [PATCH 4/4] move scripts no longer in toybox to better locations --- examples/{entityScripts => }/breakdanceCore.js | 0 examples/{entityScripts => }/breakdanceToy.js | 2 +- examples/entityScripts/breakdanceEntity.js | 2 +- examples/{entityScripts => }/grenade.js | 0 examples/{entityScripts => }/magBalls.js | 8 ++++---- examples/{entityScripts => }/magBalls/constants.js | 0 examples/{entityScripts => }/magBalls/debugUtils.js | 0 examples/{entityScripts => }/magBalls/edgeSpring.js | 0 examples/{entityScripts => }/magBalls/graph.js | 0 examples/{entityScripts => }/magBalls/magBalls.js | 0 10 files changed, 6 insertions(+), 6 deletions(-) rename examples/{entityScripts => }/breakdanceCore.js (100%) rename examples/{entityScripts => }/breakdanceToy.js (92%) rename examples/{entityScripts => }/grenade.js (100%) rename examples/{entityScripts => }/magBalls.js (97%) rename examples/{entityScripts => }/magBalls/constants.js (100%) rename examples/{entityScripts => }/magBalls/debugUtils.js (100%) rename examples/{entityScripts => }/magBalls/edgeSpring.js (100%) rename examples/{entityScripts => }/magBalls/graph.js (100%) rename examples/{entityScripts => }/magBalls/magBalls.js (100%) diff --git a/examples/entityScripts/breakdanceCore.js b/examples/breakdanceCore.js similarity index 100% rename from examples/entityScripts/breakdanceCore.js rename to examples/breakdanceCore.js diff --git a/examples/entityScripts/breakdanceToy.js b/examples/breakdanceToy.js similarity index 92% rename from examples/entityScripts/breakdanceToy.js rename to examples/breakdanceToy.js index 0190ab74e9..d133f49ab8 100644 --- a/examples/entityScripts/breakdanceToy.js +++ b/examples/breakdanceToy.js @@ -11,7 +11,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -Script.include("../libraries/utils.js"); +Script.include("libraries/utils.js"); Script.include("breakdanceCore.js"); breakdanceStart(); Script.update.connect(breakdanceUpdate); diff --git a/examples/entityScripts/breakdanceEntity.js b/examples/entityScripts/breakdanceEntity.js index 5d4d418fec..8f8378c5d3 100644 --- a/examples/entityScripts/breakdanceEntity.js +++ b/examples/entityScripts/breakdanceEntity.js @@ -12,7 +12,7 @@ // (function() { - Script.include("../toys/breakdanceCore.js"); + Script.include("../breakdanceCore.js"); Script.include("../libraries/utils.js"); var _this; diff --git a/examples/entityScripts/grenade.js b/examples/grenade.js similarity index 100% rename from examples/entityScripts/grenade.js rename to examples/grenade.js diff --git a/examples/entityScripts/magBalls.js b/examples/magBalls.js similarity index 97% rename from examples/entityScripts/magBalls.js rename to examples/magBalls.js index 721e174676..c9b45164ab 100644 --- a/examples/entityScripts/magBalls.js +++ b/examples/magBalls.js @@ -7,10 +7,10 @@ // // FIXME Script paths have to be relative to the caller, in this case libraries/OmniTool.js -Script.include("../entityScripts/magBalls/constants.js"); -Script.include("../entityScripts/magBalls/graph.js"); -Script.include("../entityScripts/magBalls/edgeSpring.js"); -Script.include("../entityScripts/magBalls/magBalls.js"); +Script.include("../magBalls/constants.js"); +Script.include("../magBalls/graph.js"); +Script.include("../magBalls/edgeSpring.js"); +Script.include("../magBalls/magBalls.js"); Script.include("avatarRelativeOverlays.js"); OmniToolModuleType = "MagBallsController" diff --git a/examples/entityScripts/magBalls/constants.js b/examples/magBalls/constants.js similarity index 100% rename from examples/entityScripts/magBalls/constants.js rename to examples/magBalls/constants.js diff --git a/examples/entityScripts/magBalls/debugUtils.js b/examples/magBalls/debugUtils.js similarity index 100% rename from examples/entityScripts/magBalls/debugUtils.js rename to examples/magBalls/debugUtils.js diff --git a/examples/entityScripts/magBalls/edgeSpring.js b/examples/magBalls/edgeSpring.js similarity index 100% rename from examples/entityScripts/magBalls/edgeSpring.js rename to examples/magBalls/edgeSpring.js diff --git a/examples/entityScripts/magBalls/graph.js b/examples/magBalls/graph.js similarity index 100% rename from examples/entityScripts/magBalls/graph.js rename to examples/magBalls/graph.js diff --git a/examples/entityScripts/magBalls/magBalls.js b/examples/magBalls/magBalls.js similarity index 100% rename from examples/entityScripts/magBalls/magBalls.js rename to examples/magBalls/magBalls.js