Merge branch 'master' into DOC-79

This commit is contained in:
David Rowe 2019-06-28 08:14:12 +12:00
commit 9f01cc2f32
146 changed files with 1827 additions and 7524 deletions

View file

@ -31,7 +31,7 @@ If you do not wish to use the Python installation bundled with Visual Studio, yo
### Step 2. Installing CMake
Download and install the latest version of CMake 3.9.
Download and install the latest version of CMake 3.14.
Download the file named win64-x64 Installer from the [CMake Website](https://cmake.org/download/). You can access the installer on this [3.14 Version page](https://cmake.org/files/v3.14/). During installation, make sure to check "Add CMake to system PATH for all users" when prompted.

View file

@ -136,7 +136,8 @@ void DomainGatekeeper::processConnectRequestPacket(QSharedPointer<ReceivedMessag
} else {
qDebug() << "Refusing connection from node at" << message->getSenderSockAddr()
<< "with hardware address" << nodeConnection.hardwareAddress
<< "and machine fingerprint" << nodeConnection.machineFingerprint;
<< "and machine fingerprint" << nodeConnection.machineFingerprint
<< "sysinfo" << nodeConnection.SystemInfo;
}
}

View file

@ -37,7 +37,11 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c
dataStream >> newHeader.machineFingerprint;
// and the operating system type
dataStream >> newHeader.SystemInfo;
QByteArray compressedSystemInfo;
dataStream >> compressedSystemInfo;
if (!compressedSystemInfo.isEmpty()) {
newHeader.SystemInfo = qUncompress(compressedSystemInfo);
}
dataStream >> newHeader.connectReason;

View file

@ -340,10 +340,10 @@ Item {
text: "GPU: " + root.gpuFrameTime.toFixed(1) + " ms"
}
StatText {
text: "GPU (Per pixel): " + root.gpuFrameTimePerPixel.toFixed(5) + " ns/pp"
text: "GPU (Per pixel): " + root.gpuFrameTimePerPixel.toFixed(1) + " ns/pp"
}
StatText {
text: "GPU frame size: " + root.gpuFrameSize.x + " x " + root.gpuFrameSize.y
text: "GPU frame size: " + root.gpuFrameSize.x.toFixed(0) + " x " + root.gpuFrameSize.y.toFixed(0)
}
StatText {
text: "LOD Target: " + root.lodTargetFramerate + " Hz Angle: " + root.lodAngle + " deg"

View file

@ -33,6 +33,7 @@ Rectangle {
readonly property string unmutedIcon: "images/mic-unmute-i.svg"
readonly property string mutedIcon: "images/mic-mute-i.svg"
readonly property string pushToTalkIcon: "images/mic-ptt-i.svg"
readonly property string pushToTalkMutedIcon: "images/mic-ptt-mute-i.svg"
readonly property string clippingIcon: "images/mic-clip-i.svg"
readonly property string gatedIcon: "images/mic-gate-i.svg"
@ -48,18 +49,6 @@ Rectangle {
}
}
opacity: 0.7
onLevelChanged: {
var rectOpacity = (muted && (level >= userSpeakingLevel)) ? 1.0 : 0.7;
if (pushToTalk && !pushingToTalk) {
rectOpacity = (mouseArea.containsMouse) ? 1.0 : 0.7;
} else if (mouseArea.containsMouse && rectOpacity != 1.0) {
rectOpacity = 1.0;
}
micBar.opacity = rectOpacity;
}
color: "#00000000"
MouseArea {
@ -116,82 +105,84 @@ Rectangle {
Item {
id: icon
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.horizontalCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.rightMargin: 2
width: 13
height: 21
width: pushToTalk ? 16 : (muted ? 20 : 16)
height: 22
Item {
anchors.fill: parent
opacity: mouseArea.containsMouse ? 1.0 : 0.7
Image {
id: image
visible: false
source: (pushToTalk) ? pushToTalkIcon : muted ? mutedIcon :
clipping ? clippingIcon : gated ? gatedIcon : unmutedIcon
anchors.fill: parent
fillMode: Image.PreserveAspectFit
}
ColorOverlay {
opacity: mouseArea.containsMouse ? 1.0 : 0.7
visible: level === 0 || micBar.muted || micBar.clipping
id: imageOverlay
anchors { fill: image }
source: image
color: pushToTalk ? (pushingToTalk ? colors.unmutedColor : colors.mutedColor) : colors.icon
color: pushToTalk ? (pushingToTalk ? colors.icon : colors.mutedColor) : colors.icon
}
OpacityMask {
id: bar
visible: level > 0 && !micBar.muted && !micBar.clipping
anchors.fill: meterGradient
source: meterGradient
maskSource: image
}
LinearGradient {
id: meterGradient
anchors { fill: parent }
visible: false
start: Qt.point(0, 0)
end: Qt.point(0, parent.height)
rotation: 180
gradient: Gradient {
GradientStop {
position: 1.0
color: colors.greenStart
}
GradientStop {
position: 0.5
color: colors.greenEnd
}
GradientStop {
position: 0.0
color: colors.yellow
}
}
}
}
}
Item {
id: bar
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.horizontalCenter
anchors.leftMargin: 2
width: 4
height: 21
Rectangle { // base
id: baseBar
radius: 4
anchors { fill: parent }
color: colors.gutter
}
Rectangle { // mask
id: mask
height: micBar.muted ? parent.height : parent.height * level
color: micBar.muted ? colors.mutedColor : "white"
Item {
width: parent.width
radius: 5
anchors {
bottom: parent.bottom
bottomMargin: 0
left: parent.left
leftMargin: 0
height: parent.height - parent.height * level
anchors.top: parent.top
anchors.left: parent.left
clip:true
Image {
id: maskImage
visible: false
source: (pushToTalk) ? pushToTalkIcon : muted ? mutedIcon :
clipping ? clippingIcon : gated ? gatedIcon : unmutedIcon
anchors.top: parent.top
anchors.left: parent.left
width: parent.width
height: parent.parent.height
}
}
LinearGradient {
anchors { fill: mask }
visible: mask.visible && !micBar.muted
source: mask
start: Qt.point(0, 0)
end: Qt.point(0, bar.height)
rotation: 180
gradient: Gradient {
GradientStop {
position: 0.0
color: colors.greenStart
}
GradientStop {
position: 0.5
color: colors.greenEnd
}
GradientStop {
position: 1.0
color: colors.yellow
}
ColorOverlay {
visible: level > 0 && !micBar.muted && !micBar.clipping
anchors { fill: maskImage }
source: maskImage
color: "#b2b2b2"
}
}
}

View file

@ -1,20 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18.338" height="32" fill="none" version="1.1" viewBox="0 0 18.338 32" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g transform="translate(-7)" clip-path="url(#clip0)">
<path d="m25.338 4.1345-1.467 1.4671c-1.9339-2.1339-4.668-3.5343-7.8022-3.5343-3.0008 0-5.6682 1.3337-7.602 3.3342l-1.4671-1.4671c2.2673-2.4006 5.5348-3.9344 9.0691-3.9344 3.6677 0 7.0019 1.6004 9.2692 4.1345zm-3.4007 3.4014-1.4671 1.4671c-1.0002-1.3337-2.6007-2.1339-4.4012-2.1339-1.6671 0-3.1342 0.80022-4.2011 1.9339l-1.4671-1.4671c1.4004-1.5338 3.4009-2.534 5.6682-2.534 2.334 0 4.4679 1.067 5.8683 2.7341zm-3.9801 22.621c0 1.0199-0.8268 1.8467-1.8467 1.8467s-1.8466-0.8268-1.8466-1.8467 0.8267-1.8467 1.8466-1.8467 1.8467 0.8268 1.8467 1.8467zm0.4057-19.077h-4.2035l0.8519 14.774h2.4751z" clip-rule="evenodd" fill="#ea4c5f" fill-rule="evenodd"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="32" height="32" fill="#fff"/>
</clipPath>
</defs>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 22" style="enable-background:new 0 0 16 22;" xml:space="preserve">
<g>
<g>
<path d="M8,10.07c0.98,0,1.79-0.8,1.79-1.77V1.77C9.79,0.8,8.98,0,8,0C7.02,0,6.21,0.8,6.21,1.77v6.52
C6.21,9.27,7.02,10.07,8,10.07z M8,14.55c0.99,0,1.79-0.79,1.79-1.77S8.99,11,8,11s-1.79,0.79-1.79,1.77S7.01,14.55,8,14.55z
M14.8,7.8c-0.66,0-1.2,0.53-1.2,1.19v1.05c0,3.32-2.51,6.03-5.6,6.03s-5.6-2.7-5.6-6.03V8.99c0-0.66-0.54-1.19-1.2-1.19
S0,8.33,0,8.99v1.05c0,4.21,2.96,7.71,6.8,8.31v1.27H4.15c-0.66,0-1.2,0.53-1.2,1.19c0,0.66,0.54,1.19,1.2,1.19h7.69
c0.66,0,1.2-0.53,1.2-1.19c0-0.66-0.54-1.19-1.2-1.19H9.2v-1.27c3.84-0.61,6.8-4.11,6.8-8.31V8.99C16,8.33,15.46,7.8,14.8,7.8z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 977 B

View file

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14.666" height="32" fill="none" version="1.1" viewBox="0 0 14.666 32" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m7.1999 4.7259c1.305 0 2.3629-1.0579 2.3629-2.3629 0-1.305-1.0579-2.3629-2.3629-2.3629-1.3051 0-2.363 1.0579-2.363 2.3629 0 1.305 1.0579 2.3629 2.363 2.3629zm2.4668 7.0745v2.9333h-4.9333v-2.9333c0-1.3334 1.1333-2.4 2.4666-2.4 1.4 0 2.4667 1.0666 2.4667 2.4zm-4.9333 8.3328v-2.8666h4.9333v2.8666c0 1.3333-1.1334 2.4-2.4667 2.4s-2.4666-1.0667-2.4666-2.4zm9.9331 0.4668v-3.5333c0-0.6667-0.6-1.1333-1.2-1.1333-0.6667 0-1.1333 0.5333-1.1333 1.1999v3.4667c0 2.4666-2.2667 4.4666-5 4.4666s-4.9999-2-4.9999-4.4666v-3.5333c0-0.6667-0.4667-1.2-1.0667-1.2-0.66661-0.0667-1.2666 0.4-1.2666 1.0666v3.6667c0 3.3999 2.6666 6.1999 6.1333 6.7332v2.2666h-2.8667c-0.6666 0-1.2 0.5334-1.2 1.2 0 0.6667 0.5334 1.2 1.2 1.2h8.1999c0.6667 0 1.2-0.5333 1.2-1.2 0-0.6666-0.5333-1.2-1.2-1.2h-2.9333v-2.2666c3.4666-0.6 6.1333-3.3333 6.1333-6.7332z" clip-rule="evenodd" fill="#00b4ef" fill-opacity=".7" fill-rule="evenodd"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 22" style="enable-background:new 0 0 16 22;" xml:space="preserve">
<path d="M14.8,7.8c-0.66,0-1.2,0.53-1.2,1.19v1.05c0,3.32-2.51,6.03-5.6,6.03s-5.6-2.7-5.6-6.03V8.99c0-0.66-0.54-1.19-1.2-1.19
S0,8.33,0,8.99v1.05c0,4.21,2.96,7.71,6.8,8.31v1.27H4.15c-0.66,0-1.2,0.53-1.2,1.19c0,0.66,0.54,1.19,1.2,1.19h7.69
c0.66,0,1.2-0.53,1.2-1.19c0-0.66-0.54-1.19-1.2-1.19H9.2v-1.27c3.84-0.61,6.8-4.11,6.8-8.31V8.99C16,8.33,15.46,7.8,14.8,7.8z
M8,9.05c0.99,0,1.79-0.79,1.79-1.77S8.99,5.5,8,5.5S6.21,6.3,6.21,7.28S7.01,9.05,8,9.05z M8,3.55c0.99,0,1.79-0.79,1.79-1.77
S8.99,0,8,0S6.21,0.79,6.21,1.77S7.01,3.55,8,3.55z M8,14.55c0.99,0,1.79-0.79,1.79-1.77S8.99,11,8,11s-1.79,0.79-1.79,1.77
S7.01,14.55,8,14.55z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 996 B

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18.831" height="31.718" fill="none" version="1.1" viewBox="0 0 18.831 31.718" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m18.644 4.1333-1.4666 1.4666c-1.9333-2.1333-4.6666-3.5333-7.7999-3.5333-3 0-5.6666 1.3333-7.5999 3.3333l-1.4666-1.4666c2.2666-2.4 5.5333-3.9333 9.0666-3.9333 3.6666 0 6.9999 1.6 9.2665 4.1333zm-4.8664 4.8674 1.4667-1.4666c-1.4-1.6666-3.5333-2.7333-5.8666-2.7333-2.2667 0-4.2666 0.99999-5.6666 2.5333l1.4666 1.4666c1.0667-1.1333 2.5333-1.9333 4.2-1.9333 1.7999 0 3.3999 0.79999 4.3999 2.1333zm-1.8974 3.0751v-0.3262c0-1.3051-1.104-2.3492-2.4028-2.3492-1.2988 0-2.4028 1.0441-2.4028 2.3492v4.5025zm-4.3373 9.4371-1.9317 1.6974c0.8846 1.0496 2.3028 1.7208 3.8661 1.7208 2.6626 0 4.8706-1.9576 4.8706-4.3721v-3.3932c0-0.6526 0.4546-1.1746 1.104-1.1746 0.5844 0 1.1689 0.4568 1.1689 1.1093v3.4585c0 3.328-2.5976 6.0687-5.9745 6.5908v2.2186h2.8574c0.6494 0 1.1689 0.5221 1.1689 1.1746 0 0.6526-0.5195 1.1746-1.1689 1.1746h-7.9877c-0.6494 0-1.169-0.522-1.169-1.1746 0-0.6525 0.5196-1.1746 1.169-1.1746h2.7924v-2.2186c-1.7757-0.2348-3.3496-1.1453-4.4314-2.4155l-1.9328 1.6984c-0.45458 0.3915-1.1689 0.3263-1.5586-0.1305l-0.12988-0.1305c-0.38965-0.4568-0.32471-1.1746 0.12988-1.5661l16.495-14.617c0.4546-0.39153 1.1689-0.32627 1.5586 0.13047l0.1299 0.1305c0.3896 0.5221 0.3247 1.1746-0.065 1.6314l-6.6238 5.8206v2.4002c0 1.3051-1.104 2.3492-2.4028 2.3492-0.8086 0-1.5031-0.3671-1.9345-0.938zm-3.9751-5.521c0.5844 0 1.039 0.522 1.039 1.1745v1.3051l-2.2729 2.0229v-3.4585c0.06494-0.5873 0.58447-1.1093 1.2339-1.044z" clip-rule="evenodd" fill="#ea4c5f" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18.831" height="31.718" fill="none" version="1.1" viewBox="0 0 18.831 31.718" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m18.644 4.1333-1.4666 1.4666c-1.9333-2.1333-4.6666-3.5333-7.7999-3.5333-3 0-5.6666 1.3333-7.5999 3.3333l-1.4666-1.4666c2.2666-2.4 5.5333-3.9333 9.0666-3.9333 3.6666 0 6.9999 1.6 9.2665 4.1333zm-4.8664 4.8674 1.4667-1.4666c-1.4-1.6666-3.5333-2.7333-5.8666-2.7333-2.2667 0-4.2666 0.99999-5.6666 2.5333l1.4666 1.4666c1.0667-1.1333 2.5333-1.9333 4.2-1.9333 1.7999 0 3.3999 0.79999 4.3999 2.1333zm-1.8974 3.0751v-0.3262c0-1.3051-1.104-2.3492-2.4028-2.3492-1.2988 0-2.4028 1.0441-2.4028 2.3492v4.5025zm-4.3373 9.4371-1.9317 1.6974c0.8846 1.0496 2.3028 1.7208 3.8661 1.7208 2.6626 0 4.8706-1.9576 4.8706-4.3721v-3.3932c0-0.6526 0.4546-1.1746 1.104-1.1746 0.5844 0 1.1689 0.4568 1.1689 1.1093v3.4585c0 3.328-2.5976 6.0687-5.9745 6.5908v2.2186h2.8574c0.6494 0 1.1689 0.5221 1.1689 1.1746 0 0.6526-0.5195 1.1746-1.1689 1.1746h-7.9877c-0.6494 0-1.169-0.522-1.169-1.1746 0-0.6525 0.5196-1.1746 1.169-1.1746h2.7924v-2.2186c-1.7757-0.2348-3.3496-1.1453-4.4314-2.4155l-1.9328 1.6984c-0.45458 0.3915-1.1689 0.3263-1.5586-0.1305l-0.12988-0.1305c-0.38965-0.4568-0.32471-1.1746 0.12988-1.5661l16.495-14.617c0.4546-0.39153 1.1689-0.32627 1.5586 0.13047l0.1299 0.1305c0.3896 0.5221 0.3247 1.1746-0.065 1.6314l-6.6238 5.8206v2.4002c0 1.3051-1.104 2.3492-2.4028 2.3492-0.8086 0-1.5031-0.3671-1.9345-0.938zm-3.9751-5.521c0.5844 0 1.039 0.522 1.039 1.1745v1.3051l-2.2729 2.0229v-3.4585c0.06495-0.5873 0.58447-1.1093 1.2339-1.044z" clip-rule="evenodd" fill="#ea4c5f" fill-rule="evenodd"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 22" style="enable-background:new 0 0 20 22;" xml:space="preserve">
<path d="M14.11,10.55V7.49l5.54-5.44c0.47-0.46,0.47-1.22,0-1.68c-0.47-0.46-1.24-0.46-1.71,0L0.35,17.64
c-0.47,0.46-0.47,1.22,0,1.68c0.24,0.23,0.55,0.35,0.86,0.35s0.62-0.12,0.86-0.35l2.84-2.79c1.1,0.94,2.44,1.59,3.92,1.82v1.27H6.14
c-0.67,0-1.21,0.53-1.21,1.19c0,0.66,0.54,1.19,1.21,1.19h7.77c0.67,0,1.21-0.53,1.21-1.19c0-0.66-0.54-1.19-1.21-1.19h-2.66v-1.27
c3.88-0.61,6.87-4.11,6.87-8.31V8.99c0-0.66-0.54-1.19-1.21-1.19c-0.67,0-1.21,0.53-1.21,1.19v1.05c0,0.02,0,0.05,0,0.07
c-0.03,2.85-1.93,5.23-4.44,5.81v-1.55C12.9,13.86,14.11,12.34,14.11,10.55z M8.82,15.92c-0.81-0.19-1.56-0.57-2.2-1.08l1.05-1.03
c0.35,0.24,0.73,0.43,1.15,0.56V15.92z M10.04,0L10.04,0C7.8,0,5.97,1.8,5.97,4v5.82l7.72-7.58C13.02,0.92,11.63,0,10.04,0z
M4.5,11.26c-0.08-0.4-0.12-0.81-0.12-1.23V8.99c0-0.66-0.54-1.19-1.21-1.19S1.96,8.33,1.96,8.99v1.05c0,1.11,0.21,2.17,0.59,3.15
L4.5,11.26z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Art" width="27.121" height="40.121" version="1.1" viewBox="0 0 27.121 40.121" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title>mic-ptt-a</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs>
<style>.cls-1{fill-rule:evenodd;}</style>
</defs>
<title>mic-ptt-a</title>
<path class="cls-1" d="m23.1 5.2112-1.85 1.85a13.19 13.19 0 0 0-9.82-4.46 13.35 13.35 0 0 0-9.58 4.2l-1.85-1.84a15.66 15.66 0 0 1 23.1 0.25zm-6.13 6.13 1.85-1.85a9.62 9.62 0 0 0-14.53-0.25l1.84 1.88a7.34 7.34 0 0 1 5.3-2.44 6.85 6.85 0 0 1 5.54 2.66zm-5.39-0.22a3.58 3.58 0 0 1 1.51 0.3 3.68 3.68 0 0 1 1.26 0.88 3.88 3.88 0 0 1 0.84 1.3 3.94 3.94 0 0 1 0.29 1.52v5.07a1.91 1.91 0 0 1 0.48-0.05 3.93 3.93 0 0 1 2.62 1.05 3.38 3.38 0 0 1 1.5-0.32 3.27 3.27 0 0 1 2.77 1.36 2.75 2.75 0 0 1 0.85-0.1 3.35 3.35 0 0 1 1.33 0.25 3.18 3.18 0 0 1 1.12 0.76 3.23 3.23 0 0 1 0.73 1.13 3.32 3.32 0 0 1 0.24 1.32v3.31a12.27 12.27 0 0 1-0.43 3.41l-1.36 5.65a2.67 2.67 0 0 1-1 1.55 2.89 2.89 0 0 1-1.75 0.61h-11a4.47 4.47 0 0 1-1.76-0.43 3.88 3.88 0 0 1-1.36-1.12l-5.78-7.75a3.72 3.72 0 0 1-0.8-2.35 3.64 3.64 0 0 1 0.28-1.5 3.75 3.75 0 0 1 0.84-1.27 3.9 3.9 0 0 1 2.77-1.18 4.5 4.5 0 0 1 2 0.54v-10.06a4.06 4.06 0 0 1 1.13-2.78 3.74 3.74 0 0 1 1.25-0.83 3.85 3.85 0 0 1 1.43-0.27zm0 2a1.89 1.89 0 0 0-0.74 0.12 2 2 0 0 0-1.06 1 1.92 1.92 0 0 0-0.15 0.74v15.35l-2.32-3.06a2 2 0 0 0-0.7-0.59 1.88 1.88 0 0 0-0.9-0.2 1.85 1.85 0 0 0-0.74 0.15 2 2 0 0 0-0.63 0.43 2 2 0 0 0-0.4 0.63 1.9 1.9 0 0 0-0.13 0.74 2 2 0 0 0 0.38 1.17l5.86 7.79a1.79 1.79 0 0 0 0.68 0.57 1.74 1.74 0 0 0 0.85 0.16h11a1.23 1.23 0 0 0 0.59-0.15 0.88 0.88 0 0 0 0.24-0.23 0.71 0.71 0 0 0 0.13-0.31l1.37-5.6a12 12 0 0 0 0.37-3v-3.28a1.7 1.7 0 0 0-0.43-1.07 1.31 1.31 0 0 0-0.47-0.37 1.35 1.35 0 0 0-0.59-0.11 1.46 1.46 0 0 0-0.55 0.11 1.23 1.23 0 0 0-0.46 0.32 1.64 1.64 0 0 0-0.43 1.07h-0.48v-1a1.52 1.52 0 0 0-0.12-0.66 1.61 1.61 0 0 0-0.37-0.56 1.63 1.63 0 0 0-1.22-0.54 2 2 0 0 0-1.23 0.54 1.77 1.77 0 0 0-0.36 0.53 1.57 1.57 0 0 0-0.11 0.64v1h-0.49v-1.33a2.22 2.22 0 0 0-0.58-1.44 1.71 1.71 0 0 0-0.62-0.44 1.88 1.88 0 0 0-0.79-0.12 2 2 0 0 0-0.74 0.13 1.85 1.85 0 0 0-0.63 0.41 2 2 0 0 0-0.53 1.36v1.5h-0.57v-10.4a2 2 0 0 0-0.54-1.44 1.75 1.75 0 0 0-0.63-0.44 1.73 1.73 0 0 0-0.76-0.12z" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 23.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg id="Art" width="27.2" height="40.433" version="1.1" viewBox="0 0 27.2 40.433" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata>
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<path class="st0" d="m5.2 8.4327c-0.3 0.3-0.7 0.6-1 0.9l1.8 1.9c1.4-1.5 3.3-2.4 5.3-2.4 2.2 0 4.2 0.9 5.5 2.7l1.8-1.8c-3.3-4.2-9.3-4.7-13.4-1.3zm16-1.3 1.9-1.9c-0.3-0.3-0.6-0.7-1-1-6.3-5.9-16.2-5.6-22.1 0.7l1.9 1.8c2.5-2.6 5.9-4.2 9.6-4.2 3.6 0.2 7.2 1.8 9.7 4.6zm5.6 17.2c-0.2-0.4-0.4-0.8-0.7-1.1s-0.7-0.6-1.1-0.8c-0.5-0.1-0.9-0.2-1.4-0.2-0.3 0-0.6 0-0.8 0.1-0.6-0.9-1.7-1.4-2.8-1.4-0.5 0-1 0.1-1.5 0.3-0.7-0.7-1.6-1-2.6-1.1-0.2 0-0.3 0-0.5 0.1v-5c0-0.5-0.1-1-0.3-1.5s-0.5-0.9-0.8-1.3c-0.4-0.4-0.8-0.7-1.3-0.9s-1-0.3-1.5-0.3-1 0.1-1.4 0.3c-0.5 0.2-0.9 0.5-1.3 0.8-0.7 0.7-1.1 1.7-1.1 2.8v10.1c-0.6-0.3-1.3-0.5-2-0.5-1 0-2 0.4-2.8 1.2-0.4 0.4-0.6 0.8-0.8 1.3s-0.3 1-0.3 1.5c0 0.9 0.3 1.7 0.8 2.4l5.8 7.8c0.4 0.5 0.8 0.9 1.4 1.1 0.6 0.3 1.2 0.4 1.8 0.4h11c0.6 0 1.2-0.2 1.8-0.6 0.5-0.4 0.9-0.9 1-1.6l1.4-5.6c0.3-1.1 0.4-2.3 0.4-3.4v-3.3c-0.1-0.7-0.2-1.1-0.4-1.6zm-1.6 4.6c0 1-0.1 2-0.4 3l-1.3 5.6c0 0.1-0.1 0.2-0.1 0.3-0.1 0.1-0.1 0.2-0.2 0.2-0.3 0.1-0.5 0.2-0.7 0.2h-11c-0.3 0-0.6 0-0.8-0.2-0.3-0.1-0.5-0.3-0.7-0.6l-5.9-7.8c-0.2-0.3-0.4-0.7-0.4-1.2 0-0.3 0-0.5 0.1-0.7s0.2-0.4 0.4-0.6 0.4-0.3 0.6-0.4 0.5-0.2 0.7-0.2c0.3 0 0.6 0.1 0.9 0.2s0.5 0.3 0.7 0.6l2.3 3.1v-15.3c0-0.3 0.1-0.5 0.2-0.7 0.2-0.5 0.6-0.8 1.1-1 0.3-0.2 0.5-0.2 0.8-0.2s0.5 0 0.8 0.1c0.2 0.1 0.5 0.2 0.6 0.4 0.4 0.4 0.6 0.9 0.5 1.4v10.4h0.6v-1.5c0-0.5 0.2-1 0.5-1.4 0.2-0.2 0.4-0.3 0.6-0.4s0.5-0.1 0.7-0.1c0.3 0 0.5 0 0.8 0.1 0.2 0.1 0.4 0.2 0.6 0.4 0.4 0.4 0.6 0.9 0.6 1.4v1.3h0.5v-1c0-0.2 0-0.4 0.1-0.6s0.2-0.4 0.4-0.5c0.3-0.3 0.8-0.5 1.2-0.5 0.5 0 0.9 0.2 1.2 0.5 0.2 0.2 0.3 0.3 0.4 0.6 0.1 0.2 0.1 0.4 0.1 0.7v1h0.5c0-0.4 0.2-0.8 0.4-1.1 0.1-0.1 0.3-0.3 0.5-0.3 0.2-0.1 0.4-0.1 0.6-0.1s0.4 0 0.6 0.1 0.3 0.2 0.5 0.4c0.3 0.3 0.4 0.7 0.4 1.1z" fill="#fff"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 14 22" style="enable-background:new 0 0 14 22;" xml:space="preserve">
<path d="M0.69,3.64c0.32,0.19,0.74,0.08,0.93-0.25C2.34,2.14,3.67,1.37,5.1,1.37s2.77,0.77,3.48,2.02c0.13,0.22,0.35,0.34,0.59,0.34
c0.12,0,0.23-0.03,0.34-0.09C9.84,3.45,9.95,3.03,9.76,2.7C8.8,1.04,7.02,0,5.11,0s-3.7,1.04-4.66,2.7
C0.26,3.03,0.37,3.45,0.69,3.64z M12.87,12.23c-0.42,0-0.8,0.23-1,0.61c-0.01,0.01-0.08,0.14-0.23,0.14c-0.19,0-0.24-0.24-0.26-0.29
c-0.05-0.59-0.54-1.05-1.13-1.05c-0.42,0-0.81,0.24-1.01,0.64c0,0-0.06,0.11-0.22,0.11c-0.2,0-0.24-0.17-0.25-0.27
c-0.03-0.6-0.53-1.07-1.13-1.07c-0.42,0-0.81,0.24-1.01,0.63c0,0-0.07,0.13-0.22,0.13c-0.14,0-0.25-0.11-0.25-0.25v-5.2
c0-0.56-0.42-1.04-0.95-1.09c-0.3-0.03-0.59,0.07-0.81,0.27c-0.22,0.2-0.35,0.49-0.35,0.79v8.8c0,0.12-0.06,0.21-0.17,0.26
c-0.11,0.04-0.22,0.02-0.3-0.06l-1.76-1.77c-0.4-0.4-1.03-0.44-1.44-0.1c-0.23,0.2-0.37,0.47-0.38,0.77
c-0.01,0.29,0.09,0.58,0.29,0.79l3.1,4.12c0.37,0.6,1.99,2,2.42,2.21C6.62,21.77,7.53,22,8.45,22c1.13,0,2.22-0.34,3.13-0.98
c1.49-0.92,2.42-2.6,2.42-4.38v-3.27C14.01,12.75,13.5,12.23,12.87,12.23z M5.1,2.34c-1.04,0-2.02,0.56-2.54,1.47
C2.37,4.14,2.49,4.56,2.81,4.75C3.13,4.93,3.55,4.82,3.74,4.5C4.02,4.01,4.54,3.7,5.1,3.7s1.08,0.3,1.37,0.79
c0.13,0.22,0.35,0.34,0.59,0.34c0.12,0,0.23-0.03,0.34-0.09c0.32-0.19,0.43-0.61,0.25-0.93C7.12,2.9,6.15,2.34,5.1,2.34z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 22" style="enable-background:new 0 0 16 22;" xml:space="preserve">
<path d="M7.95,10.03c-0.38,0-0.73,0.21-0.91,0.56c-0.01,0.02-0.07,0.12-0.2,0.12c-0.13,0-0.23-0.1-0.23-0.23V5.77
c0-0.51-0.38-0.95-0.87-0.99C5.47,4.75,5.2,4.83,5,5.02C4.8,5.2,4.69,5.46,4.69,5.73v7.99c0,0.01,0,0.02-0.01,0.04l3.64-3.65
C8.21,10.06,8.08,10.03,7.95,10.03z M1.62,3.3c0.29,0.17,0.67,0.07,0.84-0.22c0.65-1.13,1.87-1.84,3.17-1.84s2.52,0.7,3.17,1.84
c0.11,0.2,0.32,0.31,0.53,0.31c0.11,0,0.21-0.03,0.31-0.08c0.29-0.17,0.4-0.55,0.23-0.85C9,0.94,7.37,0,5.63,0
C3.89,0,2.27,0.94,1.39,2.45C1.22,2.75,1.32,3.13,1.62,3.3z M15.69,6.26c-0.41-0.41-1.08-0.41-1.5,0L0.31,20.19
c-0.41,0.41-0.41,1.09,0,1.5C0.52,21.9,0.79,22,1.06,22s0.54-0.1,0.75-0.31l3.26-3.27c0.49,0.44,1,0.85,1.21,0.95
c0.73,0.4,1.56,0.61,2.4,0.61c1.03,0,2.02-0.31,2.85-0.89c1.36-0.84,2.2-2.36,2.2-3.97v-2.97c0-0.57-0.46-1.04-1.03-1.04
c-0.16,0-0.32,0.04-0.46,0.12l3.45-3.47C16.1,7.34,16.1,6.67,15.69,6.26z M11.72,11.74l0.06-0.06
C11.77,11.7,11.75,11.72,11.72,11.74z M2.79,15.65l1.68-1.68c-0.08,0.01-0.15-0.01-0.21-0.07l-1.6-1.61
c-0.36-0.36-0.94-0.4-1.31-0.09C1.13,12.38,1,12.63,0.99,12.9c-0.01,0.26,0.08,0.52,0.27,0.71L2.79,15.65z M6.87,4.08
c0.11,0.2,0.32,0.31,0.53,0.31c0.11,0,0.21-0.03,0.31-0.08c0.29-0.17,0.4-0.55,0.23-0.85C7.47,2.64,6.58,2.12,5.63,2.12
S3.79,2.64,3.32,3.46c-0.17,0.3-0.07,0.67,0.23,0.85c0.29,0.17,0.67,0.07,0.84-0.23c0.26-0.44,0.73-0.72,1.24-0.72
S6.62,3.64,6.87,4.08z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="18.333099"
height="31.9998"
viewBox="0 0 18.333099 31.9998"
version="1.1"
id="svg4"
sodipodi:docname="mic-unmute-a.svg"
style="fill:none"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview6"
showgrid="false"
inkscape:zoom="7.375"
inkscape:cx="9"
inkscape:cy="15.9998"
inkscape:window-x="2552"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M 16.8664,5.59992 18.3331,4.13328 C 16.0664,1.59998 12.7332,0 9.0665,0 5.5333,0 2.26664,1.53331 0,3.93328 L 1.46665,5.39993 C 3.4,3.39995 6.0666,2.06664 9.0665,2.06664 c 3.1333,0 5.8666,1.39998 7.7999,3.53328 z m -3.4,3.39983 1.4667,-1.46665 c -1.4,-1.66664 -3.5333,-2.7333 -5.8666,-2.7333 -2.2666,0 -4.2666,0.99999 -5.6666,2.5333 l 1.4666,1.46665 c 1.0667,-1.13332 2.5333,-1.93331 4.2,-1.93331 1.8,0 3.3999,0.79999 4.3999,2.13331 z m -1.933,2.80065 v 2.9333 H 6.6001 v -2.9333 c 0,-1.3334 1.1333,-2.40001 2.4666,-2.40001 1.4,0 2.4667,1.06661 2.4667,2.40001 z m -4.9333,5.4662 v 2.8666 c 0,1.3333 1.1333,2.4 2.4666,2.4 1.3333,0 2.4667,-1.0667 2.4667,-2.4 v -2.8666 z m 9.9331,-0.1999 V 20.6 c 0,3.3999 -2.6667,6.1332 -6.1333,6.7332 v 2.2666 h 2.9333 c 0.6667,0 1.2,0.5334 1.2,1.2 0,0.6667 -0.5333,1.2 -1.2,1.2 H 5.1333 c -0.6666,0 -1.2,-0.5333 -1.2,-1.2 0,-0.6666 0.5334,-1.2 1.2,-1.2 H 7.9999 V 27.3332 C 4.5333,26.7999 1.8667,23.9999 1.8667,20.6 v -3.6667 c 0,-0.6666 0.59999,-1.1333 1.2666,-1.0666 0.6,0 1.0667,0.5333 1.0667,1.2 V 20.6 c 0,2.4666 2.2666,4.4666 4.9999,4.4666 2.7333,0 5,-2 5,-4.4666 v -3.4667 c 0,-0.6666 0.4666,-1.1999 1.1333,-1.1999 0.6,0 1.2,0.4666 1.2,1.1333 z"
id="path2"
inkscape:connector-curvature="0"
style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd" />
</svg>

Before

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18.333" height="32" fill="none" version="1.1" viewBox="0 0 18.333 32" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m16.866 5.5999 1.4667-1.4666c-2.2667-2.5333-5.5999-4.1333-9.2666-4.1333-3.5332 0-6.7999 1.5333-9.0665 3.9333l1.4666 1.4666c1.9334-2 4.6-3.3333 7.5998-3.3333 3.1333 0 5.8666 1.4 7.7999 3.5333zm-3.4 3.3998 1.4667-1.4666c-1.4-1.6666-3.5333-2.7333-5.8666-2.7333-2.2666 0-4.2666 0.99999-5.6666 2.5333l1.4666 1.4666c1.0667-1.1333 2.5333-1.9333 4.2-1.9333 1.8 0 3.3999 0.79999 4.3999 2.1333zm-1.933 2.8006v2.9333h-4.9333v-2.9333c0-1.3334 1.1333-2.4 2.4666-2.4 1.4 0 2.4667 1.0666 2.4667 2.4zm-4.9333 5.4662v2.8666c0 1.3333 1.1333 2.4 2.4666 2.4s2.4667-1.0667 2.4667-2.4v-2.8666zm9.9331-0.1999v3.5333c0 3.3999-2.6667 6.1332-6.1333 6.7332v2.2666h2.9333c0.6667 0 1.2 0.5334 1.2 1.2 0 0.6667-0.5333 1.2-1.2 1.2h-8.1999c-0.6666 0-1.2-0.5333-1.2-1.2 0-0.6666 0.5334-1.2 1.2-1.2h2.8666v-2.2666c-3.4666-0.5333-6.1332-3.3333-6.1332-6.7332v-3.6667c0-0.6666 0.59999-1.1333 1.2666-1.0666 0.6 0 1.0667 0.5333 1.0667 1.2v3.5333c0 2.4666 2.2666 4.4666 4.9999 4.4666s5-2 5-4.4666v-3.4667c0-0.6666 0.4666-1.1999 1.1333-1.1999 0.6 0 1.2 0.4666 1.2 1.1333z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 22" style="enable-background:new 0 0 16 22;" xml:space="preserve">
<path d="M14.8,7.8c-0.66,0-1.2,0.53-1.2,1.19v1.05c0,2.88-1.89,5.29-4.4,5.89v-1.55c1.64-0.51,2.83-2.03,2.83-3.82V4
c0-2.2-1.81-4-4.03-4S3.97,1.8,3.97,4v6.55c0,1.79,1.2,3.31,2.83,3.82v1.55c-2.51-0.59-4.4-3.01-4.4-5.89V8.99
c0-0.66-0.54-1.19-1.2-1.19S0,8.33,0,8.99v1.05c0,4.21,2.96,7.71,6.8,8.32v1.27H4.15c-0.66,0-1.2,0.53-1.2,1.19S3.48,22,4.15,22
h7.69c0.66,0,1.2-0.53,1.2-1.19s-0.54-1.19-1.2-1.19H9.2v-1.27c3.84-0.61,6.8-4.11,6.8-8.32V8.99C16,8.33,15.46,7.8,14.8,7.8z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 834 B

View file

@ -91,7 +91,20 @@ Rectangle {
Component {
id: highlightBar
Rectangle {
width: tabListView.currentItem.width
height: tabListView.currentItem.height
color: simplifiedUI.colors.darkBackground
x: tabListView.currentItem.x
Behavior on x {
SmoothedAnimation {
duration: 250
}
}
Behavior on width {
SmoothedAnimation {
duration: 250
}
}
}
}
@ -104,6 +117,7 @@ Rectangle {
orientation: ListView.Horizontal
model: tabListModel
highlight: highlightBar
highlightFollowsCurrentItem: false
interactive: contentItem.width > width
delegate: Item {
visible: model.tabTitle !== "Dev" || (model.tabTitle === "Dev" && root.developerModeEnabled)

View file

@ -122,12 +122,22 @@ Flickable {
}
HifiStylesUit.GraphikRegular {
text: "<b>CPU:</b> " + PlatformInfo.getCPUBrand()
text: "<b>CPU:</b>"
Layout.maximumWidth: parent.width
height: paintedHeight
size: 16
color: simplifiedUI.colors.text.white
wrapMode: Text.Wrap
Component.onCompleted: {
var cpu = JSON.parse(PlatformInfo.getCPU(0));
var cpuModel = cpu.model;
if (cpuModel.length === 0) {
cpuModel = "Unknown";
}
text = "<b>CPU:</b> " + cpuModel;
}
}
HifiStylesUit.GraphikRegular {
@ -158,12 +168,22 @@ Flickable {
}
HifiStylesUit.GraphikRegular {
text: "<b>GPU:</b> " + PlatformInfo.getGraphicsCardType()
text: "<b>GPU:</b> "
Layout.maximumWidth: parent.width
height: paintedHeight
size: 16
color: simplifiedUI.colors.text.white
wrapMode: Text.Wrap
Component.onCompleted: {
var gpu = JSON.parse(PlatformInfo.getGPU(0));
var gpuModel = gpu.model;
if (gpuModel.length === 0) {
gpuModel = "Unknown";
}
text = "<b>GPU:</b> " + gpuModel;
}
}
HifiStylesUit.GraphikRegular {
@ -180,9 +200,11 @@ Flickable {
width: 200
height: 32
text: "Copy to Clipboard"
temporaryText: "Copied!"
onClicked: {
Window.copyToClipboard(root.buildPlatformInfoTextToCopy());
showTemporaryText();
}
}
}
@ -206,12 +228,29 @@ Flickable {
textToCopy += "Computer Vendor/Model: " + computerVendor + "/" + computerModel + "\n";
textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n";
textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n";
textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n";
var cpu = JSON.parse(PlatformInfo.getCPU(0));
var cpuModel = cpu.model;
if (cpuModel.length === 0) {
cpuModel = "Unknown";
}
textToCopy += "CPU: " + cpuModel + "\n";
textToCopy += "# CPUs: " + PlatformInfo.getNumCPUs() + "\n";
textToCopy += "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + "\n";
textToCopy += "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB\n";
textToCopy += "GPU: " + PlatformInfo.getGraphicsCardType() + "\n";
textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None"));
var gpu = JSON.parse(PlatformInfo.getGPU(0));
var gpuModel = gpu.model;
if (gpuModel.length === 0) {
gpuModel = "Unknown";
}
textToCopy += "GPU: " + gpuModel + "\n";
textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) + "\n";
textToCopy += "\n**All Platform Info**\n";
textToCopy += JSON.stringify(JSON.parse(PlatformInfo.getPlatform()), null, 4);
return textToCopy;
}

View file

@ -16,6 +16,9 @@ import TabletScriptingInterface 1.0
Original.Button {
id: root
// The two properties below are used when calling showTemporaryText()
property string originalText: ""
property string temporaryText: ""
SimplifiedConstants.SimplifiedConstants {
id: simplifiedUI
@ -103,4 +106,31 @@ Original.Button {
horizontalAlignment: Text.AlignHCenter
text: root.text
}
Timer {
id: showTemporaryTextTimer
interval: 1500
repeat: false
running: false
onTriggered: {
buttonText.text = root.originalText;
root.originalText = "";
}
}
function showTemporaryText() {
if (root.temporaryText === "") {
return;
}
if (showTemporaryTextTimer.running) {
showTemporaryTextTimer.restart();
return;
}
root.originalText = buttonText.text;
buttonText.text = root.temporaryText;
showTemporaryTextTimer.start();
}
}

View file

@ -141,7 +141,7 @@ Rectangle {
id: avatarButtonContainer
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 16
anchors.leftMargin: 2
width: 48
height: width
@ -210,7 +210,7 @@ Rectangle {
id: inputDeviceButton
anchors.verticalCenter: parent.verticalCenter
anchors.left: avatarButtonContainer.right
anchors.leftMargin: 6
anchors.leftMargin: 2
width: 32
height: width
}
@ -220,7 +220,7 @@ Rectangle {
id: outputDeviceButtonContainer
anchors.verticalCenter: parent.verticalCenter
anchors.left: inputDeviceButton.right
anchors.leftMargin: 2
anchors.leftMargin: 7
width: 32
height: width
@ -232,9 +232,8 @@ Rectangle {
AudioScriptingInterface.systemInjectorGain === simplifiedUI.numericConstants.mutedValue
source: outputDeviceButton.outputMuted ? "./images/outputDeviceMuted.svg" : "./images/outputDeviceLoud.svg"
anchors.centerIn: parent
width: 20
height: 20
fillMode: Image.PreserveAspectFit
width: outputDeviceButton.outputMuted ? 25 : 26
height: 22
visible: false
}
@ -283,7 +282,7 @@ Rectangle {
id: statusButton
property string currentStatus
anchors.centerIn: parent
width: 15
width: 22
height: width
radius: width/2
visible: false
@ -304,6 +303,21 @@ Rectangle {
}
}
Image {
id: statusIcon
source: statusButton.currentStatus === "available" ? "images/statusPresent.svg" : "images/statusAway.svg"
anchors.centerIn: parent
width: statusButton.currentStatus === "busy" ? 13 : 14
height: statusButton.currentStatus === "busy" ? 2 : 10
}
ColorOverlay {
anchors.fill: statusIcon
opacity: statusButton.currentStatus ? (statusButtonMouseArea.containsMouse ? 1.0 : 0.7) : 0.7
source: statusIcon
color: "#ffffff"
}
MouseArea {
id: statusButtonMouseArea
anchors.fill: parent
@ -329,8 +343,8 @@ Rectangle {
id: hmdButtonContainer
anchors.verticalCenter: parent.verticalCenter
anchors.right: settingsButtonContainer.left
anchors.rightMargin: 14
width: 32
anchors.rightMargin: 8
width: 48
height: width
visible: false
@ -338,9 +352,8 @@ Rectangle {
id: displayModeImage
source: HMD.active ? "./images/desktopMode.svg" : "./images/vrMode.svg"
anchors.centerIn: parent
width: 29
height: 16
fillMode: Image.PreserveAspectFit
width: HMD.active ? 25 : 43
height: 22
visible: false
}
@ -399,17 +412,16 @@ Rectangle {
id: settingsButtonContainer
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 16
width: 32
anchors.rightMargin: 3
width: 36
height: width
Image {
id: settingsButtonImage
source: "./images/settings.svg"
anchors.centerIn: parent
width: 20
height: 20
fillMode: Image.PreserveAspectFit
width: 22
height: 22
visible: false
}

View file

@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30.941" height="22.781" fill="none" version="1.1" viewBox="0 0 30.941 22.781" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m29.57 1.4006c0.441 0.44032 0.7894 0.96444 1.0247 1.5415 0.2353 0.57705 0.3527 1.1954 0.3453 1.8185v9.06c0.0066 0.629-0.111 1.2531-0.3461 1.8366-0.2351 0.5834-0.583 1.1147-1.0239 1.5634-0.4179 0.4646-0.9304 0.8343-1.503 1.0844-0.5727 0.2501-1.1922 0.3747-1.817 0.3656h-9.69v2.11h6.33c0.2652 0 0.5196 0.1054 0.7071 0.2929 0.1876 0.1876 0.2929 0.4419 0.2929 0.7071s-0.1053 0.5196-0.2929 0.7071c-0.1875 0.1876-0.4419 0.2929-0.7071 0.2929h-14.53c-0.73 0-1.09-0.34-1.09-1s0.36001-1 1.09-1h6.25v-2.11h-9.92c-0.62489 0.0098-1.2446-0.1146-1.8173-0.3647-0.57272-0.2502-1.0851-0.6202-1.5027-1.0853-0.44084-0.4487-0.78878-0.98-1.0239-1.5634-0.23509-0.5835-0.35272-1.2076-0.34613-1.8366v-9.06c-0.007379-0.62314 0.11003-1.2414 0.34532-1.8185 0.23529-0.57706 0.58369-1.1012 1.0247-1.5415 0.42558-0.45144 0.94066-0.80913 1.5123-1.0502 0.57167-0.24106 1.1873-0.36021 1.8077-0.34981h21.56c0.6202-0.0091691 1.2355 0.11053 1.807 0.35152 0.5715 0.24099 1.0867 0.59802 1.513 1.0485zm-0.82 3.36c0.0079-0.33937-0.0536-0.67677-0.1809-0.99147-0.1272-0.3147-0.3175-0.60005-0.5591-0.83853-0.2262-0.23901-0.4992-0.42893-0.802-0.55795-0.3028-0.12903-0.6289-0.1944-0.958-0.19205h-21.56c-0.32929-0.00355-0.65573 0.06127-0.95868 0.19037-0.30295 0.12909-0.57581 0.31965-0.80132 0.55963-0.24352 0.23703-0.43506 0.52212-0.56246 0.83717-0.12739 0.31505-0.18785 0.65315-0.17754 0.99283v9.06c-0.01049 0.3412 0.04985 0.6809 0.17722 0.9976 0.12736 0.3167 0.31899 0.6035 0.56278 0.8424 0.22601 0.2387 0.49919 0.4277 0.80218 0.5551 0.303 0.1274 0.62918 0.1904 0.95782 0.1849h21.56c0.3285 0.0043 0.6543-0.0593 0.9571-0.1866s0.5762-0.3157 0.8029-0.5534c0.2419-0.2403 0.4322-0.5274 0.5595-0.8438 0.1272-0.3163 0.1886-0.6553 0.1805-0.9962z" fill="#000"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 25 22" style="enable-background:new 0 0 25 22;" xml:space="preserve">
<path d="M23.24,0H1.77C0.79,0,0,0.8,0,1.78v12.2c0,0.98,0.79,1.78,1.77,1.78h9.22v3.17H7.85c-0.83,0-1.52,0.69-1.52,1.53
S7.02,22,7.85,22h9.29c0.83,0,1.52-0.69,1.52-1.53s-0.68-1.53-1.52-1.53h-3.13v-3.17h9.22c0.97,0,1.77-0.8,1.77-1.78V1.78
C25.02,0.8,24.22,0,23.24,0z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 629 B

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="23.56" height="26.476" fill="none" version="1.1" viewBox="0 0 23.56 26.476" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m23.207 10.353c-0.0809-0.1096-0.1864-0.1987-0.3079-0.2601-0.1216-0.0613-0.2559-0.0933-0.3921-0.0933s-0.2705 0.032-0.3921 0.0933c-0.1216 0.0614-0.227 0.1505-0.3079 0.2601l-4.46 4.45c-0.1079 0.0831-0.1953 0.1899-0.2554 0.3121-0.0601 0.1223-0.0914 0.2567-0.0914 0.3929s0.0313 0.2706 0.0914 0.3928 0.1475 0.229 0.2554 0.3122c0.0819 0.1096 0.1883 0.1987 0.3107 0.26 0.1224 0.0614 0.2574 0.0933 0.3943 0.0933s0.2719-0.0319 0.3943-0.0933c0.1224-0.0613 0.2288-0.1504 0.3107-0.26l4.45-4.45c0.1097-0.082 0.1987-0.1883 0.2601-0.3107 0.0613-0.1224 0.0932-0.2574 0.0932-0.3943s-0.0319-0.2719-0.0932-0.3943c-0.0614-0.1224-0.1504-0.2288-0.2601-0.3107zm0 5.86c0.1097-0.082 0.1987-0.1883 0.2601-0.3107 0.0613-0.1224 0.0932-0.2574 0.0932-0.3943s-0.0319-0.2719-0.0932-0.3943c-0.0614-0.1224-0.1504-0.2288-0.2601-0.3107l-4.45-4.45c-0.0819-0.1097-0.1883-0.1987-0.3107-0.2601-0.1224-0.0613-0.2574-0.0933-0.3943-0.0933s-0.2719 0.032-0.3943 0.0933c-0.1224 0.0614-0.2288 0.1504-0.3107 0.2601-0.1079 0.0831-0.1953 0.1899-0.2554 0.3121-0.0601 0.1223-0.0914 0.2567-0.0914 0.3929s0.0313 0.2706 0.0914 0.3928 0.1475 0.229 0.2554 0.3122l4.46 4.45c0.0809 0.1096 0.1863 0.1986 0.3079 0.26s0.2559 0.0934 0.3921 0.0934 0.2705-0.032 0.3921-0.0934c0.1215-0.0614 0.227-0.1504 0.3079-0.26z" fill="#000"/>
<path d="m10.341 1.0357c0.3782-0.48138 0.9083-0.82052 1.5039-0.96216 0.5956-0.14164 1.2216-0.07743 1.7761 0.18216 0.6142 0.17933 1.1481 0.56434 1.5122 1.0905 0.3641 0.52616 0.5363 1.1615 0.4878 1.7995v0.55001 1.41c0 0.58-0.05 1.18-0.08 1.83s0 1.3 0 2v14.34c0.0746 0.634-0.0599 1.2749-0.383 1.8255-0.3231 0.5505-0.8172 0.9805-1.407 1.2245-0.3071 0.0833-0.6223 0.1336-0.94 0.15-0.4473 0.0083-0.8906-0.0856-1.2961-0.2745-0.4055-0.1888-0.7625-0.4678-1.0439-0.8155-2-2.19-3.39-3.7-4.22-4.53-0.07888-0.0913-0.17528-0.1657-0.28351-0.219-0.10822-0.0532-0.22607-0.0842-0.34649-0.091h-1.33c-0.5977 0.0074-1.1954-0.0194-1.79-0.08-0.33315-0.0238-0.6578-0.116-0.95373-0.2708-0.29594-0.1549-0.55679-0.3691-0.76624-0.6292-0.45471-0.5112-0.72881-1.1577-0.78003-1.84v-8.82c-0.010075-0.39268 0.068268-0.7826 0.22925-1.1409 0.16098-0.35831 0.40047-0.67584 0.70074-0.92909 0.627-0.54844 1.4373-0.84114 2.27-0.82001h2.42c0.12092-0.00919 0.23886-0.04218 0.34698-0.09709 0.10812-0.05492 0.20428-0.13068 0.28302-0.2229 0.97334-1.12 2.3367-2.6733 4.09-4.66zm-1.1 5.86c-0.36 0.37-0.91001 1-1.64 1.8-0.21506 0.26203-0.52331 0.4305-0.85999 0.47h-3.83v8.28h3.91c0.11347-5e-3 0.22682 0.0127 0.33331 0.0522s0.20395 0.1 0.28668 0.1778l2.11 2.35c0.21717 0.2771 0.45449 0.5378 0.70999 0.78l1 1.09c0.1508 0.1381 0.2821 0.2962 0.39 0.47l0.47 0.47 0.31 0.55v-20.24l-1.17 1.41c-0.92 1.04-1.55 1.78-2.02 2.34z" fill="#000"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 25 22" style="enable-background:new 0 0 25 22;" xml:space="preserve">
<path d="M1.23,15.44h0.95l9.04-8.98V3.22c0-1.03-1.32-1.55-2.1-0.82L5.15,6.22C4.92,6.43,4.61,6.55,4.28,6.55H1.23
C0.55,6.55,0,7.07,0,7.71v6.57C0,14.92,0.55,15.44,1.23,15.44z M21.53,2.57l0.3-0.3c0.52-0.52,0.52-1.36,0-1.88s-1.37-0.52-1.9,0
L0.47,19.72c-0.52,0.52-0.52,1.36,0,1.88C0.73,21.87,1.07,22,1.41,22c0.34,0,0.69-0.13,0.95-0.39l4.35-4.32l2.41,2.31
c0.77,0.73,2.1,0.21,2.1-0.82v-5.97l3.79-3.76c0.47,0.53,0.75,1.22,0.75,1.94c0,1.04-0.56,2.01-1.47,2.53
c-0.37,0.22-0.5,0.69-0.29,1.06c0.15,0.25,0.41,0.39,0.68,0.39c0.13,0,0.27-0.03,0.39-0.1c1.39-0.8,2.25-2.28,2.25-3.88
c0-1.14-0.45-2.23-1.21-3.04l1.65-1.64C18.94,7.58,19.6,9.23,19.6,11c0,2.46-1.34,4.76-3.49,6c-0.37,0.22-0.5,0.69-0.29,1.06
c0.15,0.25,0.41,0.39,0.68,0.39c0.13,0,0.27-0.03,0.39-0.1c2.63-1.51,4.27-4.33,4.27-7.35c0-2.18-0.82-4.22-2.29-5.78l1.55-1.54
c1.92,1.95,3.01,4.57,3.01,7.32c0,3.73-2.02,7.2-5.27,9.07c-0.37,0.22-0.5,0.69-0.29,1.06c0.15,0.25,0.41,0.39,0.68,0.39
c0.13,0,0.27-0.03,0.39-0.1C22.68,19.27,25,15.28,25,11C25,7.83,23.75,4.82,21.53,2.57z"/>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,13 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="26.34" height="26.48" fill="none" version="1.1" viewBox="0 0 26.34 26.48" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m25.675 11.57c0.4076 0.4141 0.6449 0.966 0.6651 1.5466v0.1238c0.0042 0.3038-0.0527 0.6053-0.167 0.8868s-0.2839 0.5372-0.4987 0.752c-0.2149 0.2149-0.4706 0.3844-0.752 0.4988-0.2815 0.1143-0.5831 0.1711-0.8869 0.1669-0.3355 8e-4 -0.6656-0.0844-0.9589-0.2474-0.3766-0.0257-0.747-0.1092-1.0982-0.2475-0.2256 1.0915-0.6334 2.1373-1.2063 3.0934 0.3383 0.1098 0.6351 0.3202 0.8506 0.6032h0.1237c0.2959 0.1271 0.5763 0.2879 0.8353 0.4794 0.2297 0.2182 0.4127 0.4809 0.5378 0.7721 0.125 0.2911 0.1894 0.6047 0.1894 0.9216 0 0.3168-0.0644 0.6304-0.1894 0.9216-0.1251 0.2911-0.3081 0.5538-0.5378 0.772-0.4755 0.3895-1.0713 0.6024-1.686 0.6024s-1.2103-0.2129-1.6858-0.6024c-0.1975-0.2634-0.3636-0.5489-0.495-0.8507 0 0 0-0.1237-0.1082-0.1237-0.1366-0.0967-0.2512-0.221-0.3365-0.3649s-0.1393-0.3042-0.1585-0.4703c-0.9266 0.5763-1.9476 0.9847-3.016 1.2064 0.1319 0.3478 0.2153 0.7121 0.2475 1.0827 0.1498 0.3031 0.229 0.6362 0.2319 0.9744 0.0075 0.6273-0.2313 1.2326-0.665 1.6859-0.1939 0.2211-0.4312 0.3999-0.6974 0.525-0.2661 0.1251-0.5553 0.1938-0.8493 0.2019-0.3179-7e-4 -0.6324-0.0654-0.9247-0.1903s-0.5564-0.3074-0.7766-0.5366c-0.2267-0.2181-0.4068-0.4801-0.5291-0.7699s-0.1843-0.6015-0.1824-0.916c0.0028-0.3382 0.0822-0.6713 0.232-0.9744 0.0245-0.3718 0.108-0.7372 0.2474-1.0827-1.0935-0.2189-2.1404-0.6272-3.0934-1.2064-0.13354 0.2927-0.29406 0.5723-0.47946 0.8352l-0.12377 0.1237c-0.04312 0.3351-0.2151 0.6403-0.47946 0.8507-0.22555 0.2094-0.4912 0.3709-0.78099 0.4745-0.28979 0.1037-0.59764 0.1475-0.90485 0.1287-0.30958 0.0191-0.61986-0.0244-0.91221-0.1281-0.29234-0.1036-0.5608-0.2652-0.7892-0.4751-0.22782-0.2193-0.40902-0.4824-0.5328-0.7734-0.12379-0.291-0.18758-0.604-0.18758-0.9202 0-0.3163 0.06379-0.6293 0.18758-0.9203 0.12378-0.291 0.30498-0.554 0.5328-0.7734 0.2904-0.2218 0.62143-0.3847 0.97442-0.4794 0-0.1702 0.35581-0.3712 0.85075-0.6032-0.58522-0.9517-0.99885-1.9987-1.2219-3.0934-0.30719 0.2451-0.68976 0.3762-1.0827 0.3712v-0.1237c-0.27587 0.2028-0.61935 0.2915-0.95893 0.2474-0.63061 3e-4 -1.2381-0.2371-1.7013-0.665-0.23125-0.2055-0.41581-0.4582-0.54121-0.741-0.1254-0.2828-0.18876-0.5892-0.18578-0.8985 9.9624e-4 -0.3156 0.06594-0.6276 0.19088-0.9174 0.12494-0.2897 0.30734-0.5512 0.53611-0.7685 0.22023-0.2292 0.48434-0.4117 0.77665-0.5366s0.60679-0.1897 0.92467-0.1904c0.33503 0.0032 0.66421 0.0882 0.95893 0.2475 0.37013 0.0252 0.73475 0.1034 1.0827 0.232 0.21231-1.0978 0.62669-2.1467 1.2219-3.0933-0.33511-0.04313-0.64032-0.21512-0.85075-0.47948h-0.12367c-0.30979-0.16124-0.59609-0.3642-0.85075-0.60321-0.43277-0.44917-0.6693-1.0519-0.6577-1.6755 0.01161-0.62362 0.27045-1.2171 0.71963-1.6499 0.44918-0.43277 1.0518-0.66938 1.6754-0.65777 0.62363 0.0116 1.2171 0.27046 1.6499 0.71964 0.23692 0.22641 0.40342 0.51644 0.47946 0.83521 0.30048 0.25161 0.512 0.59327 0.60323 0.97442 0.92503-0.65792 1.9796-1.1114 3.0934-1.3302-0.1612-0.29958-0.2461-0.63423-0.2474-0.97442v-0.10827c-0.2062-0.42346-0.2768-0.90022-0.202-1.3652 0.0747-0.46502 0.2911-0.89566 0.6195-1.2332 0.2128-0.21772 0.4683-0.38917 0.7504-0.50361 0.2821-0.11444 0.5848-0.16941 0.8891-0.16146 0.3109-0.0053511 0.6199 0.050637 0.9092 0.16476 0.2893 0.11412 0.5532 0.28413 0.7767 0.50032 0.2242 0.1913 0.405 0.42822 0.5304 0.69493s0.1923 0.55708 0.1965 0.85175c-0.0028 0.33814-0.0821 0.67126-0.2319 0.97442v0.10827c-0.0087 0.3392-0.0934 0.67214-0.2475 0.97441 1.056 0.3181 2.069 0.76483 3.016 1.3302 0.0142-0.18703 0.0653-0.36939 0.1502-0.53662 0.085-0.16723 0.2021-0.31601 0.3448-0.43779 0.1377-0.31908 0.3436-0.60415 0.6032-0.83521 0.1944-0.24043 0.4428-0.43159 0.725-0.55791 0.2822-0.12631 0.5902-0.18423 0.899-0.16904 0.2997-0.01337 0.599 0.03308 0.8805 0.13665s0.5395 0.26217 0.759 0.46656c0.2598 0.1993 0.4703 0.45571 0.6152 0.74939s0.2203 0.61676 0.2203 0.94423-0.0754 0.65054-0.2203 0.94422c-0.1449 0.29369-0.3554 0.55011-0.6152 0.7494-0.2362 0.26068-0.5265 0.46656-0.8507 0.60321-0.2883 0.22513-0.6201 0.38835-0.9744 0.47947 0.5779 0.96792 1.0252 2.0081 1.3301 3.0934 0.3032-0.1498 0.6363-0.2291 0.9745-0.232h0.1237c0.2933-0.1631 0.6234-0.2482 0.959-0.2475 0.3033 0.0194 0.5991 0.1024 0.8683 0.2436 0.2691 0.1412 0.5056 0.3375 0.6938 0.5762zm-9.0017 5.1968c0.5809-0.5759 1.0105-1.2864 1.2506-2.0684 0.2402-0.782 0.2833-1.6112 0.1257-2.4139-0.1576-0.8026-0.511-1.5539-1.029-2.1871-0.5179-0.63313-1.1843-1.1285-1.9399-1.442-0.7555-0.31354-1.5767-0.43555-2.3908-0.35517-0.814 0.08038-1.5956 0.36066-2.2753 0.81591-0.67959 0.45525-1.2362 1.0714-1.6203 1.7936-0.38412 0.7222-0.58387 1.5281-0.58143 2.3461 0.04947 1.2984 0.58636 2.5304 1.5036 3.4505 0.91727 0.9202 2.1476 1.4609 3.4458 1.5144 0.6529 0.0061 1.3004-0.1195 1.9036-0.3693 0.6033-0.2498 1.15-0.6187 1.6074-1.0846z" fill="#000"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 22 22" style="enable-background:new 0 0 22 22;" xml:space="preserve">
<path id="settings_filled_1_" d="M22,11L22,11c0-0.76-0.57-1.39-1.32-1.48l-2.54-0.3c0,0,0,0-0.01,0c-0.17-0.69-0.45-1.36-0.83-1.99
c0,0,0,0,0-0.01l1.59-2.01c0.47-0.59,0.42-1.44-0.12-1.98l0,0c-0.54-0.54-1.39-0.58-1.98-0.12l-2.01,1.59c0,0,0,0-0.01,0
c-0.63-0.38-1.3-0.65-1.99-0.82c0,0,0,0,0-0.01l-0.3-2.54C12.39,0.57,11.75,0,11,0l0,0c-0.76,0-1.39,0.57-1.48,1.32l-0.3,2.54
c0,0,0,0,0,0.01C8.52,4.04,7.85,4.32,7.22,4.69c0,0,0,0-0.01,0L5.2,3.11C4.61,2.64,3.76,2.69,3.22,3.22l0,0
C2.69,3.76,2.64,4.61,3.11,5.2l1.59,2.01c0,0,0,0,0,0.01c-0.38,0.63-0.65,1.3-0.82,1.99c0,0,0,0-0.01,0l-2.54,0.3
C0.57,9.61,0,10.25,0,11l0,0c0,0.76,0.57,1.39,1.32,1.48l2.54,0.3c0,0,0,0,0.01,0c0.17,0.69,0.45,1.36,0.83,1.99c0,0,0,0,0,0.01
L3.11,16.8c-0.47,0.59-0.42,1.44,0.12,1.98l0,0c0.54,0.54,1.39,0.58,1.98,0.12l2.01-1.59c0,0,0,0,0.01,0
c0.63,0.38,1.3,0.65,1.99,0.82c0,0,0,0,0,0.01l0.3,2.54C9.61,21.43,10.25,22,11,22l0,0c0.76,0,1.39-0.57,1.48-1.32l0.3-2.54
c0,0,0,0,0-0.01c0.69-0.17,1.36-0.45,1.99-0.83c0,0,0,0,0.01,0l2.01,1.59c0.59,0.47,1.44,0.42,1.98-0.12l0,0
c0.54-0.54,0.58-1.39,0.12-1.98l-1.59-2.01c0,0,0,0,0-0.01c0.38-0.63,0.65-1.3,0.82-1.99c0,0,0,0,0.01,0l2.54-0.3
C21.43,12.39,22,11.75,22,11z M13.98,13.29c-1.52,1.96-4.45,1.96-5.97,0c-1.04-1.33-1.04-3.25,0-4.58c1.52-1.96,4.45-1.96,5.97,0
C15.02,10.04,15.02,11.95,13.98,13.29z"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 72.48 12" style="enable-background:new 0 0 72.48 12;" xml:space="preserve">
<style type="text/css">
.st0{fill:#020202;}
</style>
<path class="st0" d="M66.48,12H6c-3.31,0-6-2.69-6-6s2.69-6,6-6h60.48c3.31,0,6,2.69,6,6S69.79,12,66.48,12z"/>
</svg>

After

Width:  |  Height:  |  Size: 530 B

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 76.13 54.75" style="enable-background:new 0 0 76.13 54.75;" xml:space="preserve">
<path d="M27.38,54.75c-1.54,0-3.07-0.59-4.24-1.76L1.76,31.61c-2.34-2.34-2.34-6.14,0-8.48c2.34-2.34,6.14-2.34,8.48,0l17.14,17.14
L65.9,1.76c2.34-2.34,6.14-2.34,8.48,0s2.34,6.14,0,8.48L31.62,53C30.44,54.18,28.9,54.75,27.38,54.75z"/>
</svg>

After

Width:  |  Height:  |  Size: 603 B

View file

@ -1,13 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="34.613" height="18.502" fill="none" version="1.1" viewBox="0 0 34.613 18.502" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m27.112 18.501h-5.47c-1 0-2-0.86-3.13-2.57-0.3008-0.5432-0.6971-1.0276-1.17-1.43l-1.17 1.41c-1.25 1.68-2.37 2.59-3.36 2.59h-5.23c-0.99178 0.0181-1.9771-0.1628-2.8978-0.5321s-1.7579-0.9194-2.4622-1.6179c-0.72014-0.6727-1.2901-1.4898-1.6727-2.3979-0.38256-0.9082-0.56906-1.8869-0.54731-2.8721v-3.58c-0.017013-0.99193 0.17144-1.9767 0.5535-2.8922s0.94946-1.7422 1.6665-2.4278c0.70151-0.70433 1.5376-1.2603 2.4584-1.6348 0.92084-0.37452 1.9076-0.55993 2.9016-0.54519h19.53c0.9864-0.0053033 1.9641 0.18507 2.8764 0.5601s1.7412 0.92727 2.4387 1.6248 1.2498 1.5264 1.6248 2.4387c0.375 0.91233 0.5654 1.89 0.5601 2.8764v3.51c0.0183 0.9778-0.1639 1.949-0.5354 2.8536-0.3715 0.9047-0.9244 1.7237-1.6246 2.4064-0.6896 0.718-1.5196 1.2864-2.4382 1.6701-0.9186 0.3836-1.9064 0.5742-2.9018 0.5599zm-9.77-6c0.83 0 1.77 0.78 2.81 2.34 0.84 1.09 1.3 1.66 1.49 1.66h5.47c0.7244 0.0102 1.4433-0.1263 2.1136-0.4013 0.6702-0.275 1.2779-0.6827 1.7864-1.1987 0.5281-0.495 0.9469-1.0951 1.2293-1.7615 0.2824-0.6665 0.4223-1.3847 0.4107-2.1085v-3.53c0.0116-0.72376-0.1283-1.442-0.4107-2.1084-0.2824-0.66649-0.7012-1.2665-1.2293-1.7616-0.5085-0.51598-1.1162-0.92372-1.7864-1.1987-0.6703-0.27497-1.3892-0.41148-2.1136-0.40132h-19.53c-0.72598-0.01094-1.4466 0.12518-2.1186 0.40015-0.67198 0.27498-1.2813 0.68312-1.7914 1.1999-0.52617 0.49655-0.94359 1.0969-1.2259 1.763s-0.4233 1.3836-0.41412 2.107v3.51c-0.00918 0.7234 0.13183 1.4409 0.41412 2.107s0.69971 1.2665 1.2259 1.763c0.50835 0.5204 1.117 0.9322 1.789 1.2106 0.67205 0.2785 1.3936 0.4178 2.121 0.4094h5.23c0.36 0 0.94-0.6 1.72-1.8 1.09-1.51 2-2.26 2.73-2.26z" fill="#000"/>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 42 22" style="enable-background:new 0 0 42 22;" xml:space="preserve">
<path d="M33.97,0H8.02C3.59,0,0,3.63,0,8.09v5.1C0,18.06,3.91,22,8.73,22h6.29c1.58,0,3.09-0.63,4.2-1.76l1.16-1.17
c0.34-0.35,0.9-0.35,1.24,0l1.16,1.17c1.12,1.13,2.63,1.76,4.2,1.76h6.99c4.43,0,8.03-3.63,8.03-8.1V8.1C41.99,3.63,38.4,0,33.97,0z
M17.41,13.39c-0.53,1.19-1.48,2.15-2.66,2.68C9.56,18.4,4.53,13.33,6.85,8.09C7.37,6.9,8.32,5.94,9.5,5.41
C14.69,3.08,19.72,8.15,17.41,13.39z M35.15,13.39c-0.53,1.19-1.48,2.15-2.66,2.68c-5.19,2.33-10.22-2.74-7.91-7.98
c0.52-1.19,1.48-2.15,2.66-2.68C32.43,3.08,37.46,8.15,35.15,13.39z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 892 B

View file

@ -2712,6 +2712,7 @@ void Application::cleanupBeforeQuit() {
// Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
QThreadPool::globalInstance()->clear();
QThreadPool::globalInstance()->waitForDone();
DependencyManager::destroy<RecordingScriptingInterface>();
@ -3742,18 +3743,6 @@ void Application::resizeGL() {
DependencyManager::get<FramebufferCache>()->setFrameBufferSize(fromGlm(renderSize));
}
auto renderResolutionScale = getRenderResolutionScale();
if (displayPlugin->getRenderResolutionScale() != renderResolutionScale) {
auto renderConfig = _graphicsEngine.getRenderEngine()->getConfiguration();
assert(renderConfig);
auto mainView = renderConfig->getConfig("RenderMainView.RenderDeferredTask");
// mainView can be null if we're rendering in forward mode
if (mainView) {
mainView->setProperty("resolutionScale", renderResolutionScale);
}
displayPlugin->setRenderResolutionScale(renderResolutionScale);
}
// FIXME the aspect ratio for stereo displays is incorrect based on this.
float aspectRatio = displayPlugin->getRecommendedAspectRatio();
_myCamera.setProjection(glm::perspective(glm::radians(_fieldOfView.get()), aspectRatio,
@ -8547,23 +8536,7 @@ void Application::shareSnapshot(const QString& path, const QUrl& href) {
}
float Application::getRenderResolutionScale() const {
auto menu = Menu::getInstance();
if (!menu) {
return 1.0f;
}
if (menu->isOptionChecked(MenuOption::RenderResolutionOne)) {
return 1.0f;
} else if (menu->isOptionChecked(MenuOption::RenderResolutionTwoThird)) {
return 0.666f;
} else if (menu->isOptionChecked(MenuOption::RenderResolutionHalf)) {
return 0.5f;
} else if (menu->isOptionChecked(MenuOption::RenderResolutionThird)) {
return 0.333f;
} else if (menu->isOptionChecked(MenuOption::RenderResolutionQuarter)) {
return 0.25f;
} else {
return 1.0f;
}
return RenderScriptingInterface::getInstance()->getViewportResolutionScale();
}
void Application::notifyPacketVersionMismatch() {

View file

@ -382,28 +382,6 @@ Menu::Menu() {
// Developer > Render > OpenVR threaded submit
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::OpenVrThreadedSubmit, 0, true);
// Developer > Render > Resolution
MenuWrapper* resolutionMenu = renderOptionsMenu->addMenu(MenuOption::RenderResolution);
QActionGroup* resolutionGroup = new QActionGroup(resolutionMenu);
resolutionGroup->setExclusive(true);
#if defined(Q_OS_MAC)
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionOne, 0, false));
#else
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionOne, 0, true));
#endif
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionTwoThird, 0, false));
#if defined(Q_OS_MAC)
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionHalf, 0, true));
#else
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionHalf, 0, false));
#endif
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionThird, 0, false));
resolutionGroup->addAction(addCheckableActionToQMenuAndActionHash(resolutionMenu, MenuOption::RenderResolutionQuarter, 0, false));
//const QString = "Automatic Texture Memory";
//const QString = "64 MB";
//const QString = "256 MB";

View file

@ -168,12 +168,6 @@ namespace MenuOption {
const QString RenderMaxTexture4096MB = "4096 MB";
const QString RenderMaxTexture6144MB = "6144 MB";
const QString RenderMaxTexture8192MB = "8192 MB";
const QString RenderResolution = "Scale Resolution";
const QString RenderResolutionOne = "1";
const QString RenderResolutionTwoThird = "2/3";
const QString RenderResolutionHalf = "1/2";
const QString RenderResolutionThird = "1/3";
const QString RenderResolutionQuarter = "1/4";
const QString RenderSensorToWorldMatrix = "Show SensorToWorld Matrix";
const QString RenderIKTargets = "Show IK Targets";
const QString RenderIKConstraints = "Show IK Constraints";

View file

@ -30,14 +30,16 @@ void RenderScriptingInterface::loadSettings() {
_shadowsEnabled = (_shadowsEnabledSetting.get());
_ambientOcclusionEnabled = (_ambientOcclusionEnabledSetting.get());
_antialiasingEnabled = (_antialiasingEnabledSetting.get());
_viewportResolutionScale = (_viewportResolutionScaleSetting.get());
});
forceRenderMethod((RenderMethod)_renderMethod);
forceShadowsEnabled(_shadowsEnabled);
forceAmbientOcclusionEnabled(_ambientOcclusionEnabled);
forceAntialiasingEnabled(_antialiasingEnabled);
forceViewportResolutionScale(_viewportResolutionScale);
}
RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod() {
RenderScriptingInterface::RenderMethod RenderScriptingInterface::getRenderMethod() const {
return (RenderMethod) _renderMethod;
}
@ -64,7 +66,7 @@ QStringList RenderScriptingInterface::getRenderMethodNames() const {
return refrenderMethodNames;
}
bool RenderScriptingInterface::getShadowsEnabled() {
bool RenderScriptingInterface::getShadowsEnabled() const {
return _shadowsEnabled;
}
@ -88,7 +90,7 @@ void RenderScriptingInterface::forceShadowsEnabled(bool enabled) {
});
}
bool RenderScriptingInterface::getAmbientOcclusionEnabled() {
bool RenderScriptingInterface::getAmbientOcclusionEnabled() const {
return _ambientOcclusionEnabled;
}
@ -112,7 +114,7 @@ void RenderScriptingInterface::forceAmbientOcclusionEnabled(bool enabled) {
});
}
bool RenderScriptingInterface::getAntialiasingEnabled() {
bool RenderScriptingInterface::getAntialiasingEnabled() const {
return _antialiasingEnabled;
}
@ -145,3 +147,37 @@ void RenderScriptingInterface::forceAntialiasingEnabled(bool enabled) {
}
float RenderScriptingInterface::getViewportResolutionScale() const {
return _viewportResolutionScale;
}
void RenderScriptingInterface::setViewportResolutionScale(float scale) {
if (_viewportResolutionScale != scale) {
forceViewportResolutionScale(scale);
emit settingsChanged();
}
}
void RenderScriptingInterface::forceViewportResolutionScale(float scale) {
// just not negative values or zero
if (scale <= 0.f) {
return;
}
_renderSettingLock.withWriteLock([&] {
_viewportResolutionScale = (scale);
_viewportResolutionScaleSetting.set(scale);
auto renderConfig = qApp->getRenderEngine()->getConfiguration();
assert(renderConfig);
auto deferredView = renderConfig->getConfig("RenderMainView.RenderDeferredTask");
// mainView can be null if we're rendering in forward mode
if (deferredView) {
deferredView->setProperty("resolutionScale", _viewportResolutionScale);
}
auto forwardView = renderConfig->getConfig("RenderMainView.RenderForwardTask");
// mainView can be null if we're rendering in forward mode
if (forwardView) {
forwardView->setProperty("resolutionScale", _viewportResolutionScale);
}
});
}

View file

@ -29,6 +29,7 @@ class RenderScriptingInterface : public QObject {
Q_PROPERTY(bool shadowsEnabled READ getShadowsEnabled WRITE setShadowsEnabled NOTIFY settingsChanged)
Q_PROPERTY(bool ambientOcclusionEnabled READ getAmbientOcclusionEnabled WRITE setAmbientOcclusionEnabled NOTIFY settingsChanged)
Q_PROPERTY(bool antialiasingEnabled READ getAntialiasingEnabled WRITE setAntialiasingEnabled NOTIFY settingsChanged)
Q_PROPERTY(float viewportResolutionScale READ getViewportResolutionScale WRITE setViewportResolutionScale NOTIFY settingsChanged)
public:
RenderScriptingInterface();
@ -66,7 +67,7 @@ public slots:
* @function Render.getRenderMethod
* @returns {number} <code>"DEFERRED"</code> or <code>"FORWARD"</code>
*/
RenderMethod getRenderMethod();
RenderMethod getRenderMethod() const;
/**jsdoc
* Sets the current render method
@ -88,7 +89,7 @@ public slots:
* @function Render.getShadowsEnabled
* @returns {bool} <code>true</code> if shadows are enabled, otherwise <code>false</code>
*/
bool getShadowsEnabled();
bool getShadowsEnabled() const;
/**jsdoc
* Enables or disables shadows
@ -102,7 +103,7 @@ public slots:
* @function Render.getAmbientOcclusionEnabled
* @returns {bool} <code>true</code> if ambient occlusion is enabled, otherwise <code>false</code>
*/
bool getAmbientOcclusionEnabled();
bool getAmbientOcclusionEnabled() const;
/**jsdoc
* Enables or disables ambient occlusion
@ -116,7 +117,7 @@ public slots:
* @function Render.getAntialiasingEnabled
* @returns {bool} <code>true</code> if anti-aliasing is enabled, otherwise <code>false</code>
*/
bool getAntialiasingEnabled();
bool getAntialiasingEnabled() const;
/**jsdoc
* Enables or disables anti-aliasing
@ -130,14 +131,14 @@ public slots:
* @function Render.getViewportResolutionScale
* @returns {number}
*/
// float getViewportResolutionScale();
float getViewportResolutionScale() const;
/**jsdoc
* Sets the current viewport resolution scale
* @function Render.setViewportResolutionScale
* @param {number} resolutionScale - between epsilon and 1.0
*/
// void setViewportResolutionScale(float resolutionScale);
void setViewportResolutionScale(float resolutionScale);
signals:
void settingsChanged();
@ -150,19 +151,22 @@ private:
int _renderMethod{ RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
bool _shadowsEnabled{ true };
bool _ambientOcclusionEnabled{ false };
bool _antialiasingEnabled { true };
bool _antialiasingEnabled{ true };
float _viewportResolutionScale{ 1.0f };
// Actual settings saved on disk
Setting::Handle<int> _renderMethodSetting { "renderMethod", RENDER_FORWARD ? render::Args::RenderMethod::FORWARD : render::Args::RenderMethod::DEFERRED };
Setting::Handle<bool> _shadowsEnabledSetting { "shadowsEnabled", true };
Setting::Handle<bool> _ambientOcclusionEnabledSetting { "ambientOcclusionEnabled", false };
Setting::Handle<bool> _antialiasingEnabledSetting { "antialiasingEnabled", true };
Setting::Handle<float> _viewportResolutionScaleSetting { "viewportResolutionScale", 1.0f };
// Force assign both setting AND runtime value to the parameter value
void forceRenderMethod(RenderMethod renderMethod);
void forceShadowsEnabled(bool enabled);
void forceAmbientOcclusionEnabled(bool enabled);
void forceAntialiasingEnabled(bool enabled);
void forceViewportResolutionScale(float scale);
static std::once_flag registry_flag;
};

View file

@ -14,10 +14,9 @@
#include <ScriptEngines.h>
#include <OffscreenUi.h>
#include <Preferences.h>
#include <RenderShadowTask.h>
#include <plugins/PluginUtils.h>
#include <display-plugins/CompositorHelper.h>
#include "scripting/RenderScriptingInterface.h"
#include "Application.h"
#include "DialogsManager.h"
#include "LODManager.h"
@ -103,6 +102,22 @@ void setupPreferences() {
preference->setItems(refreshRateProfiles);
preferences->addPreference(preference);
}
{
// Expose the Viewport Resolution Scale
auto getter = []()->float {
return RenderScriptingInterface::getInstance()->getViewportResolutionScale();
};
auto setter = [](float value) {
RenderScriptingInterface::getInstance()->setViewportResolutionScale(value);
};
auto scaleSlider = new SliderPreference(GRAPHICS_QUALITY, "Resolution Scale", getter, setter);
scaleSlider->setMin(0.25f);
scaleSlider->setMax(1.0f);
scaleSlider->setStep(0.02f);
preferences->addPreference(scaleSlider);
}
// UI
static const QString UI_CATEGORY { "User Interface" };

View file

@ -377,7 +377,7 @@ void Stats::updateStats(bool force) {
auto displayPlugin = qApp->getActiveDisplayPlugin();
if (displayPlugin) {
QVector2D dims(displayPlugin->getRecommendedRenderSize().x, displayPlugin->getRecommendedRenderSize().y);
dims *= displayPlugin->getRenderResolutionScale();
dims *= qApp->getRenderResolutionScale();
STAT_UPDATE(gpuFrameSize, dims);
STAT_UPDATE(gpuFrameTimePerPixel, (float)(gpuContext->getFrameTimerGPUAverage()*1000000.0 / double(dims.x()*dims.y())));
}

View file

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.0)
set(ENV{MACOSX_DEPLOYMENT_TARGET} 10.9)
project(HQLauncher)
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
set(src_files
@ -26,6 +27,8 @@ set(src_files
src/LatestBuildRequest.m
src/OrganizationRequest.m
src/OrganizationRequest.h
src/Interface.h
src/Interface.m
src/ErrorViewController.h
src/ErrorViewController.m
src/Settings.h
@ -67,7 +70,7 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${src_files})
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${APP_NAME}
MACOSX_BUNDLE_BUNDLE_NAME ${APP_NAME})
set_from_env(LAUNCHER_HMAC_SECRET LAUNCHER_HMAC_SECRET "")
if (LAUNCHER_HMAC_SECRET STREQUAL "")
if ("${LAUNCHER_HMAC_SECRET}" STREQUAL "")
message(FATAL_ERROR "LAUNCHER_HMAC_SECRET is not set")
endif()

View file

@ -32,6 +32,6 @@
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundleDisplayName</key>
<string>CFBundleName</string>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
</dict>
</plist>

View file

@ -69,8 +69,17 @@
<action selector="hyperLink:" target="YVh-OH-vU8" id="JfS-ot-wAP"/>
</connections>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0CN-kS-xZ5">
<rect key="frame" x="66" y="68" width="266" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="By signing in, you agree to the High Fidelity" id="zSf-YA-osu">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xeX-qc-ccB" customClass="HFButton">
<rect key="frame" x="205" y="84" width="104" height="42"/>
<rect key="frame" x="205" y="111" width="104" height="42"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="square" title="LOG IN" bezelStyle="shadowlessSquare" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="6Ba-S9-5qW">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -81,6 +90,18 @@
<action selector="login:" target="YVh-OH-vU8" id="uzF-yC-tu1"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QtF-Xs-rht" customClass="Hyperlink">
<rect key="frame" x="336" y="68" width="115" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Terms of Service" id="O5x-BW-FLk">
<font key="font" metaFont="system"/>
<color key="textColor" name="linkColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="linkColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<action selector="termsOfService:" target="YVh-OH-vU8" id="bgc-08-8Lj"/>
</connections>
</textField>
</subviews>
<point key="canvasLocation" x="138.5" y="154"/>
</customView>
@ -91,5 +112,14 @@
<outlet property="smallLogo" destination="j8K-TD-h7e" id="OVd-p3-nu6"/>
</connections>
</customObject>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="wWT-mi-6An">
<rect key="frame" x="0.0" y="0.0" width="37" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="1Uh-1I-CcU">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</objects>
</document>

View file

@ -31,4 +31,9 @@
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.highfidelity.com/hq-support"]];
}
- (IBAction)termsOfService:(id)sender
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.highfidelity.com/termsofservice"]];
}
@end

View file

@ -0,0 +1,8 @@
#import <Foundation/Foundation.h>
@interface Interface : NSObject
-(id _Nonnull) initWith:(NSString * _Nonnull) aPathToInterface;
-(NSInteger) getVersion:(out NSError * _Nullable * _Nonnull) anError;
@end

View file

@ -0,0 +1,90 @@
#import "Interface.h"
@implementation Interface
{
NSString *pathTo;
}
-(id) initWith:(NSString*)aPathToInterface
{
[self init];
self->pathTo = [NSString stringWithFormat:@"%@/Contents/MacOS/interface", aPathToInterface];
return self;
}
-(NSInteger) getVersion:(out NSError * _Nullable *) outError
{
NSTask * interface = [[NSTask alloc] init];
NSPipe * standardOut = [NSPipe pipe];
interface.launchPath = self->pathTo;
interface.arguments = @[ @"--version" ];
interface.standardOutput = standardOut;
NSLog(@"calling interface at %@", self->pathTo);
NSError *error = nil;
[interface launch];
[interface waitUntilExit];
if (0 != [interface terminationStatus]) {
*outError = [NSError errorWithDomain:@"interface"
code:-1
userInfo:@{NSUnderlyingErrorKey: error}];
return 0;
}
NSFileHandle * fh = [standardOut fileHandleForReading];
NSData * data = [fh readDataToEndOfFile];
NSString * output = [NSString stringWithUTF8String:[data bytes]];
if (output == nil) {
NSDictionary * userInfo = @{
NSLocalizedDescriptionKey: NSLocalizedString(@"Couldn't start interface", nil)
};
*outError = [NSError errorWithDomain:@"interface"
code:-1
userInfo:userInfo];
return 0;
}
// Interface returns the build version as a string like this:
// "Interface 33333-DEADBEEF". This code grabs the substring
// between "Interface " and the hyphon ("-")
NSRange start = [output rangeOfString:@"Interface "];
if (start.length == 0) {
NSDictionary * userInfo = @{
NSLocalizedDescriptionKey: NSLocalizedString(@"Couldn't read interface's version", nil)
};
*outError = [NSError errorWithDomain:@"interface"
code:-2
userInfo:userInfo];
return 0;
}
NSRange end = [output rangeOfString:@"-"];
if (end.length == 0) {
NSDictionary * userInfo = @{
NSLocalizedDescriptionKey: NSLocalizedString(@"Couldn't read interface's version", nil)
};
*outError = [NSError errorWithDomain:@"interface"
code:-2
userInfo:userInfo];
return 0;
}
NSRange subRange = {start.length, end.location - start.length};
NSString * versionStr;
@try {
versionStr = [output substringWithRange:subRange];
}
@catch (NSException *) {
NSDictionary * userInfo = @{
NSLocalizedDescriptionKey: NSLocalizedString(@"Couldn't read interface's version", nil)
};
*outError = [NSError errorWithDomain:@"interface"
code:-2
userInfo:userInfo];
return 0;
}
return versionStr.integerValue;
}
@end

View file

@ -1,17 +1,36 @@
#import "LatestBuildRequest.h"
#import "Launcher.h"
#import "Settings.h"
#import "Interface.h"
@implementation LatestBuildRequest
- (NSInteger) getCurrentVersion {
NSInteger currentVersion;
@try {
NSString* interfaceAppPath = [[Launcher.sharedLauncher getAppPath] stringByAppendingString:@"interface.app"];
NSError * error = nil;
Interface * interface = [[Interface alloc] initWith:interfaceAppPath];
currentVersion = [interface getVersion:&error];
if (currentVersion == 0 && error != nil) {
NSLog(@"can't get version from interface, falling back to settings: %@", error);
currentVersion = [Settings.sharedSettings latestBuildVersion];
}
} @catch (NSException *exception) {
NSLog(@"an exception was thrown: %@", exception);
currentVersion = [Settings.sharedSettings latestBuildVersion];
}
return currentVersion;
}
- (void) requestLatestBuildInfo {
NSMutableURLRequest *request = [NSMutableURLRequest new];
[request setURL:[NSURL URLWithString:@"https://thunder.highfidelity.com/builds/api/tags/latest?format=json"]];
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSURLSession* session = [NSURLSession sharedSession];
// We're using an ephermeral session here to ensure the tags api response is never cached.
NSURLSession * session = [NSURLSession sessionWithConfiguration:NSURLSessionConfiguration.ephemeralSessionConfiguration];
NSURLSessionDataTask* dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
@ -45,8 +64,8 @@
BOOL appDirectoryExist = [fileManager fileExistsAtPath:[[sharedLauncher getAppPath] stringByAppendingString:@"interface.app"]];
dispatch_async(dispatch_get_main_queue(), ^{
Settings* settings = [Settings sharedSettings];
NSInteger currentVersion = [settings latestBuildVersion];
NSInteger currentVersion = [self getCurrentVersion];
NSLog(@"Latest Build Request -> does build directory exist: %@", appDirectoryExist ? @"TRUE" : @"FALSE");
NSLog(@"Latest Build Request -> current version: %ld", currentVersion);
NSLog(@"Latest Build Request -> latest version: %ld", buildNumber.integerValue);
@ -105,11 +124,10 @@
NSDictionary* macInstallerObject = [installers objectForKey:@"mac"];
NSString* macInstallerUrl = [macInstallerObject valueForKey:@"zip_url"];
BOOL appDirectoryExist = [fileManager fileExistsAtPath:[[sharedLauncher getAppPath] stringByAppendingString:@"interface.app"]];
Settings* settings = [Settings sharedSettings];
NSInteger currentVersion = [settings latestBuildVersion];
BOOL latestVersionAvailable = (currentVersion != buildNumber.integerValue);
NSString* interfaceAppPath = [[sharedLauncher getAppPath] stringByAppendingString:@"interface.app"];
BOOL appDirectoryExist = [fileManager fileExistsAtPath:interfaceAppPath];
BOOL latestVersionAvailable = ([self getCurrentVersion] != buildNumber.integerValue);
[[Settings sharedSettings] buildVersion:buildNumber.integerValue];
BOOL shouldDownloadInterface = (latestVersionAvailable || !appDirectoryExist);

View file

@ -5,13 +5,13 @@ void redirectLogToDocuments()
{
NSString* filePath = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex:0]
stringByAppendingString:@"/Launcher/"];
if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
NSError * error = nil;
[[NSFileManager defaultManager] createDirectoryAtPath:filePath withIntermediateDirectories:TRUE attributes:nil error:&error];
}
NSString *pathForLog = [filePath stringByAppendingPathComponent:@"log.txt"];
freopen([pathForLog cStringUsingEncoding:NSASCIIStringEncoding],"a+",stderr);
}
@ -23,12 +23,12 @@ int main(int argc, const char* argv[]) {
NSLog(@"launcher is already running");
return 0;
}
[NSApplication sharedApplication];
Launcher* sharedLauncher = [Launcher sharedLauncher];
[Settings sharedSettings];
[NSApp setDelegate: sharedLauncher];
// Referenced from https://stackoverflow.com/questions/9155015/handle-cmd-q-in-cocoa-application-and-menu-item-quit-application-programmatic
id menubar = [[NSMenu new] autorelease];
id appMenuItem = [[NSMenuItem new] autorelease];
@ -40,7 +40,7 @@ int main(int argc, const char* argv[]) {
id quitMenuItem = [[[NSMenuItem alloc] initWithTitle:quitTitle action:@selector(terminate:) keyEquivalent:@"q"] autorelease];
[appMenu addItem:quitMenuItem];
[appMenuItem setSubmenu:appMenu];
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
return NSApplicationMain(argc, argv);
}

View file

@ -103,7 +103,7 @@ BEGIN
CTEXT "",IDC_MESSAGE2_LABEL,35,172,239,15,NOT WS_VISIBLE
CTEXT "",IDC_ACTION2_LABEL,15,147,278,25,NOT WS_VISIBLE
RTEXT "",IDC_TERMS,15,172,180,15,NOT WS_VISIBLE
LTEXT "",IDC_TERMS2,197,172,80,15,NOT WS_VISIBLE
CONTROL "",IDC_TERMS_LINK,"Button", BS_OWNERDRAW | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,197,172,80,15
CTEXT "",IDC_TROUBLE,65,203,174,15,NOT WS_VISIBLE
CONTROL "NEXT",IDC_BUTTON_NEXT,"Button",BS_OWNERDRAW | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,107,158,94,16
CONTROL "Having Trouble?",IDC_TROUBLE_LINK,"Button",BS_OWNERDRAW | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,126,203,56,11

View file

@ -37,6 +37,7 @@ static CString GRAPHIK_REGULAR = _T("Graphik-Regular");
static CString GRAPHIK_SEMIBOLD = _T("Graphik-Semibold");
static CString TROUBLE_URL = _T("https://www.highfidelity.com/hq-support");
static CString TERMS_URL = _T("https://www.highfidelity.com/termsofservice");
CLauncherDlg::CLauncherDlg(CWnd* pParent)
@ -54,6 +55,7 @@ void CLauncherDlg::DoDataExchange(CDataExchange* pDX)
{
DDX_Control(pDX, IDC_BUTTON_NEXT, m_btnNext);
DDX_Control(pDX, IDC_TROUBLE_LINK, m_trouble_link);
DDX_Control(pDX, IDC_TERMS_LINK, m_terms_link);
DDX_Control(pDX, IDC_ORGNAME, m_orgname);
DDX_Control(pDX, IDC_USERNAME, m_username);
DDX_Control(pDX, IDC_PASSWORD, m_password);
@ -69,6 +71,7 @@ BEGIN_MESSAGE_MAP(CLauncherDlg, CDialog)
ON_EN_SETFOCUS(IDC_PASSWORD, &CLauncherDlg::OnPassEditChangeFocus)
ON_BN_CLICKED(IDC_BUTTON_NEXT, &CLauncherDlg::OnNextClicked)
ON_BN_CLICKED(IDC_TROUBLE_LINK, &CLauncherDlg::OnTroubleClicked)
ON_BN_CLICKED(IDC_TERMS_LINK, &CLauncherDlg::OnTermsClicked)
ON_WM_CTLCOLOR()
ON_WM_DRAWITEM()
ON_WM_SETCURSOR()
@ -103,7 +106,6 @@ BOOL CLauncherDlg::OnInitDialog() {
m_password_banner = (CStatic *)GetDlgItem(IDC_PASSWORD_BANNER);
m_terms = (CStatic *)GetDlgItem(IDC_TERMS);
m_terms2 = (CStatic *)GetDlgItem(IDC_TERMS2);
m_trouble = (CStatic *)GetDlgItem(IDC_TROUBLE);
m_voxel = (CStatic *)GetDlgItem(IDC_VOXEL);
@ -223,6 +225,10 @@ afx_msg void CLauncherDlg::OnTroubleClicked() {
LauncherUtils::executeOnForeground(TROUBLE_URL, _T(""));
}
afx_msg void CLauncherDlg::OnTermsClicked() {
LauncherUtils::executeOnForeground(TERMS_URL, _T(""));
}
afx_msg void CLauncherDlg::OnNextClicked() {
if (_drawStep != DrawStep::DrawChoose) {
CString token;
@ -275,7 +281,7 @@ void CLauncherDlg::drawLogo(CHwndRenderTarget* pRenderTarget) {
CD2DBitmap m_pBitmamLogo(pRenderTarget, IDB_PNG2, _T("PNG"));
auto size = pRenderTarget->GetSize();
int logoWidth = 231;
int logoHeight = 181;
int logoHeight = 173;
float logoPosX = 0.5f * (size.width - logoWidth);
float logoPosY = 0.95f * (size.height - logoHeight);
CD2DRectF logoRec(logoPosX, logoPosY, logoPosX + logoWidth, logoPosY + logoHeight);
@ -362,9 +368,9 @@ void CLauncherDlg::prepareChoose() {
m_action_label->SetWindowTextW(_T("Choose a display name"));
m_message_label->SetWindowTextW(_T("This is the name that your teammates will see."));
m_terms->ShowWindow(SW_SHOW);
m_terms2->ShowWindow(SW_SHOW);
m_terms_link.ShowWindow(SW_SHOW);
m_terms->SetWindowTextW(_T("By signing in, you agree to the High Fidelity"));
m_terms2->SetWindowTextW(_T("Terms of Service"));
m_terms_link.SetWindowTextW(_T("Terms of Service"));
CRect rec;
m_btnNext.GetWindowRect(&rec);
ScreenToClient(&rec);
@ -380,7 +386,7 @@ void CLauncherDlg::prepareProcess(DrawStep step) {
m_trouble->ShowWindow(SW_HIDE);
m_trouble_link.ShowWindow(SW_HIDE);
m_terms->ShowWindow(SW_HIDE);
m_terms2->ShowWindow(SW_HIDE);
m_terms_link.ShowWindow(SW_HIDE);
m_orgname_banner->ShowWindow(SW_HIDE);
m_username_banner->ShowWindow(SW_HIDE);
m_password_banner->ShowWindow(SW_HIDE);
@ -465,7 +471,7 @@ BOOL CLauncherDlg::getTextFormat(int resID, TextFormat& formatOut) {
case IDC_TERMS:
formatOut.size = TERMS_FONT_SIZE;
break;
case IDC_TERMS2:
case IDC_TERMS_LINK:
formatOut.size = TERMS_FONT_SIZE;
formatOut.isBold = true;
break;
@ -542,6 +548,14 @@ void CLauncherDlg::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
dc.SelectObject(buttonFont);
}
dc.DrawText(_T("Having Trouble"), CRect(rect.left, rect.top, rect.right, rect.bottom), DT_CENTER | DT_VCENTER | DT_SINGLELINE);
} else if (nIDCtl == IDC_TERMS_LINK) {
dc.FillSolidRect(rect, COLOR_BLACK);
dc.SetTextColor(COLOR_LIGHT_GREY);
CFont buttonFont;
if (LauncherUtils::getFont(GRAPHIK_SEMIBOLD, TERMS_FONT_SIZE, true, buttonFont)) {
dc.SelectObject(buttonFont);
}
dc.DrawText(_T("Terms of Service"), CRect(rect.left, rect.top, rect.right, rect.bottom), DT_LEFT | DT_TOP | DT_SINGLELINE);
}
}

View file

@ -72,13 +72,13 @@ protected:
HICON m_hIcon;
CButton m_btnNext;
CButton m_trouble_link;
CButton m_terms_link;
CStatic* m_message_label;
CStatic* m_action_label;
CStatic* m_message2_label;
CStatic* m_action2_label;
CStatic* m_terms;
CStatic* m_terms2;
CStatic* m_trouble;
CStatic* m_voxel;
@ -111,6 +111,7 @@ protected:
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnNextClicked();
afx_msg void OnTroubleClicked();
afx_msg void OnTermsClicked();
afx_msg void OnOrgEditChangeFocus();
afx_msg void OnUserEditChangeFocus();
afx_msg void OnPassEditChangeFocus();

View file

@ -23,7 +23,7 @@
#define IDC_USERNAME_BANNER 1019
#define IDC_PASSWORD_BANNER 1020
#define IDC_TERMS 1021
#define IDC_TERMS2 1022
#define IDC_TERMS_LINK 1022
#define IDC_TROUBLE 1023
#define IDC_VOXEL 1024
#define IDC_TROUBLE_LINK 1027

View file

@ -109,23 +109,20 @@ bool Basic2DWindowOpenGLDisplayPlugin::internalActivate() {
return Parent::internalActivate();
}
gpu::PipelinePointer Basic2DWindowOpenGLDisplayPlugin::getCompositeScenePipeline() {
gpu::PipelinePointer Basic2DWindowOpenGLDisplayPlugin::getRenderTexturePipeline() {
#if defined(Q_OS_ANDROID)
return _linearToSRGBPipeline;
return _linearToSRGBPipeline;
#else
return _SRGBToLinearPipeline;
#ifndef USE_GLES
return _SRGBToLinearPipeline;
#else
return _drawTexturePipeline;
#endif
#endif
}
gpu::Element Basic2DWindowOpenGLDisplayPlugin::getCompositeFBColorSpace() {
#if defined(Q_OS_ANDROID)
return gpu::Element::COLOR_SRGBA_32;
#else
return gpu::Element::COLOR_RGBA_32;
#endif
}
void Basic2DWindowOpenGLDisplayPlugin::compositeExtra() {
#if defined(Q_OS_ANDROID)
auto& virtualPadManager = VirtualPad::Manager::instance();

View file

@ -37,8 +37,7 @@ public:
virtual void pluginUpdate() override {};
virtual gpu::PipelinePointer getCompositeScenePipeline() override;
virtual gpu::Element getCompositeFBColorSpace() override;
virtual gpu::PipelinePointer getRenderTexturePipeline() override;
protected:
mutable bool _isThrottled = false;

View file

@ -62,7 +62,7 @@ public:
PresentThread() {
connect(qApp, &QCoreApplication::aboutToQuit, [this] {
shutdown();
shutdown();
});
setObjectName("Present");
@ -82,12 +82,11 @@ public:
Lock lock(_mutex);
_shutdown = true;
_condition.wait(lock, [&] { return !_shutdown; });
_condition.wait(lock, [&] { return !_shutdown; });
qCDebug(displayPlugins) << "Present thread shutdown";
}
}
void setNewDisplayPlugin(OpenGLDisplayPlugin* plugin) {
Lock lock(_mutex);
if (isRunning()) {
@ -104,7 +103,6 @@ public:
_context->moveToThread(this);
}
virtual void run() override {
PROFILE_SET_THREAD_NAME("Present Thread");
@ -131,7 +129,6 @@ public:
_condition.notify_one();
}
{
// Main thread does it's thing while we wait on the lock to release
Lock lock(_mutex);
@ -201,7 +198,7 @@ public:
#if defined(Q_OS_MAC)
_context->doneCurrent();
#endif
_refreshRateController->sleepThreadIfNeeded(this, currentPlugin->isHmd());
}
@ -235,7 +232,6 @@ public:
_condition.notify_one();
}
private:
void makeCurrent();
void doneCurrent();
@ -245,7 +241,6 @@ private:
// Used to allow the main thread to perform context operations
Condition _condition;
QThread* _targetOperationThread { nullptr };
bool _pendingOtherThreadOperation { false };
bool _finishedOtherThreadOperation { false };
@ -302,7 +297,6 @@ bool OpenGLDisplayPlugin::activate() {
return false;
}
// This should not return until the new context has been customized
// and the old context (if any) has been uncustomized
presentThread->setNewDisplayPlugin(this);
@ -334,7 +328,7 @@ void OpenGLDisplayPlugin::deactivate() {
_container->showDisplayPluginsTools(false);
if (!_container->currentDisplayActions().isEmpty()) {
foreach(auto itemInfo, _container->currentDisplayActions()) {
foreach (auto itemInfo, _container->currentDisplayActions()) {
_container->removeMenuItem(itemInfo.first, itemInfo.second);
}
_container->currentDisplayActions().clear();
@ -368,7 +362,6 @@ void OpenGLDisplayPlugin::customizeContext() {
image = image.convertToFormat(QImage::Format_ARGB32);
}
if ((image.width() > 0) && (image.height() > 0)) {
cursorData.texture = gpu::Texture::createStrict(
gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA),
image.width(), image.height(),
@ -384,7 +377,7 @@ void OpenGLDisplayPlugin::customizeContext() {
}
}
if (!_drawTexturePipeline) {
if (!_linearToSRGBPipeline) {
gpu::StatePointer blendState = gpu::StatePointer(new gpu::State());
blendState->setDepthTest(gpu::State::DepthTest(false));
blendState->setBlendFunction(true,
@ -397,17 +390,17 @@ void OpenGLDisplayPlugin::customizeContext() {
scissorState->setDepthTest(gpu::State::DepthTest(false));
scissorState->setScissorEnable(true);
_drawTexturePipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), scissorState);
_drawTexturePipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), scissorState);
_linearToSRGBPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaLinearToSRGB), scissorState);
_linearToSRGBPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaLinearToSRGB), scissorState);
_SRGBToLinearPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaSRGBToLinear), scissorState);
_SRGBToLinearPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaSRGBToLinear), scissorState);
_hudPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), blendState);
_hudPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), blendState);
_mirrorHUDPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureMirroredX), blendState);
_mirrorHUDPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureMirroredX), blendState);
_cursorPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTransformedTexture), blendState);
_cursorPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTransformedTexture), blendState);
}
updateCompositeFramebuffer();
@ -418,9 +411,9 @@ void OpenGLDisplayPlugin::uncustomizeContext() {
_drawTexturePipeline.reset();
_linearToSRGBPipeline.reset();
_SRGBToLinearPipeline.reset();
_cursorPipeline.reset();
_hudPipeline.reset();
_mirrorHUDPipeline.reset();
_cursorPipeline.reset();
_compositeFramebuffer.reset();
withPresentThreadLock([&] {
@ -433,7 +426,6 @@ void OpenGLDisplayPlugin::uncustomizeContext() {
});
}
// Pressing Alt (and Meta) key alone activates the menubar because its style inherits the
// SHMenuBarAltKeyNavigation from QWindowsStyle. This makes it impossible for a scripts to
// receive keyPress events for the Alt (and Meta) key in a reliable manner.
@ -514,11 +506,18 @@ void OpenGLDisplayPlugin::captureFrame(const std::string& filename) const {
});
}
void OpenGLDisplayPlugin::renderFromTexture(gpu::Batch& batch, const gpu::TexturePointer& texture, const glm::ivec4& viewport, const glm::ivec4& scissor) {
void OpenGLDisplayPlugin::renderFromTexture(gpu::Batch& batch,
const gpu::TexturePointer& texture,
const glm::ivec4& viewport,
const glm::ivec4& scissor) {
renderFromTexture(batch, texture, viewport, scissor, nullptr);
}
void OpenGLDisplayPlugin::renderFromTexture(gpu::Batch& batch, const gpu::TexturePointer& texture, const glm::ivec4& viewport, const glm::ivec4& scissor, const gpu::FramebufferPointer& copyFbo /*=gpu::FramebufferPointer()*/) {
void OpenGLDisplayPlugin::renderFromTexture(gpu::Batch& batch,
const gpu::TexturePointer& texture,
const glm::ivec4& viewport,
const glm::ivec4& scissor,
const gpu::FramebufferPointer& copyFbo /*=gpu::FramebufferPointer()*/) {
auto fbo = gpu::FramebufferPointer();
batch.enableStereo(false);
batch.resetViewTransform();
@ -528,13 +527,13 @@ void OpenGLDisplayPlugin::renderFromTexture(gpu::Batch& batch, const gpu::Textur
batch.setViewportTransform(viewport);
batch.setResourceTexture(0, texture);
batch.setPipeline(_drawTexturePipeline);
batch.setPipeline(getRenderTexturePipeline());
batch.draw(gpu::TRIANGLE_STRIP, 4);
if (copyFbo) {
gpu::Vec4i copyFboRect(0, 0, copyFbo->getWidth(), copyFbo->getHeight());
gpu::Vec4i sourceRect(scissor.x, scissor.y, scissor.x + scissor.z, scissor.y + scissor.w);
float aspectRatio = (float)scissor.w / (float) scissor.z; // height/width
float aspectRatio = (float)scissor.w / (float)scissor.z; // height/width
// scale width first
int xOffset = 0;
int yOffset = 0;
@ -635,11 +634,6 @@ void OpenGLDisplayPlugin::compositePointer() {
});
}
// Overridden by Basic2DWindowDisplayPlugin and OculusDisplayPlugin
gpu::PipelinePointer OpenGLDisplayPlugin::getCompositeScenePipeline() {
return _drawTexturePipeline;
}
void OpenGLDisplayPlugin::compositeScene() {
render([&](gpu::Batch& batch) {
batch.enableStereo(false);
@ -682,7 +676,7 @@ void OpenGLDisplayPlugin::internalPresent() {
render([&](gpu::Batch& batch) {
// Note: _displayTexture must currently be the same size as the display.
uvec2 dims = _displayTexture ? uvec2(_displayTexture->getDimensions()) : getSurfacePixels();
auto viewport = ivec4(uvec2(0), dims);
auto viewport = ivec4(uvec2(0), dims);
renderFromTexture(batch, _displayTexture ? _displayTexture : _compositeFramebuffer->getRenderBuffer(0), viewport, viewport);
});
swapBuffers();
@ -765,7 +759,7 @@ float OpenGLDisplayPlugin::presentRate() const {
return _presentRate.rate();
}
std::function<void(int)> OpenGLDisplayPlugin::getRefreshRateOperator() {
std::function<void(int)> OpenGLDisplayPlugin::getRefreshRateOperator() {
return [](int targetRefreshRate) {
auto refreshRateController = DependencyManager::get<PresentThread>()->getRefreshRateController();
refreshRateController->setRefreshRateLimitPeriod(targetRefreshRate);
@ -781,7 +775,6 @@ float OpenGLDisplayPlugin::renderRate() const {
return _renderRate.rate();
}
void OpenGLDisplayPlugin::swapBuffers() {
static auto context = _container->getPrimaryWidget()->context();
context->swapBuffers();
@ -909,17 +902,10 @@ void OpenGLDisplayPlugin::render(std::function<void(gpu::Batch& batch)> f) {
OpenGLDisplayPlugin::~OpenGLDisplayPlugin() {
}
// Added this to allow desktop composite framebuffer to be RGBA while mobile is SRGBA
// Overridden by Basic2DWindowDisplayPlugin
// FIXME: Eventually it would be ideal to have both framebuffers be of the same type
gpu::Element OpenGLDisplayPlugin::getCompositeFBColorSpace() {
return gpu::Element::COLOR_RGBA_32;
}
void OpenGLDisplayPlugin::updateCompositeFramebuffer() {
auto renderSize = glm::uvec2(getRecommendedRenderSize());
if (!_compositeFramebuffer || _compositeFramebuffer->getSize() != renderSize) {
_compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", getCompositeFBColorSpace(), renderSize.x, renderSize.y));
_compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", gpu::Element::COLOR_RGBA_32, renderSize.x, renderSize.y));
}
}
@ -950,14 +936,13 @@ void OpenGLDisplayPlugin::copyTextureToQuickFramebuffer(NetworkTexturePointer ne
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT);
// maintain aspect ratio, filling the width first if possible. If that makes the height too
// much, fill height instead. TODO: only do this when texture changes
GLint newX = 0;
GLint newY = 0;
float aspectRatio = (float)texHeight / (float)texWidth;
GLint newWidth = target->width();
GLint newHeight = std::round(aspectRatio * (float) target->width());
GLint newHeight = std::round(aspectRatio * (float)target->width());
if (newHeight > target->height()) {
newHeight = target->height();
newWidth = std::round((float)target->height() / aspectRatio);
@ -966,7 +951,7 @@ void OpenGLDisplayPlugin::copyTextureToQuickFramebuffer(NetworkTexturePointer ne
newY = (target->height() - newHeight) / 2;
}
glBlitNamedFramebuffer(fbo[0], fbo[1], 0, 0, texWidth, texHeight, newX, newY, newX + newWidth, newY + newHeight, GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT, GL_NEAREST);
glBlitNamedFramebuffer(fbo[0], fbo[1], 0, 0, texWidth, texHeight, newX, newY, newX + newWidth, newY + newHeight, GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT, GL_NEAREST);
// don't delete the textures!
glDeleteFramebuffers(2, fbo);
@ -975,3 +960,11 @@ void OpenGLDisplayPlugin::copyTextureToQuickFramebuffer(NetworkTexturePointer ne
#endif
}
gpu::PipelinePointer OpenGLDisplayPlugin::getRenderTexturePipeline() {
return _drawTexturePipeline;
}
gpu::PipelinePointer OpenGLDisplayPlugin::getCompositeScenePipeline() {
return _drawTexturePipeline;
}

View file

@ -23,11 +23,9 @@
#include <gpu/Batch.h>
namespace gpu {
namespace gl {
class GLBackend;
}
}
namespace gpu { namespace gl {
class GLBackend;
}} // namespace gpu::gl
class RefreshRateController;
@ -35,10 +33,12 @@ class OpenGLDisplayPlugin : public DisplayPlugin {
Q_OBJECT
Q_PROPERTY(float hudAlpha MEMBER _hudAlpha)
using Parent = DisplayPlugin;
protected:
using Mutex = std::mutex;
using Lock = std::unique_lock<Mutex>;
using Condition = std::condition_variable;
public:
~OpenGLDisplayPlugin();
// These must be final to ensure proper ordering of operations
@ -55,13 +55,9 @@ public:
void captureFrame(const std::string& outputName) const override;
void submitFrame(const gpu::FramePointer& newFrame) override;
glm::uvec2 getRecommendedRenderSize() const override {
return getSurfacePixels();
}
glm::uvec2 getRecommendedRenderSize() const override { return getSurfacePixels(); }
glm::uvec2 getRecommendedUiSize() const override {
return getSurfaceSize();
}
glm::uvec2 getRecommendedUiSize() const override { return getSurfaceSize(); }
virtual bool setDisplayTexture(const QString& name) override;
virtual bool onDisplayTextureReset() { return false; };
@ -84,9 +80,10 @@ public:
// Three threads, one for rendering, one for texture transfers, one reserved for the GL driver
int getRequiredThreadCount() const override { return 3; }
void copyTextureToQuickFramebuffer(NetworkTexturePointer source, QOpenGLFramebufferObject* target, GLsync* fenceSync) override;
virtual std::function<void(gpu::Batch&, const gpu::TexturePointer&, bool mirror)> getHUDOperator() override;
void copyTextureToQuickFramebuffer(NetworkTexturePointer source,
QOpenGLFramebufferObject* target,
GLsync* fenceSync) override;
protected:
friend class PresentThread;
@ -105,10 +102,7 @@ protected:
virtual void compositeLayers();
virtual void compositeScene();
virtual void compositePointer();
virtual void compositeExtra() {};
virtual gpu::PipelinePointer getCompositeScenePipeline();
virtual gpu::Element getCompositeFBColorSpace();
virtual void compositeExtra(){};
// These functions must only be called on the presentation thread
virtual void customizeContext();
@ -125,8 +119,15 @@ protected:
// Plugin specific functionality to send the composed scene to the output window or device
virtual void internalPresent();
void renderFromTexture(gpu::Batch& batch, const gpu::TexturePointer& texture, const glm::ivec4& viewport, const glm::ivec4& scissor, const gpu::FramebufferPointer& fbo);
void renderFromTexture(gpu::Batch& batch, const gpu::TexturePointer& texture, const glm::ivec4& viewport, const glm::ivec4& scissor);
void renderFromTexture(gpu::Batch& batch,
const gpu::TexturePointer& texture,
const glm::ivec4& viewport,
const glm::ivec4& scissor,
const gpu::FramebufferPointer& fbo);
void renderFromTexture(gpu::Batch& batch,
const gpu::TexturePointer& texture,
const glm::ivec4& viewport,
const glm::ivec4& scissor);
virtual void updateFrameData();
virtual glm::mat4 getViewCorrection() { return glm::mat4(); }
@ -138,7 +139,7 @@ protected:
void render(std::function<void(gpu::Batch& batch)> f);
bool _vsyncEnabled { true };
bool _vsyncEnabled{ true };
QThread* _presentThread{ nullptr };
std::queue<gpu::FramePointer> _newFrameQueue;
RateCounter<200> _droppedFrameRate;
@ -147,7 +148,7 @@ protected:
RateCounter<200> _renderRate;
gpu::FramePointer _currentFrame;
gpu::Frame* _lastFrame { nullptr };
gpu::Frame* _lastFrame{ nullptr };
mat4 _prevRenderView;
gpu::FramebufferPointer _compositeFramebuffer;
gpu::PipelinePointer _hudPipeline;
@ -157,9 +158,11 @@ protected:
gpu::PipelinePointer _linearToSRGBPipeline;
gpu::PipelinePointer _SRGBToLinearPipeline;
gpu::PipelinePointer _cursorPipeline;
gpu::TexturePointer _displayTexture{};
float _compositeHUDAlpha { 1.0f };
float _compositeHUDAlpha{ 1.0f };
virtual gpu::PipelinePointer getRenderTexturePipeline();
virtual gpu::PipelinePointer getCompositeScenePipeline();
struct CursorData {
QImage image;
@ -169,19 +172,19 @@ protected:
};
std::map<uint16_t, CursorData> _cursorsData;
bool _lockCurrentTexture { false };
bool _lockCurrentTexture{ false };
void assertNotPresentThread() const;
void assertIsPresentThread() const;
template<typename F>
template <typename F>
void withPresentThreadLock(F f) const {
assertIsPresentThread();
Lock lock(_presentMutex);
f();
}
template<typename F>
template <typename F>
void withNonPresentThreadLock(F f) const {
assertNotPresentThread();
Lock lock(_presentMutex);
@ -198,4 +201,3 @@ protected:
QImage getScreenshot(float aspectRatio);
QImage getSecondaryCameraScreenshot();
};

View file

@ -174,6 +174,10 @@ float HmdDisplayPlugin::getLeftCenterPixel() const {
return leftCenterPixel;
}
gpu::PipelinePointer HmdDisplayPlugin::getRenderTexturePipeline() {
return _SRGBToLinearPipeline;
}
void HmdDisplayPlugin::internalPresent() {
PROFILE_RANGE_EX(render, __FUNCTION__, 0xff00ff00, (uint64_t)presentCount())

View file

@ -51,6 +51,8 @@ public:
std::function<void(gpu::Batch&, const gpu::TexturePointer&, bool mirror)> getHUDOperator() override;
virtual StencilMaskMode getStencilMaskMode() const override { return StencilMaskMode::PAINT; }
virtual gpu::PipelinePointer getRenderTexturePipeline() override;
signals:
void hmdMountedChanged();
void hmdVisibleChanged(bool visible);

View file

@ -207,7 +207,7 @@ void EntityTreeRenderer::stopDomainAndNonOwnedEntities() {
if (entityItem && !entityItem->getScript().isEmpty()) {
if (!(entityItem->isLocalEntity() || (entityItem->isAvatarEntity() && entityItem->getOwningAvatarID() == getTree()->getMyAvatarSessionUUID()))) {
if (entityItem->contains(_avatarPosition)) {
if (_currentEntitiesInside.contains(entityID)) {
_entitiesScriptEngine->callEntityScriptMethod(entityID, "leaveEntity");
}
_entitiesScriptEngine->unloadEntityScript(entityID, true);
@ -222,6 +222,7 @@ void EntityTreeRenderer::clearDomainAndNonOwnedEntities() {
auto sessionUUID = getTree()->getMyAvatarSessionUUID();
std::unordered_map<EntityItemID, EntityRendererPointer> savedEntities;
std::unordered_set<EntityRendererPointer> savedRenderables;
// remove all entities from the scene
auto scene = _viewState->getMain3DScene();
if (scene) {
@ -232,11 +233,12 @@ void EntityTreeRenderer::clearDomainAndNonOwnedEntities() {
fadeOutRenderable(renderer);
} else {
savedEntities[entry.first] = entry.second;
savedRenderables.insert(entry.second);
}
}
}
_renderablesToUpdate = savedEntities;
_renderablesToUpdate = savedRenderables;
_entitiesInScene = savedEntities;
if (_layeredZones.clearDomainAndNonOwnedZones(sessionUUID)) {
@ -389,13 +391,7 @@ void EntityTreeRenderer::updateChangedEntities(const render::ScenePointer& scene
PerformanceTimer pt("change");
std::unordered_set<EntityItemID> changedEntities;
_changedEntitiesGuard.withWriteLock([&] {
#if 0
// FIXME Weird build failure in latest VC update that fails to compile when using std::swap
changedEntities.swap(_changedEntities);
#else
changedEntities.insert(_changedEntities.begin(), _changedEntities.end());
_changedEntities.clear();
#endif
});
{
@ -404,7 +400,7 @@ void EntityTreeRenderer::updateChangedEntities(const render::ScenePointer& scene
auto renderable = renderableForEntityId(entityId);
if (renderable) {
// only add valid renderables _renderablesToUpdate
_renderablesToUpdate.insert({ entityId, renderable });
_renderablesToUpdate.insert(renderable);
}
}
}
@ -414,8 +410,7 @@ void EntityTreeRenderer::updateChangedEntities(const render::ScenePointer& scene
// we expect to update all renderables within available time budget
PROFILE_RANGE_EX(simulation_physics, "UpdateRenderables", 0xffff00ff, (uint64_t)_renderablesToUpdate.size());
uint64_t updateStart = usecTimestampNow();
for (const auto& entry : _renderablesToUpdate) {
const auto& renderable = entry.second;
for (const auto& renderable : _renderablesToUpdate) {
assert(renderable); // only valid renderables are added to _renderablesToUpdate
renderable->updateInScene(scene, transaction);
}
@ -424,8 +419,8 @@ void EntityTreeRenderer::updateChangedEntities(const render::ScenePointer& scene
// compute average per-renderable update cost
float cost = (float)(usecTimestampNow() - updateStart) / (float)(numRenderables);
const float blend = 0.1f;
_avgRenderableUpdateCost = (1.0f - blend) * _avgRenderableUpdateCost + blend * cost;
const float BLEND = 0.1f;
_avgRenderableUpdateCost = (1.0f - BLEND) * _avgRenderableUpdateCost + BLEND * cost;
} else {
// we expect the cost to updating all renderables to exceed available time budget
// so we first sort by priority and update in order until out of time
@ -450,43 +445,40 @@ void EntityTreeRenderer::updateChangedEntities(const render::ScenePointer& scene
PrioritySortUtil::PriorityQueue<SortableRenderer> sortedRenderables(views);
sortedRenderables.reserve(_renderablesToUpdate.size());
{
PROFILE_RANGE_EX(simulation_physics, "SortRenderables", 0xffff00ff, (uint64_t)_renderablesToUpdate.size());
std::unordered_map<EntityItemID, EntityRendererPointer>::iterator itr = _renderablesToUpdate.begin();
while (itr != _renderablesToUpdate.end()) {
assert(itr->second); // only valid renderables are added to _renderablesToUpdate
sortedRenderables.push(SortableRenderer(itr->second));
++itr;
PROFILE_RANGE_EX(simulation_physics, "BuildSortedRenderables", 0xffff00ff, (uint64_t)_renderablesToUpdate.size());
for (const auto& renderable : _renderablesToUpdate) {
assert(renderable); // only valid renderables are added to _renderablesToUpdate
sortedRenderables.push(SortableRenderer(renderable));
}
}
{
PROFILE_RANGE_EX(simulation_physics, "UpdateRenderables", 0xffff00ff, sortedRenderables.size());
PROFILE_RANGE_EX(simulation_physics, "SortAndUpdateRenderables", 0xffff00ff, sortedRenderables.size());
// compute remaining time budget
const auto& sortedRenderablesVector = sortedRenderables.getSortedVector();
uint64_t updateStart = usecTimestampNow();
uint64_t timeBudget = MIN_SORTED_UPDATE_RENDERABLES_TIME_BUDGET;
uint64_t sortCost = updateStart - sortStart;
uint64_t timeBudget = MIN_SORTED_UPDATE_RENDERABLES_TIME_BUDGET;
if (sortCost < MAX_UPDATE_RENDERABLES_TIME_BUDGET - MIN_SORTED_UPDATE_RENDERABLES_TIME_BUDGET) {
timeBudget = MAX_UPDATE_RENDERABLES_TIME_BUDGET - sortCost;
}
uint64_t expiry = updateStart + timeBudget;
// process the sorted renderables
size_t numSorted = sortedRenderables.size();
const auto& sortedRenderablesVector = sortedRenderables.getSortedVector();
for (const auto& sortedRenderable : sortedRenderablesVector) {
if (usecTimestampNow() > expiry) {
break;
}
const auto& renderable = sortedRenderable.getRenderer();
renderable->updateInScene(scene, transaction);
_renderablesToUpdate.erase(renderable->getEntity()->getID());
_renderablesToUpdate.erase(renderable);
}
// compute average per-renderable update cost
size_t numUpdated = numSorted - sortedRenderables.size() + 1; // add one to avoid divide by zero
size_t numUpdated = sortedRenderables.size() - _renderablesToUpdate.size() + 1; // add one to avoid divide by zero
float cost = (float)(usecTimestampNow() - updateStart) / (float)(numUpdated);
const float blend = 0.1f;
_avgRenderableUpdateCost = (1.0f - blend) * _avgRenderableUpdateCost + blend * cost;
const float BLEND = 0.1f;
_avgRenderableUpdateCost = (1.0f - BLEND) * _avgRenderableUpdateCost + BLEND * cost;
}
}
}
@ -990,7 +982,6 @@ void EntityTreeRenderer::mouseMoveEvent(QMouseEvent* event) {
void EntityTreeRenderer::deletingEntity(const EntityItemID& entityID) {
// If it's in a pending queue, remove it
_renderablesToUpdate.erase(entityID);
_entitiesToAdd.erase(entityID);
auto itr = _entitiesInScene.find(entityID);
@ -1000,7 +991,7 @@ void EntityTreeRenderer::deletingEntity(const EntityItemID& entityID) {
}
if (_tree && !_shuttingDown && _entitiesScriptEngine && !itr->second->getEntity()->getScript().isEmpty()) {
if (itr->second->getEntity()->contains(_avatarPosition)) {
if (_currentEntitiesInside.contains(entityID)) {
_entitiesScriptEngine->callEntityScriptMethod(entityID, "leaveEntity");
}
_entitiesScriptEngine->unloadEntityScript(entityID, true);
@ -1013,6 +1004,7 @@ void EntityTreeRenderer::deletingEntity(const EntityItemID& entityID) {
}
auto renderable = itr->second;
_renderablesToUpdate.erase(renderable);
_entitiesInScene.erase(itr);
if (!renderable) {
@ -1047,7 +1039,7 @@ void EntityTreeRenderer::checkAndCallPreload(const EntityItemID& entityID, bool
QString scriptUrl = entity->getScript();
if ((shouldLoad && unloadFirst) || scriptUrl.isEmpty()) {
if (_entitiesScriptEngine) {
if (entity->contains(_avatarPosition)) {
if (_currentEntitiesInside.contains(entityID)) {
_entitiesScriptEngine->callEntityScriptMethod(entityID, "leaveEntity");
}
_entitiesScriptEngine->unloadEntityScript(entityID);

View file

@ -246,7 +246,7 @@ private:
ReadWriteLockable _changedEntitiesGuard;
std::unordered_set<EntityItemID> _changedEntities;
std::unordered_map<EntityItemID, EntityRendererPointer> _renderablesToUpdate;
std::unordered_set<EntityRendererPointer> _renderablesToUpdate;
std::unordered_map<EntityItemID, EntityRendererPointer> _entitiesInScene;
std::unordered_map<EntityItemID, EntityItemWeakPointer> _entitiesToAdd;

View file

@ -2121,9 +2121,10 @@ void EntityTree::fixupNeedsParentFixups() {
_needsParentFixup.clear();
}
std::unordered_set<QUuid> seenEntityIds;
QMutableVectorIterator<EntityItemWeakPointer> iter(entitiesToFixup);
while (iter.hasNext()) {
EntityItemWeakPointer entityWP = iter.next();
const auto& entityWP = iter.next();
EntityItemPointer entity = entityWP.lock();
if (!entity) {
// entity was deleted before we found its parent
@ -2131,6 +2132,17 @@ void EntityTree::fixupNeedsParentFixups() {
continue;
}
const auto id = entity->getID();
// BUGZ-771 some entities seem to never be removed by the below logic and further seem to accumulate dupes within the _needsParentFixup list
// This block ensures that duplicates are removed from entitiesToFixup before it's re-appended to _needsParentFixup
if (0 != seenEntityIds.count(id)) {
// Entity was duplicated inside entitiesToFixup
iter.remove();
continue;
}
seenEntityIds.insert(id);
entity->requiresRecalcBoxes();
bool queryAACubeSuccess { false };
bool maxAACubeSuccess { false };

View file

@ -1,6 +1,6 @@
set(TARGET_NAME networking)
setup_hifi_library(Network)
link_hifi_libraries(shared)
link_hifi_libraries(shared platform)
target_openssl()
target_tbb()

View file

@ -956,7 +956,7 @@ void AccountManager::saveLoginStatus(bool isLoggedIn) {
QProcess launcher;
launcher.setProgram(launcherPath);
launcher.startDetached();
qApp->quit();
QMetaObject::invokeMethod(qApp, "quit", Qt::QueuedConnection);
}
}
}

View file

@ -26,6 +26,8 @@
#include <ThreadHelpers.h>
#include <LogHandler.h>
#include <UUID.h>
#include <platform/Platform.h>
#include <platform/PlatformKeys.h>
#include "AccountManager.h"
#include "AddressManager.h"
@ -42,6 +44,7 @@
using namespace std::chrono;
const int KEEPALIVE_PING_INTERVAL_MS = 1000;
const int MAX_SYSTEM_INFO_SIZE = 1000;
NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort) :
LimitedNodeList(socketListenPort, dtlsListenPort),
@ -418,19 +421,20 @@ void NodeList::sendDomainServerCheckIn() {
auto accountManager = DependencyManager::get<AccountManager>();
packetStream << FingerprintUtils::getMachineFingerprint();
QString systemInfo;
#if defined Q_OS_WIN
systemInfo = "OS:Windows";
#elif defined Q_OS_OSX
systemInfo = "OS:OSX";
#elif defined Q_OS_LINUX
systemInfo = "OS:Linux";
#elif defined Q_OS_ANDROID
systemInfo = "OS:Android";
#else
systemInfo = "OS:Unknown";
#endif
packetStream << systemInfo;
auto desc = platform::getAll();
QByteArray systemInfo(desc.dump().c_str());
QByteArray compressedSystemInfo = qCompress(systemInfo);
if (compressedSystemInfo.size() > MAX_SYSTEM_INFO_SIZE) {
// Highly unlikely, as not even unreasonable machines will
// overflow the max size, but prevent MTU overflow anyway.
// We could do something sophisticated like clearing specific
// values if they're too big, but we'll save that for later.
compressedSystemInfo.clear();
}
packetStream << compressedSystemInfo;
packetStream << _connectReason;

View file

@ -20,6 +20,7 @@
#include <LogHandler.h>
#include <shared/QtHelpers.h>
#include <platform/Platform.h>
#include "NetworkLogging.h"
ThreadedAssignment::ThreadedAssignment(ReceivedMessage& message) :
@ -38,6 +39,16 @@ ThreadedAssignment::ThreadedAssignment(ReceivedMessage& message) :
// if the NL tells us we got a DS response, clear our member variable of queued check-ins
auto nodeList = DependencyManager::get<NodeList>();
connect(nodeList.data(), &NodeList::receivedDomainServerList, this, &ThreadedAssignment::clearQueuedCheckIns);
platform::create();
if (!platform::enumeratePlatform()) {
qCDebug(networking) << "Failed to enumerate platform.";
}
}
ThreadedAssignment::~ThreadedAssignment() {
stop();
platform::destroy();
}
void ThreadedAssignment::setFinished(bool isFinished) {

View file

@ -22,7 +22,7 @@ class ThreadedAssignment : public Assignment {
Q_OBJECT
public:
ThreadedAssignment(ReceivedMessage& message);
~ThreadedAssignment() { stop(); }
~ThreadedAssignment();
virtual void aboutToFinish() { };
void addPacketStatsAndSendStatsPacket(QJsonObject statsObject);

View file

@ -72,7 +72,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
return static_cast<PacketVersion>(DomainConnectionDeniedVersion::IncludesExtraInfo);
case PacketType::DomainConnectRequest:
return static_cast<PacketVersion>(DomainConnectRequestVersion::HasSystemInfo);
return static_cast<PacketVersion>(DomainConnectRequestVersion::HasCompressedSystemInfo);
case PacketType::DomainServerAddedNode:
return static_cast<PacketVersion>(DomainServerAddedNodeVersion::PermissionsGrid);

View file

@ -347,7 +347,8 @@ enum class DomainConnectRequestVersion : PacketVersion {
AlwaysHasMachineFingerprint,
HasTimestamp,
HasReason,
HasSystemInfo
HasSystemInfo,
HasCompressedSystemInfo
};
enum class DomainConnectionDeniedVersion : PacketVersion {

View file

@ -5,3 +5,11 @@ link_hifi_libraries(shared)
GroupSources("src")
target_json()
if (APPLE)
# link in required OS X frameworks and include the right GL headers
find_library(OpenGL OpenGL)
find_library(AppKit AppKit)
target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit})
endif ()

View file

@ -147,14 +147,6 @@ public:
virtual void submitFrame(const gpu::FramePointer& newFrame) = 0;
virtual void captureFrame(const std::string& outputName) const { }
virtual float getRenderResolutionScale() const {
return _renderResolutionScale;
}
void setRenderResolutionScale(float renderResolutionScale) {
_renderResolutionScale = renderResolutionScale;
}
// The size of the rendering target (may be larger than the device size due to distortion)
virtual glm::uvec2 getRecommendedRenderSize() const = 0;
@ -235,8 +227,6 @@ protected:
MovingAverage<float, 10> _movingAveragePresent;
float _renderResolutionScale { 1.0f };
private:
QMutex _presentMutex;
QWaitCondition _presentCondition;

View file

@ -273,44 +273,6 @@ graphics::MeshPointer DeferredLightingEffect::getSpotLightMesh() {
return _spotLightMesh;
}
gpu::FramebufferPointer PreparePrimaryFramebuffer::createFramebuffer(const char* name, const glm::uvec2& frameSize) {
gpu::FramebufferPointer framebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create(name));
auto colorFormat = gpu::Element::COLOR_SRGBA_32;
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
auto primaryColorTexture = gpu::Texture::createRenderBuffer(colorFormat, frameSize.x, frameSize.y, gpu::Texture::SINGLE_MIP, defaultSampler);
framebuffer->setRenderBuffer(0, primaryColorTexture);
auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format
auto primaryDepthTexture = gpu::Texture::createRenderBuffer(depthFormat, frameSize.x, frameSize.y, gpu::Texture::SINGLE_MIP, defaultSampler);
framebuffer->setDepthStencilBuffer(primaryDepthTexture, depthFormat);
return framebuffer;
}
void PreparePrimaryFramebuffer::configure(const Config& config) {
_resolutionScale = config.resolutionScale;
}
void PreparePrimaryFramebuffer::run(const RenderContextPointer& renderContext, Output& primaryFramebuffer) {
glm::uvec2 frameSize(renderContext->args->_viewport.z, renderContext->args->_viewport.w);
glm::uvec2 scaledFrameSize(glm::vec2(frameSize) * _resolutionScale);
// Resizing framebuffers instead of re-building them seems to cause issues with threaded
// rendering
if (!_primaryFramebuffer || _primaryFramebuffer->getSize() != scaledFrameSize) {
_primaryFramebuffer = createFramebuffer("deferredPrimary", scaledFrameSize);
}
primaryFramebuffer = _primaryFramebuffer;
// Set viewport for the rest of the scaled passes
renderContext->args->_viewport.z = scaledFrameSize.x;
renderContext->args->_viewport.w = scaledFrameSize.y;
}
void PrepareDeferred::run(const RenderContextPointer& renderContext, const Inputs& inputs, Outputs& outputs) {
auto args = renderContext->args;

View file

@ -74,36 +74,6 @@ private:
friend class RenderDeferredCleanup;
};
class PreparePrimaryFramebufferConfig : public render::Job::Config {
Q_OBJECT
Q_PROPERTY(float resolutionScale MEMBER resolutionScale NOTIFY dirty)
public:
float resolutionScale{ 1.0f };
signals:
void dirty();
};
class PreparePrimaryFramebuffer {
public:
using Output = gpu::FramebufferPointer;
using Config = PreparePrimaryFramebufferConfig;
using JobModel = render::Job::ModelO<PreparePrimaryFramebuffer, Output, Config>;
PreparePrimaryFramebuffer(float resolutionScale = 1.0f) : _resolutionScale{resolutionScale} {}
void configure(const Config& config);
void run(const render::RenderContextPointer& renderContext, Output& primaryFramebuffer);
gpu::FramebufferPointer _primaryFramebuffer;
float _resolutionScale{ 1.0f };
private:
static gpu::FramebufferPointer createFramebuffer(const char* name, const glm::uvec2& size);
};
class PrepareDeferred {
public:
// Inputs: primaryFramebuffer and lightingModel

View file

@ -1691,10 +1691,7 @@ public:
}
};
using packBlendshapeOffsetTo = void(glm::uvec4& packed, const BlendshapeOffsetUnpacked& unpacked);
void packBlendshapeOffsetTo_Pos_F32_3xSN10_Nor_3xSN10_Tan_3xSN10(glm::uvec4& packed, const BlendshapeOffsetUnpacked& unpacked) {
static void packBlendshapeOffsetTo_Pos_F32_3xSN10_Nor_3xSN10_Tan_3xSN10(glm::uvec4& packed, const BlendshapeOffsetUnpacked& unpacked) {
float len = glm::compMax(glm::abs(unpacked.positionOffset));
glm::vec3 normalizedPos(unpacked.positionOffset);
if (len > 0.0f) {
@ -1711,6 +1708,37 @@ void packBlendshapeOffsetTo_Pos_F32_3xSN10_Nor_3xSN10_Tan_3xSN10(glm::uvec4& pac
);
}
static void packBlendshapeOffsets_ref(BlendshapeOffsetUnpacked* unpacked, BlendshapeOffsetPacked* packed, int size) {
for (int i = 0; i < size; ++i) {
packBlendshapeOffsetTo_Pos_F32_3xSN10_Nor_3xSN10_Tan_3xSN10((*packed).packedPosNorTan, (*unpacked));
++unpacked;
++packed;
}
}
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__)
//
// Runtime CPU dispatch
//
#include <CPUDetect.h>
void packBlendshapeOffsets_AVX2(float (*unpacked)[9], uint32_t (*packed)[4], int size);
static void packBlendshapeOffsets(BlendshapeOffsetUnpacked* unpacked, BlendshapeOffsetPacked* packed, int size) {
static bool _cpuSupportsAVX2 = cpuSupportsAVX2();
if (_cpuSupportsAVX2) {
static_assert(sizeof(BlendshapeOffsetUnpacked) == 9 * sizeof(float), "struct BlendshapeOffsetUnpacked size doesn't match.");
static_assert(sizeof(BlendshapeOffsetPacked) == 4 * sizeof(uint32_t), "struct BlendshapeOffsetPacked size doesn't match.");
packBlendshapeOffsets_AVX2((float(*)[9])unpacked, (uint32_t(*)[4])packed, size);
} else {
packBlendshapeOffsets_ref(unpacked, packed, size);
}
}
#else // portable reference code
static auto& packBlendshapeOffsets = packBlendshapeOffsets_ref;
#endif
class Blender : public QRunnable {
public:
@ -1735,21 +1763,28 @@ Blender::Blender(ModelPointer model, HFMModel::ConstPointer hfmModel, int blendN
void Blender::run() {
DETAILED_PROFILE_RANGE_EX(simulation_animation, __FUNCTION__, 0xFFFF0000, 0, { { "url", _model->getURL().toString() } });
int numBlendshapeOffsets = 0; // number of offsets required for all meshes.
int maxBlendshapeOffsets = 0; // number of offsets in the largest mesh.
int numMeshes = 0; // number of meshes in this model.
for (auto meshIter = _hfmModel->meshes.cbegin(); meshIter != _hfmModel->meshes.cend(); ++meshIter) {
numMeshes++;
if (meshIter->blendshapes.isEmpty()) {
continue;
}
int numVertsInMesh = meshIter->vertices.size();
numBlendshapeOffsets += numVertsInMesh;
maxBlendshapeOffsets = std::max(maxBlendshapeOffsets, numVertsInMesh);
}
// all elements are default constructed to zero offsets.
QVector<BlendshapeOffset> packedBlendshapeOffsets(numBlendshapeOffsets);
QVector<BlendshapeOffsetUnpacked> unpackedBlendshapeOffsets(numBlendshapeOffsets);
// allocate the required size
// allocate the required sizes
QVector<int> blendedMeshSizes;
blendedMeshSizes.reserve(numMeshes);
QVector<BlendshapeOffset> packedBlendshapeOffsets;
packedBlendshapeOffsets.resize(numBlendshapeOffsets);
QVector<BlendshapeOffsetUnpacked> unpackedBlendshapeOffsets;
unpackedBlendshapeOffsets.resize(maxBlendshapeOffsets); // reuse for all meshes
int offset = 0;
for (auto meshIter = _hfmModel->meshes.cbegin(); meshIter != _hfmModel->meshes.cend(); ++meshIter) {
if (meshIter->blendshapes.isEmpty()) {
@ -1759,6 +1794,9 @@ void Blender::run() {
int numVertsInMesh = meshIter->vertices.size();
blendedMeshSizes.push_back(numVertsInMesh);
// initialize offsets to zero
memset(unpackedBlendshapeOffsets.data(), 0, numVertsInMesh * sizeof(BlendshapeOffsetUnpacked));
// for each blendshape in this mesh, accumulate the offsets into unpackedBlendshapeOffsets.
const float NORMAL_COEFFICIENT_SCALE = 0.01f;
for (int i = 0, n = qMin(_blendshapeCoefficients.size(), meshIter->blendshapes.size()); i < n; i++) {
@ -1773,7 +1811,7 @@ void Blender::run() {
for (int j = 0; j < blendshape.indices.size(); ++j) {
int index = blendshape.indices.at(j);
auto& currentBlendshapeOffset = unpackedBlendshapeOffsets[offset + index];
auto& currentBlendshapeOffset = unpackedBlendshapeOffsets[index];
currentBlendshapeOffset.positionOffset += blendshape.vertices.at(j) * vertexCoefficient;
currentBlendshapeOffset.normalOffset += blendshape.normals.at(j) * normalCoefficient;
if (j < blendshape.tangents.size()) {
@ -1781,20 +1819,15 @@ void Blender::run() {
}
}
}
// convert unpackedBlendshapeOffsets into packedBlendshapeOffsets for the gpu.
auto unpacked = unpackedBlendshapeOffsets.data();
auto packed = packedBlendshapeOffsets.data() + offset;
packBlendshapeOffsets(unpacked, packed, numVertsInMesh);
offset += numVertsInMesh;
}
// convert unpackedBlendshapeOffsets into packedBlendshapeOffsets for the gpu.
// FIXME it feels like we could be more effectively using SIMD here
{
auto unpacked = unpackedBlendshapeOffsets.data();
auto packed = packedBlendshapeOffsets.data();
for (int i = 0; i < unpackedBlendshapeOffsets.size(); ++i) {
packBlendshapeOffsetTo_Pos_F32_3xSN10_Nor_3xSN10_Tan_3xSN10((*packed).packedPosNorTan, (*unpacked));
++unpacked;
++packed;
}
}
Q_ASSERT(offset == numBlendshapeOffsets);
// post the result to the ModelBlender, which will dispatch to the model if still alive
QMetaObject::invokeMethod(DependencyManager::get<ModelBlender>().data(), "setBlendedVertices",

View file

@ -106,34 +106,6 @@ void DrawLayered3D::run(const RenderContextPointer& renderContext, const Inputs&
}
}
void CompositeHUD::run(const RenderContextPointer& renderContext, const gpu::FramebufferPointer& inputs) {
assert(renderContext->args);
assert(renderContext->args->_context);
// We do not want to render HUD elements in secondary camera
if (nsightActive() || renderContext->args->_renderMode == RenderArgs::RenderMode::SECONDARY_CAMERA_RENDER_MODE) {
return;
}
// Grab the HUD texture
#if !defined(DISABLE_QML)
gpu::doInBatch("CompositeHUD", renderContext->args->_context, [&](gpu::Batch& batch) {
glm::mat4 projMat;
Transform viewMat;
renderContext->args->getViewFrustum().evalProjectionMatrix(projMat);
renderContext->args->getViewFrustum().evalViewTransform(viewMat);
batch.setProjectionTransform(projMat);
batch.setViewTransform(viewMat, true);
if (inputs) {
batch.setFramebuffer(inputs);
}
if (renderContext->args->_hudOperator) {
renderContext->args->_hudOperator(batch, renderContext->args->_hudTexture, renderContext->args->_renderMode == RenderArgs::RenderMode::MIRROR_RENDER_MODE);
}
});
#endif
}
void Blit::run(const RenderContextPointer& renderContext, const gpu::FramebufferPointer& srcFramebuffer) {
assert(renderContext->args);
assert(renderContext->args->_context);
@ -205,6 +177,34 @@ void Blit::run(const RenderContextPointer& renderContext, const gpu::Framebuffer
});
}
void NewOrDefaultFramebuffer::run(const render::RenderContextPointer& renderContext, const Input& input, Output& output) {
RenderArgs* args = renderContext->args;
// auto frameSize = input;
glm::uvec2 frameSize(args->_viewport.z, args->_viewport.w);
output.reset();
// First if the default Framebuffer is the correct size then use it
auto destBlitFbo = args->_blitFramebuffer;
if (destBlitFbo && destBlitFbo->getSize() == frameSize) {
output = destBlitFbo;
return;
}
// Else use the lodal Framebuffer
if (_outputFramebuffer && _outputFramebuffer->getSize() != frameSize) {
_outputFramebuffer.reset();
}
if (!_outputFramebuffer) {
_outputFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("newFramebuffer.out"));
auto colorFormat = gpu::Element::COLOR_SRGBA_32;
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
auto colorTexture = gpu::Texture::createRenderBuffer(colorFormat, frameSize.x, frameSize.y, gpu::Texture::SINGLE_MIP, defaultSampler);
_outputFramebuffer->setRenderBuffer(0, colorTexture);
}
output = _outputFramebuffer;
}
void ResolveFramebuffer::run(const render::RenderContextPointer& renderContext, const Inputs& inputs, Outputs& outputs) {
RenderArgs* args = renderContext->args;
@ -235,42 +235,6 @@ void ResolveFramebuffer::run(const render::RenderContextPointer& renderContext,
});
}
void ResolveNewFramebuffer::run(const render::RenderContextPointer& renderContext, const Inputs& inputs, Outputs& outputs) {
RenderArgs* args = renderContext->args;
auto srcFbo = inputs;
outputs.reset();
// Check valid src
if (!srcFbo) {
return;
}
// Check valid size for sr and dest
auto frameSize(srcFbo->getSize());
// Resizing framebuffers instead of re-building them seems to cause issues with threaded rendering
if (_outputFramebuffer && _outputFramebuffer->getSize() != frameSize) {
_outputFramebuffer.reset();
}
if (!_outputFramebuffer) {
_outputFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("resolvedNew.out"));
auto colorFormat = gpu::Element::COLOR_SRGBA_32;
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
auto colorTexture = gpu::Texture::createRenderBuffer(colorFormat, frameSize.x, frameSize.y, gpu::Texture::SINGLE_MIP, defaultSampler);
_outputFramebuffer->setRenderBuffer(0, colorTexture);
}
gpu::Vec4i rectSrc;
rectSrc.z = frameSize.x;
rectSrc.w = frameSize.y;
gpu::doInBatch("ResolveNew", args->_context, [&](gpu::Batch& batch) { batch.blit(srcFbo, rectSrc, _outputFramebuffer, rectSrc); });
outputs = _outputFramebuffer;
}
void ExtractFrustums::run(const render::RenderContextPointer& renderContext, const Inputs& inputs, Outputs& output) {
assert(renderContext->args);
assert(renderContext->args->_context);

View file

@ -13,6 +13,8 @@
#include "LightStage.h"
#include "LightingModel.h"
class BeginGPURangeTimer {
public:
using JobModel = render::Job::ModelO<BeginGPURangeTimer, gpu::RangeTimerPointer>;
@ -75,16 +77,6 @@ protected:
bool _opaquePass { true };
};
class CompositeHUD {
public:
// IF specified the input Framebuffer is actively set by the batch of this job before calling the HUDOperator.
// If not, the current Framebuffer is left unchanged.
//using Inputs = gpu::FramebufferPointer;
using JobModel = render::Job::ModelI<CompositeHUD, gpu::FramebufferPointer>;
void run(const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& inputs);
};
class Blit {
public:
using JobModel = render::Job::ModelI<Blit, gpu::FramebufferPointer>;
@ -92,6 +84,16 @@ public:
void run(const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& srcFramebuffer);
};
class NewOrDefaultFramebuffer {
public:
using Input = glm::uvec2;
using Output = gpu::FramebufferPointer;
using JobModel = render::Job::ModelIO<NewOrDefaultFramebuffer, Input, Output>;
void run(const render::RenderContextPointer& renderContext, const Input& input, Output& output);
private:
gpu::FramebufferPointer _outputFramebuffer;
};
class ResolveFramebuffer {
public:
@ -102,18 +104,6 @@ public:
void run(const render::RenderContextPointer& renderContext, const Inputs& source, Outputs& dest);
};
class ResolveNewFramebuffer {
public:
using Inputs = gpu::FramebufferPointer;
using Outputs = gpu::FramebufferPointer;
using JobModel = render::Job::ModelIO<ResolveNewFramebuffer, Inputs, Outputs>;
void run(const render::RenderContextPointer& renderContext, const Inputs& source, Outputs& dest);
private:
gpu::FramebufferPointer _outputFramebuffer;
};
class ExtractFrustums {
public:

View file

@ -47,6 +47,7 @@
#include "FadeEffect.h"
#include "BloomStage.h"
#include "RenderUtilsLogging.h"
#include "RenderHUDLayerTask.h"
#include "AmbientOcclusionEffect.h"
#include "AntialiasingEffect.h"
@ -96,11 +97,8 @@ RenderDeferredTask::RenderDeferredTask()
void RenderDeferredTask::configure(const Config& config) {
// Propagate resolution scale to sub jobs who need it
auto preparePrimaryBufferConfig = config.getConfig<PreparePrimaryFramebuffer>("PreparePrimaryBuffer");
auto upsamplePrimaryBufferConfig = config.getConfig<Upsample>("PrimaryBufferUpscale");
assert(preparePrimaryBufferConfig);
assert(upsamplePrimaryBufferConfig);
preparePrimaryBufferConfig->setProperty("resolutionScale", config.resolutionScale);
upsamplePrimaryBufferConfig->setProperty("factor", 1.0f / config.resolutionScale);
preparePrimaryBufferConfig->setResolutionScale(config.resolutionScale);
}
void RenderDeferredTask::build(JobModel& task, const render::Varying& input, render::Varying& output) {
@ -232,8 +230,6 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
task.addJob<DrawLayered3D>("DrawInFrontOpaque", inFrontOpaquesInputs, true);
task.addJob<DrawLayered3D>("DrawInFrontTransparent", inFrontTransparentsInputs, false);
const auto toneAndPostRangeTimer = task.addJob<BeginGPURangeTimer>("BeginToneAndPostRangeTimer", "PostToneLayeredAntialiasing");
// AA job before bloom to limit flickering
const auto antialiasingInputs = Antialiasing::Inputs(deferredFrameTransform, lightingFramebuffer, linearDepthTarget, velocityBuffer).asVarying();
task.addJob<Antialiasing>("Antialiasing", antialiasingInputs);
@ -243,8 +239,8 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
task.addJob<BloomEffect>("Bloom", bloomInputs);
// Lighting Buffer ready for tone mapping
const auto toneMappingInputs = ToneMappingDeferred::Inputs(lightingFramebuffer, scaledPrimaryFramebuffer).asVarying();
task.addJob<ToneMappingDeferred>("ToneMapping", toneMappingInputs);
const auto toneMappingInputs = ToneMappingDeferred::Input(lightingFramebuffer, scaledPrimaryFramebuffer).asVarying();
const auto toneMappedBuffer = task.addJob<ToneMappingDeferred>("ToneMapping", toneMappingInputs);
// Debugging task is happening in the "over" layer after tone mapping and just before HUD
{ // Debug the bounds of the rendered items, still look at the zbuffer
@ -255,21 +251,11 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
}
// Upscale to finale resolution
const auto primaryFramebuffer = task.addJob<render::Upsample>("PrimaryBufferUpscale", scaledPrimaryFramebuffer);
const auto primaryFramebuffer = task.addJob<render::UpsampleToBlitFramebuffer>("PrimaryBufferUpscale", toneMappedBuffer);
// Composite the HUD and HUD overlays
task.addJob<CompositeHUD>("HUD", primaryFramebuffer);
const auto nullJitter = Varying(glm::vec2(0.0f, 0.0f));
const auto hudOpaquesInputs = DrawLayered3D::Inputs(hudOpaque, lightingModel, nullJitter).asVarying();
const auto hudTransparentsInputs = DrawLayered3D::Inputs(hudTransparent, lightingModel, nullJitter).asVarying();
task.addJob<DrawLayered3D>("DrawHUDOpaque", hudOpaquesInputs, true);
task.addJob<DrawLayered3D>("DrawHUDTransparent", hudTransparentsInputs, false);
task.addJob<EndGPURangeTimer>("ToneAndPostRangeTimer", toneAndPostRangeTimer);
// Blit!
task.addJob<Blit>("Blit", primaryFramebuffer);
// HUD Layer
const auto renderHUDLayerInputs = RenderHUDLayerTask::Input(primaryFramebuffer, lightingModel, hudOpaque, hudTransparent).asVarying();
task.addJob<RenderHUDLayerTask>("RenderHUDLayer", renderHUDLayerInputs);
}
RenderDeferredTaskDebug::RenderDeferredTaskDebug() {
@ -435,6 +421,44 @@ void RenderDeferredTaskDebug::build(JobModel& task, const render::Varying& input
}
gpu::FramebufferPointer PreparePrimaryFramebuffer::createFramebuffer(const char* name, const glm::uvec2& frameSize) {
gpu::FramebufferPointer framebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create(name));
auto colorFormat = gpu::Element::COLOR_SRGBA_32;
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
auto primaryColorTexture = gpu::Texture::createRenderBuffer(colorFormat, frameSize.x, frameSize.y, gpu::Texture::SINGLE_MIP, defaultSampler);
framebuffer->setRenderBuffer(0, primaryColorTexture);
auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format
auto primaryDepthTexture = gpu::Texture::createRenderBuffer(depthFormat, frameSize.x, frameSize.y, gpu::Texture::SINGLE_MIP, defaultSampler);
framebuffer->setDepthStencilBuffer(primaryDepthTexture, depthFormat);
return framebuffer;
}
void PreparePrimaryFramebuffer::configure(const Config& config) {
_resolutionScale = config.getResolutionScale();
}
void PreparePrimaryFramebuffer::run(const RenderContextPointer& renderContext, Output& primaryFramebuffer) {
glm::uvec2 frameSize(renderContext->args->_viewport.z, renderContext->args->_viewport.w);
glm::uvec2 scaledFrameSize(glm::vec2(frameSize) * _resolutionScale);
// Resizing framebuffers instead of re-building them seems to cause issues with threaded
// rendering
if (!_primaryFramebuffer || _primaryFramebuffer->getSize() != scaledFrameSize) {
_primaryFramebuffer = createFramebuffer("deferredPrimary", scaledFrameSize);
}
primaryFramebuffer = _primaryFramebuffer;
// Set viewport for the rest of the scaled passes
renderContext->args->_viewport.z = scaledFrameSize.x;
renderContext->args->_viewport.w = scaledFrameSize.y;
}
void RenderTransparentDeferred::run(const RenderContextPointer& renderContext, const Inputs& inputs) {
assert(renderContext->args);

View file

@ -149,4 +149,42 @@ public:
private:
};
class PreparePrimaryFramebufferConfig : public render::Job::Config {
Q_OBJECT
Q_PROPERTY(float resolutionScale WRITE setResolutionScale READ getResolutionScale)
public:
float getResolutionScale() const { return resolutionScale; }
void setResolutionScale(float scale) {
const float SCALE_RANGE_MIN = 0.1f;
const float SCALE_RANGE_MAX = 2.0f;
resolutionScale = std::max(SCALE_RANGE_MIN, std::min(SCALE_RANGE_MAX, scale));
}
signals:
void dirty();
protected:
float resolutionScale{ 1.0f };
};
class PreparePrimaryFramebuffer {
public:
using Output = gpu::FramebufferPointer;
using Config = PreparePrimaryFramebufferConfig;
using JobModel = render::Job::ModelO<PreparePrimaryFramebuffer, Output, Config>;
PreparePrimaryFramebuffer(float resolutionScale = 1.0f) : _resolutionScale{ resolutionScale } {}
void configure(const Config& config);
void run(const render::RenderContextPointer& renderContext, Output& primaryFramebuffer);
gpu::FramebufferPointer _primaryFramebuffer;
float _resolutionScale{ 1.0f };
private:
static gpu::FramebufferPointer createFramebuffer(const char* name, const glm::uvec2& size);
};
#endif // hifi_RenderDeferredTask_h

View file

@ -19,6 +19,7 @@
#include <gpu/Texture.h>
#include <graphics/ShaderConstants.h>
#include <render/ShapePipeline.h>
#include <render/ResampleTask.h>
#include <render/FilterTask.h>
@ -32,6 +33,7 @@
#include "FramebufferCache.h"
#include "TextureCache.h"
#include "RenderCommonTask.h"
#include "RenderHUDLayerTask.h"
namespace ru {
using render_utils::slot::texture::Texture;
@ -47,6 +49,13 @@ using namespace render;
extern void initForwardPipelines(ShapePlumber& plumber);
void RenderForwardTask::configure(const Config& config) {
// Propagate resolution scale to sub jobs who need it
auto preparePrimaryBufferConfig = config.getConfig<PreparePrimaryFramebufferMSAA>("PreparePrimaryBuffer");
assert(preparePrimaryBufferConfig);
preparePrimaryBufferConfig->setResolutionScale(config.resolutionScale);
}
void RenderForwardTask::build(JobModel& task, const render::Varying& input, render::Varying& output) {
task.addJob<SetRenderMethod>("SetRenderMethodTask", render::Args::FORWARD);
@ -87,16 +96,19 @@ void RenderForwardTask::build(JobModel& task, const render::Varying& input, rend
// First job, alter faded
fadeEffect->build(task, opaques);
// Prepare objects shared by several jobs
const auto deferredFrameTransform = task.addJob<GenerateDeferredFrameTransform>("DeferredFrameTransform");
// GPU jobs: Start preparing the main framebuffer
const auto framebuffer = task.addJob<PrepareFramebuffer>("PrepareFramebuffer");
const auto scaledPrimaryFramebuffer = task.addJob<PreparePrimaryFramebufferMSAA>("PreparePrimaryBuffer");
task.addJob<PrepareForward>("PrepareForward", lightFrame);
// Prepare deferred, generate the shared Deferred Frame Transform. Only valid with the scaled frame buffer
const auto deferredFrameTransform = task.addJob<GenerateDeferredFrameTransform>("DeferredFrameTransform");
// Prepare Forward Framebuffer pass
const auto prepareForwardInputs = PrepareForward::Inputs(scaledPrimaryFramebuffer, lightFrame).asVarying();
task.addJob<PrepareForward>("PrepareForward", prepareForwardInputs);
// draw a stencil mask in hidden regions of the framebuffer.
task.addJob<PrepareStencil>("PrepareStencil", framebuffer);
task.addJob<PrepareStencil>("PrepareStencil", scaledPrimaryFramebuffer);
// Draw opaques forward
const auto opaqueInputs = DrawForward::Inputs(opaques, lightingModel).asVarying();
@ -128,94 +140,103 @@ void RenderForwardTask::build(JobModel& task, const render::Varying& input, rend
task.addJob<DebugZoneLighting>("DrawZoneStack", debugZoneInputs);
}
// Just resolve the msaa
const auto resolveInputs =
ResolveFramebuffer::Inputs(framebuffer, static_cast<gpu::FramebufferPointer>(nullptr)).asVarying();
const auto resolvedFramebuffer = task.addJob<ResolveFramebuffer>("Resolve", resolveInputs);
//auto resolvedFramebuffer = task.addJob<ResolveNewFramebuffer>("Resolve", framebuffer);
#if defined(Q_OS_ANDROID)
// Just resolve the msaa
const auto resolveInputs = ResolveFramebuffer::Inputs(scaledPrimaryFramebuffer, static_cast<gpu::FramebufferPointer>(nullptr)).asVarying();
const auto resolvedFramebuffer = task.addJob<ResolveFramebuffer>("Resolve", resolveInputs);
const auto toneMappedBuffer = resolvedFramebuffer;
#else
const auto newResolvedFramebuffer = task.addJob<NewOrDefaultFramebuffer>("MakeResolvingFramebuffer");
// Just resolve the msaa
const auto resolveInputs = ResolveFramebuffer::Inputs(scaledPrimaryFramebuffer, newResolvedFramebuffer).asVarying();
const auto resolvedFramebuffer = task.addJob<ResolveFramebuffer>("Resolve", resolveInputs);
// Lighting Buffer ready for tone mapping
// Forward rendering on GLES doesn't support tonemapping to and from the same FBO, so we specify
// the output FBO as null, which causes the tonemapping to target the blit framebuffer
const auto toneMappingInputs = ToneMappingDeferred::Inputs(resolvedFramebuffer, static_cast<gpu::FramebufferPointer>(nullptr)).asVarying();
task.addJob<ToneMappingDeferred>("ToneMapping", toneMappingInputs);
const auto toneMappingInputs = ToneMappingDeferred::Input(resolvedFramebuffer, resolvedFramebuffer).asVarying();
const auto toneMappedBuffer = task.addJob<ToneMappingDeferred>("ToneMapping", toneMappingInputs);
#endif
// Layered Overlays
// Composite the HUD and HUD overlays
task.addJob<CompositeHUD>("HUD", resolvedFramebuffer);
// Upscale to finale resolution
const auto primaryFramebuffer = task.addJob<render::UpsampleToBlitFramebuffer>("PrimaryBufferUpscale", toneMappedBuffer);
const auto hudOpaquesInputs = DrawLayered3D::Inputs(hudOpaque, lightingModel, nullJitter).asVarying();
const auto hudTransparentsInputs = DrawLayered3D::Inputs(hudTransparent, lightingModel, nullJitter).asVarying();
task.addJob<DrawLayered3D>("DrawHUDOpaque", hudOpaquesInputs, true);
task.addJob<DrawLayered3D>("DrawHUDTransparent", hudTransparentsInputs, false);
// Disable blit because we do tonemapping and compositing directly to the blit FBO
// Blit!
// task.addJob<Blit>("Blit", framebuffer);
// HUD Layer
const auto renderHUDLayerInputs = RenderHUDLayerTask::Input(primaryFramebuffer, lightingModel, hudOpaque, hudTransparent).asVarying();
task.addJob<RenderHUDLayerTask>("RenderHUDLayer", renderHUDLayerInputs);
}
void PrepareFramebuffer::configure(const Config& config) {
gpu::FramebufferPointer PreparePrimaryFramebufferMSAA::createFramebuffer(const char* name, const glm::uvec2& frameSize, int numSamples) {
gpu::FramebufferPointer framebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create(name));
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
auto colorFormat = gpu::Element::COLOR_SRGBA_32;
auto colorTexture =
gpu::Texture::createRenderBufferMultisample(colorFormat, frameSize.x, frameSize.y, numSamples, defaultSampler);
framebuffer->setRenderBuffer(0, colorTexture);
auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format
auto depthTexture =
gpu::Texture::createRenderBufferMultisample(depthFormat, frameSize.x, frameSize.y, numSamples, defaultSampler);
framebuffer->setDepthStencilBuffer(depthTexture, depthFormat);
return framebuffer;
}
void PreparePrimaryFramebufferMSAA::configure(const Config& config) {
_resolutionScale = config.getResolutionScale();
_numSamples = config.getNumSamples();
}
void PrepareFramebuffer::run(const RenderContextPointer& renderContext, gpu::FramebufferPointer& framebuffer) {
void PreparePrimaryFramebufferMSAA::run(const RenderContextPointer& renderContext, gpu::FramebufferPointer& framebuffer) {
glm::uvec2 frameSize(renderContext->args->_viewport.z, renderContext->args->_viewport.w);
glm::uvec2 scaledFrameSize(glm::vec2(frameSize) * _resolutionScale);
// Resizing framebuffers instead of re-building them seems to cause issues with threaded rendering
if (_framebuffer && (_framebuffer->getSize() != frameSize || _framebuffer->getNumSamples() != _numSamples)) {
_framebuffer.reset();
if (!_framebuffer || (_framebuffer->getSize() != scaledFrameSize) || (_framebuffer->getNumSamples() != _numSamples)) {
_framebuffer = createFramebuffer("forward", scaledFrameSize, _numSamples);
}
if (!_framebuffer) {
_framebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("forward"));
int numSamples = _numSamples;
auto colorFormat = gpu::Element::COLOR_SRGBA_32;
auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_LINEAR);
auto colorTexture =
gpu::Texture::createRenderBufferMultisample(colorFormat, frameSize.x, frameSize.y, numSamples, defaultSampler);
_framebuffer->setRenderBuffer(0, colorTexture);
auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format
auto depthTexture =
gpu::Texture::createRenderBufferMultisample(depthFormat, frameSize.x, frameSize.y, numSamples, defaultSampler);
_framebuffer->setDepthStencilBuffer(depthTexture, depthFormat);
}
auto args = renderContext->args;
gpu::doInBatch("PrepareFramebuffer::run", args->_context, [&](gpu::Batch& batch) {
batch.enableStereo(false);
batch.setViewportTransform(args->_viewport);
batch.setStateScissorRect(args->_viewport);
batch.setFramebuffer(_framebuffer);
batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0 | gpu::Framebuffer::BUFFER_DEPTH |
gpu::Framebuffer::BUFFER_STENCIL,
vec4(vec3(0), 0), 1.0, 0, true);
});
framebuffer = _framebuffer;
// Set viewport for the rest of the scaled passes
renderContext->args->_viewport.z = scaledFrameSize.x;
renderContext->args->_viewport.w = scaledFrameSize.y;
}
void PrepareForward::run(const RenderContextPointer& renderContext, const Inputs& inputs) {
RenderArgs* args = renderContext->args;
auto primaryFramebuffer = inputs.get0();
auto lightStageFrame = inputs.get1();
gpu::doInBatch("RenderForward::Draw::run", args->_context, [&](gpu::Batch& batch) {
args->_batch = &batch;
batch.enableStereo(false);
batch.setViewportTransform(args->_viewport);
batch.setStateScissorRect(args->_viewport);
batch.setFramebuffer(primaryFramebuffer);
batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0 | gpu::Framebuffer::BUFFER_DEPTH |
gpu::Framebuffer::BUFFER_STENCIL,
vec4(vec3(0), 0), 1.0, 0, true);
graphics::LightPointer keySunLight;
auto lightStage = args->_scene->getStage<LightStage>();
if (lightStage) {
keySunLight = lightStage->getCurrentKeyLight(*inputs);
keySunLight = lightStage->getCurrentKeyLight(*lightStageFrame);
}
graphics::LightPointer keyAmbiLight;
if (lightStage) {
keyAmbiLight = lightStage->getCurrentAmbientLight(*inputs);
keyAmbiLight = lightStage->getCurrentAmbientLight(*lightStageFrame);
}
if (keySunLight) {

View file

@ -17,39 +17,59 @@
#include "AssembleLightingStageTask.h"
#include "LightingModel.h"
class RenderForwardTaskConfig : public render::Task::Config {
Q_OBJECT
Q_PROPERTY(float resolutionScale MEMBER resolutionScale NOTIFY dirty)
public:
float resolutionScale{ 1.f };
signals:
void dirty();
};
class RenderForwardTask {
public:
using Input = render::VaryingSet3<RenderFetchCullSortTask::Output, LightingModelPointer, AssembleLightingStageTask::Output>;
using JobModel = render::Task::ModelI<RenderForwardTask, Input>;
using Config = RenderForwardTaskConfig;
using JobModel = render::Task::ModelI<RenderForwardTask, Input, Config>;
RenderForwardTask() {}
void configure(const Config& config);
void build(JobModel& task, const render::Varying& input, render::Varying& output);
};
class PrepareFramebufferConfig : public render::Job::Config {
class PreparePrimaryFramebufferMSAAConfig : public render::Job::Config {
Q_OBJECT
Q_PROPERTY(int numSamples WRITE setNumSamples READ getNumSamples NOTIFY dirty)
Q_PROPERTY(float resolutionScale WRITE setResolutionScale READ getResolutionScale)
Q_PROPERTY(int numSamples WRITE setNumSamples READ getNumSamples)
public:
float getResolutionScale() const { return resolutionScale; }
void setResolutionScale(float scale) {
const float SCALE_RANGE_MIN = 0.1f;
const float SCALE_RANGE_MAX = 2.0f;
resolutionScale = std::max(SCALE_RANGE_MIN, std::min(SCALE_RANGE_MAX, scale));
}
int getNumSamples() const { return numSamples; }
void setNumSamples(int num) {
numSamples = std::max(1, std::min(32, num));
emit dirty();
}
signals:
void dirty();
protected:
float resolutionScale{ 1.0f };
int numSamples{ 4 };
};
class PrepareFramebuffer {
class PreparePrimaryFramebufferMSAA {
public:
using Inputs = gpu::FramebufferPointer;
using Config = PrepareFramebufferConfig;
using JobModel = render::Job::ModelO<PrepareFramebuffer, Inputs, Config>;
using Output = gpu::FramebufferPointer;
using Config = PreparePrimaryFramebufferMSAAConfig;
using JobModel = render::Job::ModelO<PreparePrimaryFramebufferMSAA, Output, Config>;
void configure(const Config& config);
void run(const render::RenderContextPointer& renderContext,
@ -57,12 +77,15 @@ public:
private:
gpu::FramebufferPointer _framebuffer;
float _resolutionScale{ 1.0f };
int _numSamples;
static gpu::FramebufferPointer createFramebuffer(const char* name, const glm::uvec2& frameSize, int numSamples);
};
class PrepareForward {
public:
using Inputs = LightStage::FramePointer;
using Inputs = render::VaryingSet2 <gpu::FramebufferPointer, LightStage::FramePointer>;
using JobModel = render::Job::ModelI<PrepareForward, Inputs>;
void run(const render::RenderContextPointer& renderContext,

View file

@ -0,0 +1,60 @@
//
// Created by Sam Gateau on 2019/06/14
// Copyright 2013-2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "RenderHUDLayerTask.h"
#include <gpu/Context.h>
#include "RenderCommonTask.h"
using namespace render;
void CompositeHUD::run(const RenderContextPointer& renderContext, const gpu::FramebufferPointer& inputs) {
assert(renderContext->args);
assert(renderContext->args->_context);
// We do not want to render HUD elements in secondary camera
if (nsightActive() || renderContext->args->_renderMode == RenderArgs::RenderMode::SECONDARY_CAMERA_RENDER_MODE) {
return;
}
// Grab the HUD texture
#if !defined(DISABLE_QML)
gpu::doInBatch("CompositeHUD", renderContext->args->_context, [&](gpu::Batch& batch) {
glm::mat4 projMat;
Transform viewMat;
renderContext->args->getViewFrustum().evalProjectionMatrix(projMat);
renderContext->args->getViewFrustum().evalViewTransform(viewMat);
batch.setProjectionTransform(projMat);
batch.setViewTransform(viewMat, true);
if (inputs) {
batch.setFramebuffer(inputs);
}
if (renderContext->args->_hudOperator) {
renderContext->args->_hudOperator(batch, renderContext->args->_hudTexture, renderContext->args->_renderMode == RenderArgs::RenderMode::MIRROR_RENDER_MODE);
}
});
#endif
}
void RenderHUDLayerTask::build(JobModel& task, const render::Varying& input, render::Varying& output) {
const auto& inputs = input.get<Input>();
const auto& primaryFramebuffer = inputs[0];
const auto& lightingModel = inputs[1];
const auto& hudOpaque = inputs[2];
const auto& hudTransparent = inputs[3];
// Composite the HUD and HUD overlays
task.addJob<CompositeHUD>("HUD", primaryFramebuffer);
// And HUD Layer objects
const auto nullJitter = Varying(glm::vec2(0.0f, 0.0f));
const auto hudOpaquesInputs = DrawLayered3D::Inputs(hudOpaque, lightingModel, nullJitter).asVarying();
const auto hudTransparentsInputs = DrawLayered3D::Inputs(hudTransparent, lightingModel, nullJitter).asVarying();
task.addJob<DrawLayered3D>("DrawHUDOpaque", hudOpaquesInputs, true);
task.addJob<DrawLayered3D>("DrawHUDTransparent", hudTransparentsInputs, false);
}

View file

@ -0,0 +1,34 @@
//
// Created by Sam Gateau on 2019/06/14
// Copyright 2013-2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_RenderHUDLayerTask_h
#define hifi_RenderHUDLayerTask_h
#include "LightingModel.h"
class CompositeHUD {
public:
// IF specified the input Framebuffer is actively set by the batch of this job before calling the HUDOperator.
// If not, the current Framebuffer is left unchanged.
//using Inputs = gpu::FramebufferPointer;
using JobModel = render::Job::ModelI<CompositeHUD, gpu::FramebufferPointer>;
void run(const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& inputs);
};
class RenderHUDLayerTask {
public:
// Framebuffer where to draw, lighting model, opaque items, transparent items
using Input = render::VaryingSet4<gpu::FramebufferPointer, LightingModelPointer, render::ItemBounds, render::ItemBounds>;
using JobModel = render::Task::ModelI<RenderHUDLayerTask, Input>;
void build(JobModel& task, const render::Varying& input, render::Varying& output);
};
#endif // hifi_RenderHUDLayerTask_h

View file

@ -47,14 +47,13 @@ void ToneMappingEffect::setToneCurve(ToneCurve curve) {
}
}
void ToneMappingEffect::render(RenderArgs* args, const gpu::TexturePointer& lightingBuffer, const gpu::FramebufferPointer& requestedDestinationFramebuffer) {
void ToneMappingEffect::render(RenderArgs* args, const gpu::TexturePointer& lightingBuffer, const gpu::FramebufferPointer& destinationFramebuffer) {
if (!_blitLightBuffer) {
init(args);
}
auto destinationFramebuffer = requestedDestinationFramebuffer;
if (!destinationFramebuffer) {
destinationFramebuffer = args->_blitFramebuffer;
if (!lightingBuffer || !destinationFramebuffer) {
return;
}
auto framebufferSize = glm::ivec2(lightingBuffer->getDimensions());
@ -83,9 +82,15 @@ void ToneMappingDeferred::configure(const Config& config) {
_toneMappingEffect.setToneCurve((ToneMappingEffect::ToneCurve)config.curve);
}
void ToneMappingDeferred::run(const render::RenderContextPointer& renderContext, const Inputs& inputs) {
void ToneMappingDeferred::run(const render::RenderContextPointer& renderContext, const Input& input, Output& output) {
auto lightingBuffer = input.get0()->getRenderBuffer(0);
auto destFbo = input.get1();
if (!destFbo) {
destFbo = renderContext->args->_blitFramebuffer;
}
auto lightingBuffer = inputs.get0()->getRenderBuffer(0);
auto destFbo = inputs.get1();
_toneMappingEffect.render(renderContext->args, lightingBuffer, destFbo);
output = destFbo;
}

View file

@ -82,12 +82,13 @@ signals:
class ToneMappingDeferred {
public:
// Inputs: lightingFramebuffer, destinationFramebuffer
using Inputs = render::VaryingSet2<gpu::FramebufferPointer, gpu::FramebufferPointer>;
using Input = render::VaryingSet2<gpu::FramebufferPointer, gpu::FramebufferPointer>;
using Output = gpu::FramebufferPointer;
using Config = ToneMappingConfig;
using JobModel = render::Job::ModelI<ToneMappingDeferred, Inputs, Config>;
using JobModel = render::Job::ModelIO<ToneMappingDeferred, Input, Output, Config>;
void configure(const Config& config);
void run(const render::RenderContextPointer& renderContext, const Inputs& inputs);
void run(const render::RenderContextPointer& renderContext, const Input& input, Output& output);
ToneMappingEffect _toneMappingEffect;
};

View file

@ -135,3 +135,43 @@ void Upsample::run(const RenderContextPointer& renderContext, const gpu::Framebu
args->_viewport = viewport;
}
}
gpu::PipelinePointer UpsampleToBlitFramebuffer::_pipeline;
void UpsampleToBlitFramebuffer::run(const RenderContextPointer& renderContext, const Input& input, gpu::FramebufferPointer& resampledFrameBuffer) {
assert(renderContext->args);
assert(renderContext->args->hasViewFrustum());
RenderArgs* args = renderContext->args;
auto sourceFramebuffer = input;
resampledFrameBuffer = args->_blitFramebuffer;
if (resampledFrameBuffer != sourceFramebuffer) {
if (!_pipeline) {
gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::drawTransformUnitQuadTextureOpaque);
gpu::StatePointer state = gpu::StatePointer(new gpu::State());
state->setDepthTest(gpu::State::DepthTest(false, false));
_pipeline = gpu::Pipeline::create(program, state);
}
const auto bufferSize = resampledFrameBuffer->getSize();
glm::ivec4 viewport{ 0, 0, bufferSize.x, bufferSize.y };
gpu::doInBatch("Upsample::run", args->_context, [&](gpu::Batch& batch) {
batch.enableStereo(false);
batch.setFramebuffer(resampledFrameBuffer);
batch.setViewportTransform(viewport);
batch.setProjectionTransform(glm::mat4());
batch.resetViewTransform();
batch.setPipeline(_pipeline);
batch.setModelTransform(gpu::Framebuffer::evalSubregionTexcoordTransform(bufferSize, viewport));
batch.setResourceTexture(0, sourceFramebuffer->getRenderBuffer(0));
batch.draw(gpu::TRIANGLE_STRIP, 4);
});
// Set full final viewport
args->_viewport = viewport;
}
}

View file

@ -67,6 +67,20 @@ namespace render {
gpu::FramebufferPointer getResampledFrameBuffer(const gpu::FramebufferPointer& sourceFramebuffer);
};
class UpsampleToBlitFramebuffer {
public:
using Input = gpu::FramebufferPointer;
using JobModel = Job::ModelIO<UpsampleToBlitFramebuffer, Input, gpu::FramebufferPointer>;
UpsampleToBlitFramebuffer() {}
void run(const RenderContextPointer& renderContext, const Input& input, gpu::FramebufferPointer& resampledFrameBuffer);
protected:
static gpu::PipelinePointer _pipeline;
};
}
#endif // hifi_render_ResampleTask_h

View file

@ -45,7 +45,7 @@ namespace PrioritySortUtil {
class PriorityQueue {
public:
PriorityQueue() = delete;
PriorityQueue(const ConicalViewFrustums& views) : _views(views) { }
PriorityQueue(const ConicalViewFrustums& views) : _views(views), _usecCurrentTime(usecTimestampNow()) { }
PriorityQueue(const ConicalViewFrustums& views, float angularWeight, float centerWeight, float ageWeight)
: _views(views), _angularWeight(angularWeight), _centerWeight(centerWeight), _ageWeight(ageWeight)
, _usecCurrentTime(usecTimestampNow()) {

View file

@ -0,0 +1,285 @@
//
// BlendshapePacking_avx2.cpp
//
// Created by Ken Cooke on 6/22/19.
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifdef __AVX2__
#include <stdint.h>
#include <immintrin.h>
void packBlendshapeOffsets_AVX2(float (*unpacked)[9], uint32_t (*packed)[4], int size) {
int i = 0;
for (; i < size - 7; i += 8) { // blocks of 8
//
// deinterleave (8x9 to 9x8 matrix transpose)
//
__m256 s0 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+0][0])), _mm_loadu_ps(&unpacked[i+4][0]), 1);
__m256 s1 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+1][0])), _mm_loadu_ps(&unpacked[i+5][0]), 1);
__m256 s2 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+2][0])), _mm_loadu_ps(&unpacked[i+6][0]), 1);
__m256 s3 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+3][0])), _mm_loadu_ps(&unpacked[i+7][0]), 1);
__m256 s4 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+0][4])), _mm_loadu_ps(&unpacked[i+4][4]), 1);
__m256 s5 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+1][4])), _mm_loadu_ps(&unpacked[i+5][4]), 1);
__m256 s6 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+2][4])), _mm_loadu_ps(&unpacked[i+6][4]), 1);
__m256 s7 = _mm256_insertf128_ps(_mm256_castps128_ps256(_mm_loadu_ps(&unpacked[i+3][4])), _mm_loadu_ps(&unpacked[i+7][4]), 1);
__m256 t0 = _mm256_unpacklo_ps(s0, s1);
__m256 t1 = _mm256_unpackhi_ps(s0, s1);
__m256 t2 = _mm256_unpacklo_ps(s2, s3);
__m256 t3 = _mm256_unpackhi_ps(s2, s3);
__m256 t4 = _mm256_unpacklo_ps(s4, s5);
__m256 t5 = _mm256_unpackhi_ps(s4, s5);
__m256 t6 = _mm256_unpacklo_ps(s6, s7);
__m256 t7 = _mm256_unpackhi_ps(s6, s7);
__m256 px = _mm256_shuffle_ps(t0, t2, _MM_SHUFFLE(1,0,1,0));
__m256 py = _mm256_shuffle_ps(t0, t2, _MM_SHUFFLE(3,2,3,2));
__m256 pz = _mm256_shuffle_ps(t1, t3, _MM_SHUFFLE(1,0,1,0));
__m256 nx = _mm256_shuffle_ps(t1, t3, _MM_SHUFFLE(3,2,3,2));
__m256 ny = _mm256_shuffle_ps(t4, t6, _MM_SHUFFLE(1,0,1,0));
__m256 nz = _mm256_shuffle_ps(t4, t6, _MM_SHUFFLE(3,2,3,2));
__m256 tx = _mm256_shuffle_ps(t5, t7, _MM_SHUFFLE(1,0,1,0));
__m256 ty = _mm256_shuffle_ps(t5, t7, _MM_SHUFFLE(3,2,3,2));
__m256 tz = _mm256_i32gather_ps(unpacked[i+0], _mm256_setr_epi32(8,17,26,35,44,53,62,71), sizeof(float));
// abs(pos)
__m256 apx = _mm256_andnot_ps(_mm256_set1_ps(-0.0f), px);
__m256 apy = _mm256_andnot_ps(_mm256_set1_ps(-0.0f), py);
__m256 apz = _mm256_andnot_ps(_mm256_set1_ps(-0.0f), pz);
// len = compMax(abs(pos))
__m256 len = _mm256_max_ps(_mm256_max_ps(apx, apy), apz);
// detect zeros
__m256 mask = _mm256_cmp_ps(len, _mm256_setzero_ps(), _CMP_EQ_OQ);
// rcp = 1.0f / len
__m256 rcp = _mm256_div_ps(_mm256_set1_ps(1.0f), len);
// replace +inf with 1.0f
rcp = _mm256_blendv_ps(rcp, _mm256_set1_ps(1.0f), mask);
len = _mm256_blendv_ps(len, _mm256_set1_ps(1.0f), mask);
// pos *= 1.0f / len
px = _mm256_mul_ps(px, rcp);
py = _mm256_mul_ps(py, rcp);
pz = _mm256_mul_ps(pz, rcp);
// clamp(vec, -1.0f, 1.0f)
px = _mm256_min_ps(_mm256_max_ps(px, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
py = _mm256_min_ps(_mm256_max_ps(py, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
pz = _mm256_min_ps(_mm256_max_ps(pz, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
nx = _mm256_min_ps(_mm256_max_ps(nx, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
ny = _mm256_min_ps(_mm256_max_ps(ny, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
nz = _mm256_min_ps(_mm256_max_ps(nz, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
tx = _mm256_min_ps(_mm256_max_ps(tx, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
ty = _mm256_min_ps(_mm256_max_ps(ty, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
tz = _mm256_min_ps(_mm256_max_ps(tz, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
// vec *= 511.0f
px = _mm256_mul_ps(px, _mm256_set1_ps(511.0f));
py = _mm256_mul_ps(py, _mm256_set1_ps(511.0f));
pz = _mm256_mul_ps(pz, _mm256_set1_ps(511.0f));
nx = _mm256_mul_ps(nx, _mm256_set1_ps(511.0f));
ny = _mm256_mul_ps(ny, _mm256_set1_ps(511.0f));
nz = _mm256_mul_ps(nz, _mm256_set1_ps(511.0f));
tx = _mm256_mul_ps(tx, _mm256_set1_ps(511.0f));
ty = _mm256_mul_ps(ty, _mm256_set1_ps(511.0f));
tz = _mm256_mul_ps(tz, _mm256_set1_ps(511.0f));
// veci = lrint(vec) & 03ff
__m256i pxi = _mm256_and_si256(_mm256_cvtps_epi32(px), _mm256_set1_epi32(0x3ff));
__m256i pyi = _mm256_and_si256(_mm256_cvtps_epi32(py), _mm256_set1_epi32(0x3ff));
__m256i pzi = _mm256_and_si256(_mm256_cvtps_epi32(pz), _mm256_set1_epi32(0x3ff));
__m256i nxi = _mm256_and_si256(_mm256_cvtps_epi32(nx), _mm256_set1_epi32(0x3ff));
__m256i nyi = _mm256_and_si256(_mm256_cvtps_epi32(ny), _mm256_set1_epi32(0x3ff));
__m256i nzi = _mm256_and_si256(_mm256_cvtps_epi32(nz), _mm256_set1_epi32(0x3ff));
__m256i txi = _mm256_and_si256(_mm256_cvtps_epi32(tx), _mm256_set1_epi32(0x3ff));
__m256i tyi = _mm256_and_si256(_mm256_cvtps_epi32(ty), _mm256_set1_epi32(0x3ff));
__m256i tzi = _mm256_and_si256(_mm256_cvtps_epi32(tz), _mm256_set1_epi32(0x3ff));
// pack = (xi << 0) | (yi << 10) | (zi << 20);
__m256i li = _mm256_castps_si256(len); // length
__m256i pi = _mm256_or_si256(_mm256_or_si256(pxi, _mm256_slli_epi32(pyi, 10)), _mm256_slli_epi32(pzi, 20)); // position
__m256i ni = _mm256_or_si256(_mm256_or_si256(nxi, _mm256_slli_epi32(nyi, 10)), _mm256_slli_epi32(nzi, 20)); // normal
__m256i ti = _mm256_or_si256(_mm256_or_si256(txi, _mm256_slli_epi32(tyi, 10)), _mm256_slli_epi32(tzi, 20)); // tangent
//
// interleave (4x4 matrix transpose)
//
__m256i u0 = _mm256_unpacklo_epi32(li, pi);
__m256i u1 = _mm256_unpackhi_epi32(li, pi);
__m256i u2 = _mm256_unpacklo_epi32(ni, ti);
__m256i u3 = _mm256_unpackhi_epi32(ni, ti);
__m256i v0 = _mm256_unpacklo_epi64(u0, u2);
__m256i v1 = _mm256_unpackhi_epi64(u0, u2);
__m256i v2 = _mm256_unpacklo_epi64(u1, u3);
__m256i v3 = _mm256_unpackhi_epi64(u1, u3);
__m256i w0 = _mm256_permute2f128_si256(v0, v1, 0x20);
__m256i w1 = _mm256_permute2f128_si256(v2, v3, 0x20);
__m256i w2 = _mm256_permute2f128_si256(v0, v1, 0x31);
__m256i w3 = _mm256_permute2f128_si256(v2, v3, 0x31);
// store pack x 8
_mm256_storeu_si256((__m256i*)packed[i+0], w0);
_mm256_storeu_si256((__m256i*)packed[i+2], w1);
_mm256_storeu_si256((__m256i*)packed[i+4], w2);
_mm256_storeu_si256((__m256i*)packed[i+6], w3);
}
if (i < size) { // remainder
int rem = size - i;
//
// deinterleave (8x9 to 9x8 matrix transpose)
//
__m256 s0 = _mm256_setzero_ps();
__m256 s1 = _mm256_setzero_ps();
__m256 s2 = _mm256_setzero_ps();
__m256 s3 = _mm256_setzero_ps();
__m256 s4 = _mm256_setzero_ps();
__m256 s5 = _mm256_setzero_ps();
__m256 s6 = _mm256_setzero_ps();
__m256 s7 = _mm256_setzero_ps();
switch (rem) {
case 7: s6 = _mm256_loadu_ps(unpacked[i+6]);
case 6: s5 = _mm256_loadu_ps(unpacked[i+5]);
case 5: s4 = _mm256_loadu_ps(unpacked[i+4]);
case 4: s3 = _mm256_loadu_ps(unpacked[i+3]);
case 3: s2 = _mm256_loadu_ps(unpacked[i+2]);
case 2: s1 = _mm256_loadu_ps(unpacked[i+1]);
case 1: s0 = _mm256_loadu_ps(unpacked[i+0]);
}
__m256 t0 = _mm256_unpacklo_ps(s0, s1);
__m256 t1 = _mm256_unpackhi_ps(s0, s1);
__m256 t2 = _mm256_unpacklo_ps(s2, s3);
__m256 t3 = _mm256_unpackhi_ps(s2, s3);
__m256 t4 = _mm256_unpacklo_ps(s4, s5);
__m256 t5 = _mm256_unpackhi_ps(s4, s5);
__m256 t6 = _mm256_unpacklo_ps(s6, s7);
__m256 t7 = _mm256_unpackhi_ps(s6, s7);
s0 = _mm256_shuffle_ps(t0, t2, _MM_SHUFFLE(1,0,1,0));
s1 = _mm256_shuffle_ps(t0, t2, _MM_SHUFFLE(3,2,3,2));
s2 = _mm256_shuffle_ps(t1, t3, _MM_SHUFFLE(1,0,1,0));
s3 = _mm256_shuffle_ps(t1, t3, _MM_SHUFFLE(3,2,3,2));
s4 = _mm256_shuffle_ps(t4, t6, _MM_SHUFFLE(1,0,1,0));
s5 = _mm256_shuffle_ps(t4, t6, _MM_SHUFFLE(3,2,3,2));
s6 = _mm256_shuffle_ps(t5, t7, _MM_SHUFFLE(1,0,1,0));
s7 = _mm256_shuffle_ps(t5, t7, _MM_SHUFFLE(3,2,3,2));
__m256 px = _mm256_permute2f128_ps(s0, s4, 0x20);
__m256 py = _mm256_permute2f128_ps(s1, s5, 0x20);
__m256 pz = _mm256_permute2f128_ps(s2, s6, 0x20);
__m256 nx = _mm256_permute2f128_ps(s3, s7, 0x20);
__m256 ny = _mm256_permute2f128_ps(s0, s4, 0x31);
__m256 nz = _mm256_permute2f128_ps(s1, s5, 0x31);
__m256 tx = _mm256_permute2f128_ps(s2, s6, 0x31);
__m256 ty = _mm256_permute2f128_ps(s3, s7, 0x31);
__m256i loadmask = _mm256_cvtepi8_epi32(_mm_cvtsi64_si128(0xffffffffffffffffULL >> (64 - 8 * rem)));
__m256 tz = _mm256_mask_i32gather_ps(_mm256_setzero_ps(), unpacked[i+0], _mm256_setr_epi32(8,17,26,35,44,53,62,71),
_mm256_castsi256_ps(loadmask), sizeof(float));
// abs(pos)
__m256 apx = _mm256_andnot_ps(_mm256_set1_ps(-0.0f), px);
__m256 apy = _mm256_andnot_ps(_mm256_set1_ps(-0.0f), py);
__m256 apz = _mm256_andnot_ps(_mm256_set1_ps(-0.0f), pz);
// len = compMax(abs(pos))
__m256 len = _mm256_max_ps(_mm256_max_ps(apx, apy), apz);
// detect zeros
__m256 mask = _mm256_cmp_ps(len, _mm256_setzero_ps(), _CMP_EQ_OQ);
// rcp = 1.0f / len
__m256 rcp = _mm256_div_ps(_mm256_set1_ps(1.0f), len);
// replace +inf with 1.0f
rcp = _mm256_blendv_ps(rcp, _mm256_set1_ps(1.0f), mask);
len = _mm256_blendv_ps(len, _mm256_set1_ps(1.0f), mask);
// pos *= 1.0f / len
px = _mm256_mul_ps(px, rcp);
py = _mm256_mul_ps(py, rcp);
pz = _mm256_mul_ps(pz, rcp);
// clamp(vec, -1.0f, 1.0f)
px = _mm256_min_ps(_mm256_max_ps(px, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
py = _mm256_min_ps(_mm256_max_ps(py, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
pz = _mm256_min_ps(_mm256_max_ps(pz, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
nx = _mm256_min_ps(_mm256_max_ps(nx, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
ny = _mm256_min_ps(_mm256_max_ps(ny, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
nz = _mm256_min_ps(_mm256_max_ps(nz, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
tx = _mm256_min_ps(_mm256_max_ps(tx, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
ty = _mm256_min_ps(_mm256_max_ps(ty, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
tz = _mm256_min_ps(_mm256_max_ps(tz, _mm256_set1_ps(-1.0f)), _mm256_set1_ps(1.0f));
// vec *= 511.0f
px = _mm256_mul_ps(px, _mm256_set1_ps(511.0f));
py = _mm256_mul_ps(py, _mm256_set1_ps(511.0f));
pz = _mm256_mul_ps(pz, _mm256_set1_ps(511.0f));
nx = _mm256_mul_ps(nx, _mm256_set1_ps(511.0f));
ny = _mm256_mul_ps(ny, _mm256_set1_ps(511.0f));
nz = _mm256_mul_ps(nz, _mm256_set1_ps(511.0f));
tx = _mm256_mul_ps(tx, _mm256_set1_ps(511.0f));
ty = _mm256_mul_ps(ty, _mm256_set1_ps(511.0f));
tz = _mm256_mul_ps(tz, _mm256_set1_ps(511.0f));
// veci = lrint(vec) & 03ff
__m256i pxi = _mm256_and_si256(_mm256_cvtps_epi32(px), _mm256_set1_epi32(0x3ff));
__m256i pyi = _mm256_and_si256(_mm256_cvtps_epi32(py), _mm256_set1_epi32(0x3ff));
__m256i pzi = _mm256_and_si256(_mm256_cvtps_epi32(pz), _mm256_set1_epi32(0x3ff));
__m256i nxi = _mm256_and_si256(_mm256_cvtps_epi32(nx), _mm256_set1_epi32(0x3ff));
__m256i nyi = _mm256_and_si256(_mm256_cvtps_epi32(ny), _mm256_set1_epi32(0x3ff));
__m256i nzi = _mm256_and_si256(_mm256_cvtps_epi32(nz), _mm256_set1_epi32(0x3ff));
__m256i txi = _mm256_and_si256(_mm256_cvtps_epi32(tx), _mm256_set1_epi32(0x3ff));
__m256i tyi = _mm256_and_si256(_mm256_cvtps_epi32(ty), _mm256_set1_epi32(0x3ff));
__m256i tzi = _mm256_and_si256(_mm256_cvtps_epi32(tz), _mm256_set1_epi32(0x3ff));
// pack = (xi << 0) | (yi << 10) | (zi << 20);
__m256i li = _mm256_castps_si256(len); // length
__m256i pi = _mm256_or_si256(_mm256_or_si256(pxi, _mm256_slli_epi32(pyi, 10)), _mm256_slli_epi32(pzi, 20)); // position
__m256i ni = _mm256_or_si256(_mm256_or_si256(nxi, _mm256_slli_epi32(nyi, 10)), _mm256_slli_epi32(nzi, 20)); // normal
__m256i ti = _mm256_or_si256(_mm256_or_si256(txi, _mm256_slli_epi32(tyi, 10)), _mm256_slli_epi32(tzi, 20)); // tangent
//
// interleave (4x4 matrix transpose)
//
__m256i u0 = _mm256_unpacklo_epi32(li, pi);
__m256i u1 = _mm256_unpackhi_epi32(li, pi);
__m256i u2 = _mm256_unpacklo_epi32(ni, ti);
__m256i u3 = _mm256_unpackhi_epi32(ni, ti);
__m256i v0 = _mm256_unpacklo_epi64(u0, u2);
__m256i v1 = _mm256_unpackhi_epi64(u0, u2);
__m256i v2 = _mm256_unpacklo_epi64(u1, u3);
__m256i v3 = _mm256_unpackhi_epi64(u1, u3);
// store pack x 8
switch (rem) {
case 7: _mm_storeu_si128((__m128i*)packed[i+6], _mm256_extractf128_si256(v2, 1));
case 6: _mm_storeu_si128((__m128i*)packed[i+5], _mm256_extractf128_si256(v1, 1));
case 5: _mm_storeu_si128((__m128i*)packed[i+4], _mm256_extractf128_si256(v0, 1));
case 4: _mm_storeu_si128((__m128i*)packed[i+3], _mm256_castsi256_si128(v3));
case 3: _mm_storeu_si128((__m128i*)packed[i+2], _mm256_castsi256_si128(v2));
case 2: _mm_storeu_si128((__m128i*)packed[i+1], _mm256_castsi256_si128(v1));
case 1: _mm_storeu_si128((__m128i*)packed[i+0], _mm256_castsi256_si128(v0));
}
}
_mm256_zeroupper();
}
#endif

View file

@ -124,10 +124,6 @@ void OculusDisplayPlugin::uncustomizeContext() {
Parent::uncustomizeContext();
}
gpu::PipelinePointer OculusDisplayPlugin::getCompositeScenePipeline() {
return _SRGBToLinearPipeline;
}
static const uint64_t FRAME_BUDGET = (11 * USECS_PER_MSEC);
static const uint64_t FRAME_OVER_BUDGET = (15 * USECS_PER_MSEC);
@ -167,7 +163,7 @@ void OculusDisplayPlugin::hmdPresent() {
batch.setStateScissorRect(ivec4(uvec2(), _outputFramebuffer->getSize()));
batch.resetViewTransform();
batch.setProjectionTransform(mat4());
batch.setPipeline(_drawTexturePipeline);
batch.setPipeline(_SRGBToLinearPipeline);
batch.setResourceTexture(0, _compositeFramebuffer->getRenderBuffer(0));
batch.draw(gpu::TRIANGLE_STRIP, 4);
});

View file

@ -34,8 +34,6 @@ protected:
void uncustomizeContext() override;
void cycleDebugOutput() override;
virtual gpu::PipelinePointer getCompositeScenePipeline() override;
private:
static const char* NAME;
ovrTextureSwapChain _textureSwapChain;

View file

@ -18,7 +18,7 @@ When you run the lightLoader.js script, several scripts will be loaded:
- visiblePanel.js (the transparent panel)
- closeButton.js (for closing the ui)
- ../libraries/lightOverlayManager.js (shows 2d overlays for lights in the world)
- ../libraries/entitySelectionTool.js (visualizes volume of the lights)
- ../../scripts/system/create/entitySelectionTool/entitySelectionTool.js (visualizes volume of the lights)
Current sliders are (top to bottom):
red

View file

@ -33,8 +33,8 @@ var PARENT_SCRIPT_URL = Script.resolvePath('lightParent.js?' + Math.random(0 - 1
if (SHOW_OVERLAYS === true) {
Script.include('../libraries/gridTool.js');
Script.include('../libraries/entitySelectionTool.js?' + Math.random(0 - 100));
Script.include('../../scripts/system/libraries/gridTool.js');
Script.include('../../scripts/system/create/entitySelectionTool/entitySelectionTool.js?' + Math.random(0 - 100));
Script.include('../libraries/lightOverlayManager.js');
var grid = Grid();

View file

@ -27,7 +27,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
"system/marketplaces/marketplaces.js",
"system/notifications.js",
"system/commerce/wallet.js",
"system/edit.js",
"system/create/edit.js",
"system/dialTone.js",
"system/firstPersonHMD.js",
"system/tablet-ui/tabletUI.js",
@ -36,7 +36,7 @@ var DEFAULT_SCRIPTS_COMBINED = [
"system/audioMuteOverlay.js"
];
var DEFAULT_SCRIPTS_SEPARATE = [
"system/controllers/controllerScripts.js",
"system/controllers/controllerScripts.js"
//"system/chat.js"
];

View file

@ -17,6 +17,8 @@ PropFolderPanel {
Global { id: global }
id: root
property var rootObject: {}
property alias propItemsPanel: root.panelFrameContent
// Prop Group is designed to author an array of ProItems, they are defined with an array of the tuplets describing each individual item:
@ -79,12 +81,24 @@ PropFolderPanel {
})
} break;
case 'object': {
var component = Qt.createComponent("PropItem.qml");
console.log('Item is an object, create PropGroup: ' + JSON.stringify(proItem.object[proItem.property]));
var itemRootObject = proItem.object[proItem.property];
var itemLabel = proItem.property;
var itemDepth = root.indentDepth + 1;
if (Array.isArray(itemRootObject)) {
if (objectItem.length > 1) {
itemLabel = itemLabel + " " + objectItem.length
} else {
itemLabel = itemLabel + " " + objectItem.length
itemRootObject = itemRootObject[0];
}
}
var component = Qt.createComponent("PropGroup.qml");
component.createObject(propItemsContainer, {
"label": proItem.property,
"object": proItem.object,
"property": proItem.property,
})
"label": itemLabel,
"rootObject":itemRootObject,
"indentDepth": itemDepth,
})
} break;
case 'printLabel': {
var component = Qt.createComponent("PropItem.qml");
@ -110,19 +124,46 @@ PropFolderPanel {
function populateFromObjectProps(object) {
var propsModel = []
var props = Object.keys(object);
if (Array.isArray(object)) {
if (object.length <= 1) {
object = object[0];
}
}
var props = Object.keys(object);
for (var p in props) {
var o = {};
o["object"] = object
o["property"] = props[p];
// o["readOnly"] = true;
o["type"] = "string";
propsModel.push(o)
var thePropThing = object[props[p]];
if ((thePropThing !== undefined) && (thePropThing !== null)) {
var theType = typeof(thePropThing)
switch(theType) {
case 'object': {
o["type"] = "object";
propsModel.push(o)
} break;
default: {
o["type"] = "string";
propsModel.push(o)
} break;
}
} else {
o["type"] = "string";
propsModel.push(o)
}
}
root.updatePropItems(root.propItemsPanel, propsModel);
}
Component.onCompleted: {
if (root.rootObject !== null) {
populateFromObjectProps(root.rootObject)
}
}
}

View file

@ -20,17 +20,22 @@ PropItem {
property bool integral: false
property var numDigits: 2
property alias valueVar : sliderControl.value
property alias min: sliderControl.minimumValue
property alias max: sliderControl.maximumValue
property bool showValue: true
signal valueChanged(real value)
Component.onCompleted: {
valueVar = root.valueVarGetter();
}
}
property var sourceValueVar: root.valueVarGetter()
function applyValueVarFromWidgets(value) {
if (!root.readOnly) {
root.valueVarSetter(value)
}
}
PropLabel {
id: valueLabel
@ -42,7 +47,7 @@ PropItem {
horizontalAlignment: global.valueTextAlign
height: global.slimHeight
text: root.valueVarGetter().toFixed(root.integral ? 0 : root.numDigits)
text: root.sourceValueVar.toFixed(root.integral ? 0 : root.numDigits)
background: Rectangle {
color: global.color
@ -59,8 +64,8 @@ PropItem {
anchors.left: valueLabel.right
anchors.right: root.right
anchors.verticalCenter: root.verticalCenter
onValueChanged: { if (!root.readOnly) { root.valueVarSetter(value)} }
value: root.sourceValueVar
onValueChanged: { applyValueVarFromWidgets(value) }
}

View file

@ -23,46 +23,31 @@ Column {
id: computer
label: "Computer"
isUnfold: true
Component.onCompleted: {
computer.populateFromObjectProps(JSON.parse(PlatformInfo.getComputer()))
}
rootObject:JSON.parse(PlatformInfo.getComputer())
}
Prop.PropGroup {
id: cpu
label: "CPU"
isUnfold: true
Component.onCompleted: {
cpu.populateFromObjectProps(JSON.parse(PlatformInfo.getCPU(0)))
}
rootObject:JSON.parse(PlatformInfo.getPlatform()).cpus
}
Prop.PropGroup {
id: memory
label: "Memory"
isUnfold: true
Component.onCompleted: {
memory.populateFromObjectProps(JSON.parse(PlatformInfo.getMemory()))
}
rootObject:JSON.parse(PlatformInfo.getMemory())
}
Prop.PropGroup {
id: gpu
label: "GPU"
isUnfold: true
Component.onCompleted: {
gpu.populateFromObjectProps(JSON.parse(PlatformInfo.getGPU(0)))
}
rootObject:JSON.parse(PlatformInfo.getPlatform()).gpus
}
Prop.PropGroup {
id: display
label: "Display"
isUnfold: true
Component.onCompleted: {
display.populateFromObjectProps(JSON.parse(PlatformInfo.getDisplay(0)))
}
rootObject:JSON.parse(PlatformInfo.getPlatform()).displays
}
}

View file

@ -30,5 +30,12 @@ Column {
object: Render
property: "shadowsEnabled"
}
Prop.PropScalar {
label: "Viewport Resolution Scale"
object: Render
property: "viewportResolutionScale"
min: 0.25
max: 1.5
}
}

View file

@ -1,51 +0,0 @@
<!--
// entityProperties.html
//
// Created by Ryan Huffman on 13 Nov 2014
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-->
<html>
<head>
<title>Properties</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/edit-style.css">
<link rel="stylesheet" type="text/css" href="css/colpick.css">
<link href="css/jsoneditor.css" rel="stylesheet" type="text/css">
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/colpick.js"></script>
<script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
<script type="text/javascript" src="js/eventBridgeLoader.js"></script>
<script type="text/javascript" src="js/spinButtons.js"></script>
<script type="text/javascript" src="js/underscore-min.js"></script>
<script type="text/javascript" src="js/createAppTooltip.js"></script>
<script type="text/javascript" src="js/draggableNumber.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/includes.js"></script>
<script type="text/javascript" src="js/entityProperties.js"></script>
<script src="js/jsoneditor.min.js"></script>
</head>
<body onload='loaded();'>
<div id="properties-list">
<div class='property container'>
<label id='placeholder-property-type'></label>
<div class='value'>
<div class='row flex-center' style='padding-bottom: 8px;'>
<div id="placeholder-property-name" class="stretch"></div>
<div id="placeholder-property-locked" class="shrink"></div>
<div id="placeholder-property-visible" class="shrink"></div>
</div>
<div class='row'>
<div id="placeholder-property-id" class="stretch"></div>
</div>
</div>
</div>
<!-- each property is added at runtime in entityProperties -->
</div>
</body>
</html>

View file

@ -1,12 +0,0 @@
import QtQuick 2.7
import QtQuick.Controls 2.2
import QtWebChannel 1.0
import QtGraphicalEffects 1.0
import "qrc:///qml/controls" as HifiControls
HifiControls.WebView {
id: entityListToolWebView
url: Qt.resolvedUrl("../html/entityList.html")
enabled: true
blurOnCtrlShift: false
}

View file

@ -19,7 +19,8 @@ var HALF = 0.5;
var CLEAR_ENTITY_EDIT_PROPS = true;
var MILISECONDS_IN_SECOND = 1000;
var SECONDS_IN_MINUTE = 60;
var ALWAYS_ON_MAX_LIFETIME_IN_SECONDS = 20 * SECONDS_IN_MINUTE; // Delete after 20 minutes in case a nametag is hanging around in on mode
// Delete after 5 minutes in case a nametag is hanging around in on mode
var ALWAYS_ON_MAX_LIFETIME_IN_SECONDS = 5 * SECONDS_IN_MINUTE;
// *************************************
// START UTILTY
@ -377,6 +378,11 @@ function maybeAddOrRemoveIntervalCheck() {
add(avatar);
return;
}
if (avatar in _this.avatars) {
var entity = _this.avatars[avatar].nametag;
var age = entity.get("age");
entity.edit('lifetime', age + ALWAYS_ON_MAX_LIFETIME_IN_SECONDS);
}
if (avatarDistance > MAX_RADIUS_IGNORE_METERS) {
maybeRemove(avatar);
}

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path d="M331.8,283.4c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C342.1,306.6,331.8,296.2,331.8,283.4z"/>
<path d="M277.8,350.9c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C288.1,374.2,277.8,363.8,277.8,350.9z"/>
<path d="M216.3,368.8c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C226.7,392,216.3,381.6,216.3,368.8z"/>
<path d="M169.9,308.9c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C180.3,332.1,169.9,321.7,169.9,308.9z"/>
<path d="M251.2,447.4c-4.9-3.6-8.3-9.1-9.2-15.3c-0.9-6,0.6-12.3,4.2-17.2c3.6-4.9,9.1-8.3,15.2-9.1c6-0.9,12.3,0.6,17.3,4.3
c4.9,3.6,8.3,9.1,9.1,15.2c0.9,6-0.6,12.3-4.2,17.2s-9.1,8.3-15.2,9.1C262.4,452.6,256.1,451,251.2,447.4z"/>
<path d="M67.6,246.1c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C78,269.3,67.6,258.8,67.6,246.1z"/>
<path d="M178.8,199.5c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C189.1,222.7,178.8,212.2,178.8,199.5z"/>
<path d="M250.3,293.9c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C260.7,317.1,250.3,306.6,250.3,293.9z"/>
<path d="M413,242.1c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C423.5,265.3,413,255,413,242.1z"/>
<path d="M302.1,203.7c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C312.6,226.9,302.1,216.5,302.1,203.7z"/>
<path d="M132.3,113.5c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C142.8,136.6,132.3,126.2,132.3,113.5z"/>
<path d="M366.6,136.7c0-12.8,10.4-23.2,23.2-23.2l0,0c12.8,0,23.2,10.4,23.2,23.2l0,0c0,12.8-10.4,23.2-23.2,23.2l0,0
C377.1,159.9,366.6,149.5,366.6,136.7z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 960 560" style="enable-background:new 0 0 960 560;" xml:space="preserve">
<g>
<g>
<path style="fill:#333333;" d="M478.879,127.676c-83.872,0-152.325,68.454-152.325,152.325s68.454,152.325,152.325,152.325
s152.325-67.837,152.325-152.325C631.204,196.13,563.366,127.676,478.879,127.676z"/>
<path style="fill:#FFFFFF;" d="M478.881,437.281C392.156,437.281,321.6,366.725,321.6,280s70.557-157.281,157.281-157.281
S636.157,193.275,636.157,280S565.606,437.281,478.881,437.281z M478.881,132.627c-81.263,0-147.373,66.115-147.373,147.373
s66.11,147.373,147.373,147.373c81.258,0,147.368-66.115,147.368-147.373S560.138,132.627,478.881,132.627z"/>
</g>
<g>
<rect x="459.145" y="4.952" style="fill:#333333;" width="40.086" height="75.237"/>
<path style="fill:#FFFFFF;" d="M504.183,85.147h-49.99V0h49.99V85.147z M464.1,75.239h30.174V9.908H464.1V75.239z"/>
</g>
<g>
<rect x="272.766" y="90.696" transform="matrix(-0.707 -0.7072 0.7072 -0.707 451.5123 408.5368)" style="fill:#333333;" width="75.236" height="40.085"/>
<path style="fill:#FFFFFF;" d="M322.809,158.519l-60.198-60.212l35.351-35.346l60.198,60.212L322.809,158.519z M276.621,98.307
l46.188,46.202l21.34-21.335l-46.188-46.202L276.621,98.307z"/>
</g>
<g>
<rect x="201.98" y="257.8" style="fill:#333333;" width="75.237" height="40.086"/>
<path style="fill:#FFFFFF;" d="M282.17,302.845h-85.142V252.85h85.142V302.845z M206.936,292.937h65.327v-30.179h-65.327V292.937z
"/>
</g>
<g>
<rect x="287.46" y="408.97" transform="matrix(0.7072 0.707 -0.707 0.7072 405.7749 -86.6482)" style="fill:#333333;" width="40.085" height="75.236"/>
<path style="fill:#FFFFFF;" d="M295.083,494.359l-35.355-35.346l60.198-60.212l35.355,35.346L295.083,494.359z M273.738,459.013
l21.345,21.335l46.187-46.202l-21.345-21.335L273.738,459.013z"/>
</g>
<g>
<rect x="454.827" y="479.812" style="fill:#333333;" width="40.086" height="75.237"/>
<path style="fill:#FFFFFF;" d="M499.868,560h-49.995v-85.137h49.995V560z M459.781,550.091h30.179V484.77h-30.179V550.091z"/>
</g>
<g>
<rect x="606.017" y="429.505" transform="matrix(0.707 0.7072 -0.7072 0.707 506.5034 -323.4691)" style="fill:#333333;" width="75.236" height="40.085"/>
<path style="fill:#FFFFFF;" d="M656.06,497.32l-60.198-60.212l35.351-35.346l60.198,60.212L656.06,497.32z M609.872,437.107
l46.187,46.202l21.34-21.335l-46.188-46.202L609.872,437.107z"/>
</g>
<g>
<rect x="676.839" y="262.117" style="fill:#333333;" width="75.237" height="40.086"/>
<path style="fill:#FFFFFF;" d="M757.032,307.16h-85.147v-49.995h85.147V307.16z M681.792,297.252h65.332v-30.179h-65.332V297.252z
"/>
</g>
<g>
<rect x="626.205" y="75.756" transform="matrix(-0.7072 -0.707 0.707 -0.7072 1023.1211 650.4535)" style="fill:#333333;" width="40.085" height="75.236"/>
<path style="fill:#FFFFFF;" d="M633.825,161.161l-35.351-35.346l60.198-60.212l35.351,35.346L633.825,161.161z M612.485,125.815
l21.34,21.335l46.188-46.202l-21.34-21.335L612.485,125.815z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="3.44 0 735.338 557.9" style="enable-background:new 3.44 0 735.338 557.9;" xml:space="preserve">
<g>
<g>
<rect x="503.95" y="260.767" style="fill:#333333;" width="227.728" height="36.376"/>
<path style="fill:#FFFFFF;" d="M738.778,304.24H496.854v-50.566h241.924V304.24z M511.052,290.042H724.58v-22.17H511.052V290.042z
"/>
</g>
<g>
<g>
<g>
<rect x="426.085" y="465.518" transform="matrix(-0.9213 -0.3888 0.3888 -0.9213 849.3369 1139.2869)" style="fill:#333333;" width="227.719" height="36.374"/>
<path style="fill:#FFFFFF;" d="M641.55,554.032l-222.88-94.06l19.668-46.6l222.88,94.06L641.55,554.032z M437.277,452.401
l196.717,83.024l8.617-20.423l-196.717-83.024L437.277,452.401z"/>
</g>
<g>
<rect x="426.295" y="56.081" transform="matrix(0.9213 -0.3888 0.3888 0.9213 13.624 215.8596)" style="fill:#333333;" width="227.719" height="36.374"/>
<path style="fill:#FFFFFF;" d="M438.545,144.598l-19.668-46.6l222.887-94.06l19.667,46.6L438.545,144.598z M437.484,105.568
l8.617,20.423l196.724-83.024l-8.617-20.423L437.484,105.568z"/>
</g>
</g>
<g>
<path style="fill:#333333;" d="M430.774,280.311c0-50.839-32.955-93.895-78.642-109.198V13.262L124.404,165.081H10.54v227.728
h113.864l227.728,151.819V389.51C397.818,374.206,430.774,331.151,430.774,280.311z"/>
<path style="fill:#FFFFFF;" d="M359.23,557.9L122.257,399.908H3.44V157.978h118.816L359.23,0v166.117
c47.245,18.038,78.642,63.308,78.642,114.192s-31.397,96.154-78.642,114.192V557.9z M17.638,385.711h108.917l218.478,145.652
V384.407l4.846-1.622c44.139-14.794,73.796-55.973,73.796-102.476s-29.657-87.682-73.796-102.476l-4.846-1.622V26.538
L126.555,172.176H17.638V385.711z"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 512 512"
style="enable-background:new 0 0 512 512;"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="icon-zone.svg"><metadata
id="metadata4211"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs4209" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview4207"
showgrid="false"
inkscape:zoom="2"
inkscape:cx="228.01796"
inkscape:cy="376.88605"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g4191" /><style
type="text/css"
id="style4189">
.st0{fill:none;stroke:#000000;stroke-width:18;stroke-miterlimit:10;}
.st1{fill:none;stroke:#000000;stroke-width:18;stroke-linecap:round;stroke-miterlimit:10;}
.st2{fill:none;stroke:#000000;stroke-width:19;stroke-linecap:round;stroke-miterlimit:10;}
</style><g
id="g4191"><path
d="M 380.7,139.8 C 378,133.2 371.5,129 364.4,129 l -72.4,0 0,34 29.9,0 -162.9,163.1 0,-36.1 -36,0 0,79 0.006,0.024 c 0.1,2 0.5,4.1 1.3,5.9 C 127.00564,381.52397 134.7,386 141.8,386 l 83.2,0 0,-35 -40.8,0 161.8,-161.3 0,25.3 36.125,0.125 -0.19692,-62.65758 C 382.08839,148.14645 382.4,144 380.7,139.8 Z"
id="path4193"
style="fill:#333333;fill-opacity:1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cscccccccccscccccccc" /><path
d="M338.4,437.6c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C348.1,459.3,338.4,449.6,338.4,437.6z M266.9,437.6c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0 c0,12-9.7,21.7-21.7,21.7l0,0C276.6,459.3,266.9,449.6,266.9,437.6z M195.4,437.6c0-12,9.7-21.7,21.7-21.7l0,0 c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0C205.1,459.3,195.4,449.6,195.4,437.6z M123.9,437.6 c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0C133.6,459.3,123.9,449.6,123.9,437.6z"
id="path4195"
style="fill:#333333;fill-opacity:1" /><path
d="M74.1,459.3c-5.7,0-11.3-2.3-15.4-6.4c-4-4-6.4-9.6-6.4-15.3c0-5.7,2.3-11.3,6.4-15.3c4-4,9.6-6.4,15.4-6.4 c5.7,0,11.3,2.3,15.3,6.4c4,4,6.4,9.6,6.4,15.3c0,5.7-2.3,11.3-6.4,15.3C85.4,457,79.8,459.3,74.1,459.3z"
id="path4197"
style="fill:#333333;fill-opacity:1" /><path
d="M52.4,366.1c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C62.1,387.8,52.4,378,52.4,366.1z M52.4,294.6c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7 l0,0C62.1,316.3,52.4,306.5,52.4,294.6z M52.4,223.1c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0 c0,12-9.7,21.7-21.7,21.7l0,0C62.1,244.8,52.4,235,52.4,223.1z M52.4,151.5c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7 l0,0c0,12-9.7,21.7-21.7,21.7l0,0C62.1,173.2,52.4,163.5,52.4,151.5z"
id="path4199"
style="fill:#333333;fill-opacity:1" /><path
d="M338.4,80c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C348.1,101.7,338.4,92,338.4,80z M266.9,80c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C276.6,101.7,266.9,92,266.9,80z M195.4,80c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C205.1,101.7,195.4,92,195.4,80z M123.9,80c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C133.6,101.7,123.9,92,123.9,80z"
id="path4201"
style="fill:#333333;fill-opacity:1" /><path
d="M431.6,101.7c-5.7,0-11.3-2.3-15.3-6.4c-4-4-6.4-9.6-6.4-15.3c0-5.7,2.3-11.3,6.4-15.3c4-4,9.6-6.4,15.3-6.4 s11.3,2.3,15.3,6.4c4,4,6.4,9.6,6.4,15.3c0,5.7-2.3,11.3-6.4,15.3C442.9,99.4,437.4,101.7,431.6,101.7z"
id="path4203"
style="fill:#333333;fill-opacity:1" /><path
d="M409.9,366.1c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0 C419.7,387.8,409.9,378.1,409.9,366.1z M409.9,294.6c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0 c0,12-9.7,21.7-21.7,21.7l0,0C419.7,316.3,409.9,306.5,409.9,294.6z M409.9,223.1c0-12,9.7-21.7,21.7-21.7l0,0 c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0C419.7,244.7,409.9,235,409.9,223.1z M409.9,151.5 c0-12,9.7-21.7,21.7-21.7l0,0c12,0,21.7,9.7,21.7,21.7l0,0c0,12-9.7,21.7-21.7,21.7l0,0C419.7,173.2,409.9,163.5,409.9,151.5z"
id="path4205"
style="fill:#333333;fill-opacity:1" /></g></svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Some files were not shown because too many files have changed in this diff Show more