mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:41:02 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into stop-rebinding
This commit is contained in:
commit
11d3f0a629
13 changed files with 68 additions and 25 deletions
|
@ -2708,6 +2708,7 @@ void Application::cleanupBeforeQuit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
|
getEntities()->shutdown(); // tell the entities system we're shutting down, so it will stop running scripts
|
||||||
|
getEntities()->clear();
|
||||||
|
|
||||||
// Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
|
// Clear any queued processing (I/O, FBX/OBJ/Texture parsing)
|
||||||
QThreadPool::globalInstance()->clear();
|
QThreadPool::globalInstance()->clear();
|
||||||
|
|
|
@ -63,9 +63,15 @@ PerformanceManager::PerformancePreset PerformanceManager::getPerformancePreset()
|
||||||
|
|
||||||
void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformancePreset preset) {
|
void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformancePreset preset) {
|
||||||
|
|
||||||
|
// Ugly case that prevent us to run deferred everywhere...
|
||||||
|
bool isDeferredCapable = platform::Profiler::isRenderMethodDeferredCapable();
|
||||||
|
|
||||||
switch (preset) {
|
switch (preset) {
|
||||||
case PerformancePreset::HIGH:
|
case PerformancePreset::HIGH:
|
||||||
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::DEFERRED);
|
RenderScriptingInterface::getInstance()->setRenderMethod( ( isDeferredCapable ?
|
||||||
|
RenderScriptingInterface::RenderMethod::DEFERRED :
|
||||||
|
RenderScriptingInterface::RenderMethod::FORWARD ) );
|
||||||
|
|
||||||
RenderScriptingInterface::getInstance()->setShadowsEnabled(true);
|
RenderScriptingInterface::getInstance()->setShadowsEnabled(true);
|
||||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
|
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::REALTIME);
|
||||||
|
|
||||||
|
@ -73,7 +79,10 @@ void PerformanceManager::applyPerformancePreset(PerformanceManager::PerformanceP
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PerformancePreset::MID:
|
case PerformancePreset::MID:
|
||||||
RenderScriptingInterface::getInstance()->setRenderMethod(RenderScriptingInterface::RenderMethod::DEFERRED);
|
RenderScriptingInterface::getInstance()->setRenderMethod((isDeferredCapable ?
|
||||||
|
RenderScriptingInterface::RenderMethod::DEFERRED :
|
||||||
|
RenderScriptingInterface::RenderMethod::FORWARD));
|
||||||
|
|
||||||
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
|
RenderScriptingInterface::getInstance()->setShadowsEnabled(false);
|
||||||
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
|
qApp->getRefreshRateManager().setRefreshRateProfile(RefreshRateManager::RefreshRateProfile::INTERACTIVE);
|
||||||
DependencyManager::get<LODManager>()->setWorldDetailQuality(0.5f);
|
DependencyManager::get<LODManager>()->setWorldDetailQuality(0.5f);
|
||||||
|
|
Binary file not shown.
|
@ -46,6 +46,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)awakeFromNib {
|
-(void)awakeFromNib {
|
||||||
|
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
|
||||||
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
|
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
|
||||||
selector:@selector(didTerminateApp:)
|
selector:@selector(didTerminateApp:)
|
||||||
name:NSWorkspaceDidTerminateApplicationNotification
|
name:NSWorkspaceDidTerminateApplicationNotification
|
||||||
|
@ -114,6 +115,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
||||||
userInfo:nil
|
userInfo:nil
|
||||||
repeats:NO];
|
repeats:NO];
|
||||||
}
|
}
|
||||||
|
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setDownloadContextFilename:(NSString *)aFilename
|
- (void) setDownloadContextFilename:(NSString *)aFilename
|
||||||
|
@ -277,6 +279,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
||||||
|
|
||||||
-(void)onSplashScreenTimerFinished:(NSTimer *)timer
|
-(void)onSplashScreenTimerFinished:(NSTimer *)timer
|
||||||
{
|
{
|
||||||
|
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
|
||||||
[self showLoginScreen];
|
[self showLoginScreen];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,6 +339,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
||||||
NSString* scriptsPath = [[self getAppPath] stringByAppendingString:@"interface.app/Contents/Resources/scripts/simplifiedUI/"];
|
NSString* scriptsPath = [[self getAppPath] stringByAppendingString:@"interface.app/Contents/Resources/scripts/simplifiedUI/"];
|
||||||
NSString* domainUrl = [[Settings sharedSettings] getDomainUrl];
|
NSString* domainUrl = [[Settings sharedSettings] getDomainUrl];
|
||||||
NSString* userToken = [[Launcher sharedLauncher] getTokenString];
|
NSString* userToken = [[Launcher sharedLauncher] getTokenString];
|
||||||
|
NSString* homeBookmark = [[NSString stringWithFormat:@"hqhome="] stringByAppendingString:domainUrl];
|
||||||
NSArray* arguments;
|
NSArray* arguments;
|
||||||
if (userToken != nil) {
|
if (userToken != nil) {
|
||||||
arguments = [NSArray arrayWithObjects:
|
arguments = [NSArray arrayWithObjects:
|
||||||
|
@ -344,6 +348,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
||||||
@"--cache", contentPath,
|
@"--cache", contentPath,
|
||||||
@"--displayName", displayName,
|
@"--displayName", displayName,
|
||||||
@"--scripts", scriptsPath,
|
@"--scripts", scriptsPath,
|
||||||
|
@"--setBookmark", homeBookmark,
|
||||||
@"--no-updater",
|
@"--no-updater",
|
||||||
@"--no-launcher", nil];
|
@"--no-launcher", nil];
|
||||||
} else {
|
} else {
|
||||||
|
@ -351,6 +356,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
||||||
@"--url" , domainUrl,
|
@"--url" , domainUrl,
|
||||||
@"--cache", contentPath,
|
@"--cache", contentPath,
|
||||||
@"--scripts", scriptsPath,
|
@"--scripts", scriptsPath,
|
||||||
|
@"--setBookmark", homeBookmark,
|
||||||
@"--no-updater",
|
@"--no-updater",
|
||||||
@"--no-launcher", nil];
|
@"--no-launcher", nil];
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 26 KiB |
|
@ -343,4 +343,4 @@ PulsePropertyGroup WebEntityItem::getPulseProperties() const {
|
||||||
return resultWithReadLock<PulsePropertyGroup>([&] {
|
return resultWithReadLock<PulsePropertyGroup>([&] {
|
||||||
return _pulseProperties;
|
return _pulseProperties;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "PlatformKeys.h"
|
#include "PlatformKeys.h"
|
||||||
|
#include <qglobal.h>
|
||||||
|
|
||||||
using namespace platform;
|
using namespace platform;
|
||||||
|
|
||||||
|
@ -124,4 +125,35 @@ bool filterOnProcessors(const platform::json& computer, const platform::json& cp
|
||||||
|
|
||||||
// Not able to profile
|
// Not able to profile
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ugly very adhoc capability check to know if a particular hw can REnder with Deferred method or not
|
||||||
|
// YES for PC windows and linux
|
||||||
|
// NO for android
|
||||||
|
// YES on macos EXCEPT for macbookair with gpu intel iris or intel HD 6000
|
||||||
|
bool Profiler::isRenderMethodDeferredCapable() {
|
||||||
|
#if defined(Q_OS_MAC)
|
||||||
|
auto computer = platform::getComputer();
|
||||||
|
const auto computerModel = (computer.count(keys::computer::model) ? computer[keys::computer::model].get<std::string>() : "");
|
||||||
|
|
||||||
|
auto gpuInfo = platform::getGPU(0);
|
||||||
|
const auto gpuModel = (gpuInfo.count(keys::gpu::model) ? gpuInfo[keys::gpu::model].get<std::string>() : "");
|
||||||
|
|
||||||
|
|
||||||
|
// Macbook air 2018 are a problem
|
||||||
|
if ((computerModel.find("MacBookAir") != std::string::npos) && (gpuModel.find("Intel HD Graphics 6000") != std::string::npos)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We know for fact that one INtel Iris is problematic, not enough info yet for sure
|
||||||
|
// if ((gpuModel.find("Intel Iris ....") != std::string::npos)) {
|
||||||
|
// return false;
|
||||||
|
//}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
#elif defined(Q_OS_ANDROID)
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
@ -28,6 +28,9 @@ public:
|
||||||
static const std::array<const char*, Tier::NumTiers> TierNames;
|
static const std::array<const char*, Tier::NumTiers> TierNames;
|
||||||
|
|
||||||
static Tier profilePlatform();
|
static Tier profilePlatform();
|
||||||
|
|
||||||
|
// Ugly very adhoc capability check to know if a particular hw can REnder with Deferred method or not
|
||||||
|
static bool isRenderMethodDeferredCapable();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
||||||
GLint rendererInfoCount;
|
GLint rendererInfoCount;
|
||||||
CGLError err = CGLQueryRendererInfo(cglDisplayMask, &rendererInfo, &rendererInfoCount);
|
CGLError err = CGLQueryRendererInfo(cglDisplayMask, &rendererInfo, &rendererInfoCount);
|
||||||
GLint j, numRenderers = 0, deviceVRAM, bestVRAM = 0;
|
GLint j, numRenderers = 0, deviceVRAM, bestVRAM = 0;
|
||||||
|
int bestGPUid = 0;
|
||||||
err = CGLQueryRendererInfo(cglDisplayMask, &rendererInfo, &numRenderers);
|
err = CGLQueryRendererInfo(cglDisplayMask, &rendererInfo, &numRenderers);
|
||||||
if (0 == err) {
|
if (0 == err) {
|
||||||
// Iterate over all of them and use the figure for the one with the most VRAM,
|
// Iterate over all of them and use the figure for the one with the most VRAM,
|
||||||
|
@ -55,6 +56,7 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
||||||
for (j = 0; j < numRenderers; j++) {
|
for (j = 0; j < numRenderers; j++) {
|
||||||
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
|
CGLDescribeRenderer(rendererInfo, j, kCGLRPVideoMemoryMegabytes, &deviceVRAM);
|
||||||
if (deviceVRAM > bestVRAM) {
|
if (deviceVRAM > bestVRAM) {
|
||||||
|
bestGPUid = j;
|
||||||
bestVRAM = deviceVRAM;
|
bestVRAM = deviceVRAM;
|
||||||
_isValid = true;
|
_isValid = true;
|
||||||
}
|
}
|
||||||
|
@ -78,6 +80,8 @@ GPUIdent* GPUIdent::ensureQuery(const QString& vendor, const QString& renderer)
|
||||||
for (int i = 0; i < parts.size(); ++i) {
|
for (int i = 0; i < parts.size(); ++i) {
|
||||||
if (parts[i].toLower().contains("radeon") || parts[i].toLower().contains("nvidia")) {
|
if (parts[i].toLower().contains("radeon") || parts[i].toLower().contains("nvidia")) {
|
||||||
_name=parts[i];
|
_name=parts[i];
|
||||||
|
} else if (i == bestGPUid) {
|
||||||
|
_name=parts[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,9 @@ Rectangle {
|
||||||
color: global.color
|
color: global.color
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
id: control
|
id: scrollView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
contentWidth: parent.width
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -24,9 +24,12 @@ Rectangle {
|
||||||
color: global.colorBack
|
color: global.colorBack
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
|
id: scrollView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
contentWidth: parent.width
|
||||||
clip: true
|
clip: true
|
||||||
Column {
|
|
||||||
|
Column {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
@ -35,8 +38,6 @@ Rectangle {
|
||||||
isUnfold: true
|
isUnfold: true
|
||||||
panelFrameData: Component {
|
panelFrameData: Component {
|
||||||
PerformanceSettings {
|
PerformanceSettings {
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,8 +46,6 @@ Rectangle {
|
||||||
isUnfold: true
|
isUnfold: true
|
||||||
panelFrameData: Component {
|
panelFrameData: Component {
|
||||||
RenderSettings {
|
RenderSettings {
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,8 +53,6 @@ Rectangle {
|
||||||
label: "Platform"
|
label: "Platform"
|
||||||
panelFrameData: Component {
|
panelFrameData: Component {
|
||||||
Platform {
|
Platform {
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,9 +83,7 @@
|
||||||
// The initial delay cooldown keeps us from tracking progress before the allotted time
|
// The initial delay cooldown keeps us from tracking progress before the allotted time
|
||||||
// has passed.
|
// has passed.
|
||||||
INITIAL_DELAY_COOLDOWN_TIME = 1000,
|
INITIAL_DELAY_COOLDOWN_TIME = 1000,
|
||||||
initialDelayCooldown = 0,
|
initialDelayCooldown = 0;
|
||||||
|
|
||||||
isInInterstitialMode = false;
|
|
||||||
|
|
||||||
function fade() {
|
function fade() {
|
||||||
|
|
||||||
|
@ -267,7 +265,7 @@
|
||||||
|
|
||||||
// Update state
|
// Update state
|
||||||
if (!visible) { // Not visible because no recent downloads
|
if (!visible) { // Not visible because no recent downloads
|
||||||
if ((displayProgress < 100 || gpuTextures > 0) && !isInInterstitialMode && !isInterstitialOverlaysVisible) { // Have started downloading so fade in
|
if (displayProgress < 100 || gpuTextures > 0) { // Have started downloading so fade in
|
||||||
visible = true;
|
visible = true;
|
||||||
alphaDelta = ALPHA_DELTA_IN;
|
alphaDelta = ALPHA_DELTA_IN;
|
||||||
fadeTimer = Script.setInterval(fade, FADE_INTERVAL);
|
fadeTimer = Script.setInterval(fade, FADE_INTERVAL);
|
||||||
|
@ -307,9 +305,6 @@
|
||||||
} else {
|
} else {
|
||||||
x = x * BAR_HMD_REPEAT;
|
x = x * BAR_HMD_REPEAT;
|
||||||
}
|
}
|
||||||
if (isInInterstitialMode || isInterstitialOverlaysVisible) {
|
|
||||||
visible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update progress bar
|
// Update progress bar
|
||||||
Overlays.editOverlay(barDesktop.overlay, {
|
Overlays.editOverlay(barDesktop.overlay, {
|
||||||
|
@ -349,10 +344,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function interstitialModeChanged(inMode) {
|
|
||||||
isInInterstitialMode = inMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
var is4k = Window.innerWidth > 3000;
|
var is4k = Window.innerWidth > 3000;
|
||||||
|
|
||||||
|
@ -378,7 +369,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
setUp();
|
setUp();
|
||||||
Window.interstitialModeChanged.connect(interstitialModeChanged);
|
|
||||||
GlobalServices.downloadInfoChanged.connect(onDownloadInfoChanged);
|
GlobalServices.downloadInfoChanged.connect(onDownloadInfoChanged);
|
||||||
GlobalServices.updateDownloadInfo();
|
GlobalServices.updateDownloadInfo();
|
||||||
Script.setInterval(update, 1000 / 60);
|
Script.setInterval(update, 1000 / 60);
|
||||||
|
|
|
@ -415,7 +415,7 @@ function getInputDeviceMutedOverlayTopY() {
|
||||||
var inputDeviceMutedOverlay = false;
|
var inputDeviceMutedOverlay = false;
|
||||||
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX = 353;
|
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_X_PX = 353;
|
||||||
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX = 95;
|
var INPUT_DEVICE_MUTED_OVERLAY_DEFAULT_Y_PX = 95;
|
||||||
var INPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20;
|
var INPUT_DEVICE_MUTED_MARGIN_BOTTOM_PX = 20 + TOP_BAR_HEIGHT_PX;
|
||||||
function updateInputDeviceMutedOverlay(isMuted) {
|
function updateInputDeviceMutedOverlay(isMuted) {
|
||||||
if (isMuted) {
|
if (isMuted) {
|
||||||
var props = {
|
var props = {
|
||||||
|
|
Loading…
Reference in a new issue