From d6a42a9a49163f410f7ae3058a44c043bbb6c994 Mon Sep 17 00:00:00 2001 From: vladest Date: Sat, 10 Mar 2018 14:49:04 +0100 Subject: [PATCH 1/5] HifiConstants is not visual item, just a placeholder for constants --- .../resources/qml/styles-uit/HifiConstants.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/resources/qml/styles-uit/HifiConstants.qml b/interface/resources/qml/styles-uit/HifiConstants.qml index afa210ea8b..df382f201f 100644 --- a/interface/resources/qml/styles-uit/HifiConstants.qml +++ b/interface/resources/qml/styles-uit/HifiConstants.qml @@ -11,7 +11,7 @@ import QtQuick 2.5 import QtQuick.Window 2.2 -Item { +QtObject { readonly property alias colors: colors readonly property alias colorSchemes: colorSchemes readonly property alias dimensions: dimensions @@ -46,7 +46,7 @@ Item { return glyph; } - Item { + QtObject { id: colors // Base colors @@ -134,14 +134,14 @@ Item { readonly property color tabBackgroundLight: "#d4d4d4" } - Item { + QtObject { id: colorSchemes readonly property int light: 0 readonly property int dark: 1 readonly property int faintGray: 2 } - Item { + QtObject { id: dimensions readonly property bool largeScreen: Screen.width >= 1920 && Screen.height >= 1080 readonly property real borderRadius: largeScreen ? 7.5 : 5.0 @@ -168,7 +168,7 @@ Item { readonly property real buttonWidth: 120 } - Item { + QtObject { id: fontSizes // In pixels readonly property real overlayTitle: dimensions.largeScreen ? 18 : 14 readonly property real tabName: dimensions.largeScreen ? 12 : 10 @@ -194,7 +194,7 @@ Item { readonly property real disclosureButton: dimensions.largeScreen ? 30 : 22 } - Item { + QtObject { id: icons // Values per OffscreenUi::Icon readonly property int none: 0 @@ -205,7 +205,7 @@ Item { readonly property int placemark: 5 } - Item { + QtObject { id: buttons readonly property int white: 0 readonly property int blue: 1 @@ -231,7 +231,7 @@ Item { id: effects readonly property int fadeInDuration: 300 } - Item { + QtObject { id: glyphs readonly property string noIcon: "" readonly property string hmd: "b" From 7ca0c76b1cf1986a032d0b2ec143fc58b2a29ba6 Mon Sep 17 00:00:00 2001 From: vladest Date: Sat, 10 Mar 2018 16:18:32 +0100 Subject: [PATCH 2/5] QtObject dousnt support inner instances --- .../qml/styles-uit/HifiConstants.qml | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/interface/resources/qml/styles-uit/HifiConstants.qml b/interface/resources/qml/styles-uit/HifiConstants.qml index df382f201f..09bd530177 100644 --- a/interface/resources/qml/styles-uit/HifiConstants.qml +++ b/interface/resources/qml/styles-uit/HifiConstants.qml @@ -12,14 +12,6 @@ import QtQuick 2.5 import QtQuick.Window 2.2 QtObject { - readonly property alias colors: colors - readonly property alias colorSchemes: colorSchemes - readonly property alias dimensions: dimensions - readonly property alias fontSizes: fontSizes - readonly property alias glyphs: glyphs - readonly property alias icons: icons - readonly property alias buttons: buttons - readonly property alias effects: effects function glyphForIcon(icon) { // Translates icon enum to glyph char. @@ -46,9 +38,7 @@ QtObject { return glyph; } - QtObject { - id: colors - + readonly property QtObject colors: QtObject { // Base colors readonly property color baseGray: "#393939" readonly property color darkGray: "#121212" @@ -134,15 +124,13 @@ QtObject { readonly property color tabBackgroundLight: "#d4d4d4" } - QtObject { - id: colorSchemes + readonly property QtObject colorSchemes: QtObject { readonly property int light: 0 readonly property int dark: 1 readonly property int faintGray: 2 } - QtObject { - id: dimensions + readonly property QtObject dimensions: QtObject { readonly property bool largeScreen: Screen.width >= 1920 && Screen.height >= 1080 readonly property real borderRadius: largeScreen ? 7.5 : 5.0 readonly property real borderWidth: largeScreen ? 2 : 1 @@ -168,8 +156,8 @@ QtObject { readonly property real buttonWidth: 120 } - QtObject { - id: fontSizes // In pixels + readonly property QtObject fontSizes: QtObject { + // In pixels readonly property real overlayTitle: dimensions.largeScreen ? 18 : 14 readonly property real tabName: dimensions.largeScreen ? 12 : 10 readonly property real sectionName: dimensions.largeScreen ? 12 : 10 @@ -194,8 +182,7 @@ QtObject { readonly property real disclosureButton: dimensions.largeScreen ? 30 : 22 } - QtObject { - id: icons + readonly property QtObject icons: QtObject { // Values per OffscreenUi::Icon readonly property int none: 0 readonly property int question: 1 @@ -205,8 +192,7 @@ QtObject { readonly property int placemark: 5 } - QtObject { - id: buttons + readonly property QtObject buttons: QtObject { readonly property int white: 0 readonly property int blue: 1 readonly property int red: 2 @@ -227,12 +213,11 @@ QtObject { readonly property int radius: 5 } - QtObject { - id: effects + readonly property QtObject effects: QtObject { readonly property int fadeInDuration: 300 } - QtObject { - id: glyphs + + readonly property QtObject glyphs: QtObject { readonly property string noIcon: "" readonly property string hmd: "b" readonly property string screen: "c" From e84704165fc4ca45b4009ffd8822a646109535eb Mon Sep 17 00:00:00 2001 From: vladest Date: Sat, 10 Mar 2018 16:35:17 +0100 Subject: [PATCH 3/5] Remove reference to non existing id --- .../qml/styles-uit/HifiConstants.qml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/interface/resources/qml/styles-uit/HifiConstants.qml b/interface/resources/qml/styles-uit/HifiConstants.qml index 09bd530177..9705d84b7b 100644 --- a/interface/resources/qml/styles-uit/HifiConstants.qml +++ b/interface/resources/qml/styles-uit/HifiConstants.qml @@ -17,23 +17,23 @@ QtObject { // Translates icon enum to glyph char. var glyph; switch (icon) { - case hifi.icons.information: - glyph = hifi.glyphs.info; + case icons.information: + glyph = glyphs.info; break; - case hifi.icons.question: - glyph = hifi.glyphs.question; + case icons.question: + glyph = glyphs.question; break; - case hifi.icons.warning: - glyph = hifi.glyphs.alert; + case icons.warning: + glyph = glyphs.alert; break; - case hifi.icons.critical: - glyph = hifi.glyphs.error; + case icons.critical: + glyph = glyphs.error; break; - case hifi.icons.placemark: - glyph = hifi.glyphs.placemark; + case icons.placemark: + glyph = glyphs.placemark; break; default: - glyph = hifi.glyphs.noIcon; + glyph = glyphs.noIcon; } return glyph; } From d529d7b1d350679794ccad7d103bd5c5018262e2 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 21 Mar 2018 16:07:04 -0700 Subject: [PATCH 4/5] Remove whitespace before shader version line --- libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp index 46931ec08f..35dc8a3fbd 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendShader.cpp @@ -17,8 +17,7 @@ std::string GLBackend::getBackendShaderHeader() const { #if defined(USE_GLES) static const std::string header( -R"SHADER( -#version 310 es +R"SHADER(#version 310 es #extension GL_EXT_texture_buffer : enable precision lowp float; // check precision 2 precision lowp samplerBuffer; @@ -26,8 +25,7 @@ precision lowp sampler2DShadow; )SHADER"); #else static const std::string header( -R"SHADER( -#version 410 core +R"SHADER(#version 410 core )SHADER"); #endif From 12b289bbc153e9868c6bc1b0a3a07f7398328dc2 Mon Sep 17 00:00:00 2001 From: Gabriel Calero Date: Thu, 22 Mar 2018 12:38:56 -0300 Subject: [PATCH 5/5] Restore debug logger for GLES. Fix SIGABRT Cannot make QOpenGLContext current in a different thread --- libraries/gl/src/gl/OffscreenGLCanvas.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libraries/gl/src/gl/OffscreenGLCanvas.cpp b/libraries/gl/src/gl/OffscreenGLCanvas.cpp index 4d92ee8c17..4a2c5fd7f7 100644 --- a/libraries/gl/src/gl/OffscreenGLCanvas.cpp +++ b/libraries/gl/src/gl/OffscreenGLCanvas.cpp @@ -69,8 +69,7 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) { qFatal("Offscreen surface is invalid"); } #endif - -#if !defined(USE_GLES) + if (gl::Context::enableDebugLogger()) { _context->makeCurrent(_offscreenSurface); QOpenGLDebugLogger *logger = new QOpenGLDebugLogger(this); @@ -80,7 +79,6 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) { logger->startLogging(QOpenGLDebugLogger::SynchronousLogging); _context->doneCurrent(); } -#endif return true; }