mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 23:09:52 +02:00
Merge pull request #12762 from samcake/one
Remove notifications and print outs when degrading LOD
This commit is contained in:
commit
cba307f28b
2 changed files with 7 additions and 39 deletions
|
@ -86,10 +86,6 @@ void LODManager::autoAdjustLOD(float realTimeDelta) {
|
||||||
if (_octreeSizeScale < ADJUST_LOD_MIN_SIZE_SCALE) {
|
if (_octreeSizeScale < ADJUST_LOD_MIN_SIZE_SCALE) {
|
||||||
_octreeSizeScale = ADJUST_LOD_MIN_SIZE_SCALE;
|
_octreeSizeScale = ADJUST_LOD_MIN_SIZE_SCALE;
|
||||||
}
|
}
|
||||||
qCDebug(interfaceapp) << "adjusting LOD DOWN"
|
|
||||||
<< "fps =" << currentFPS
|
|
||||||
<< "targetFPS =" << getLODDecreaseFPS()
|
|
||||||
<< "octreeSizeScale =" << _octreeSizeScale;
|
|
||||||
emit LODDecreased();
|
emit LODDecreased();
|
||||||
// Assuming the LOD adjustment will work: we optimistically reset _avgRenderTime
|
// Assuming the LOD adjustment will work: we optimistically reset _avgRenderTime
|
||||||
// to provide an FPS just above the decrease threshold. It will drift close to its
|
// to provide an FPS just above the decrease threshold. It will drift close to its
|
||||||
|
@ -111,10 +107,6 @@ void LODManager::autoAdjustLOD(float realTimeDelta) {
|
||||||
if (_octreeSizeScale > ADJUST_LOD_MAX_SIZE_SCALE) {
|
if (_octreeSizeScale > ADJUST_LOD_MAX_SIZE_SCALE) {
|
||||||
_octreeSizeScale = ADJUST_LOD_MAX_SIZE_SCALE;
|
_octreeSizeScale = ADJUST_LOD_MAX_SIZE_SCALE;
|
||||||
}
|
}
|
||||||
qCDebug(interfaceapp) << "adjusting LOD UP"
|
|
||||||
<< "fps =" << currentFPS
|
|
||||||
<< "targetFPS =" << getLODDecreaseFPS()
|
|
||||||
<< "octreeSizeScale =" << _octreeSizeScale;
|
|
||||||
emit LODIncreased();
|
emit LODIncreased();
|
||||||
// Assuming the LOD adjustment will work: we optimistically reset _avgRenderTime
|
// Assuming the LOD adjustment will work: we optimistically reset _avgRenderTime
|
||||||
// to provide an FPS just below the increase threshold. It will drift close to its
|
// to provide an FPS just below the increase threshold. It will drift close to its
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
/*jslint vars:true, plusplus:true, forin:true*/
|
/*jslint vars:true, plusplus:true, forin:true*/
|
||||||
/*global Script, Settings, Window, Controller, Overlays, SoundArray, LODManager, MyAvatar, Tablet, Camera, HMD, Menu, Quat, Vec3*/
|
/*global Script, Settings, Window, Controller, Overlays, SoundArray, MyAvatar, Tablet, Camera, HMD, Menu, Quat, Vec3*/
|
||||||
//
|
//
|
||||||
// notifications.js
|
// notifications.js
|
||||||
// Version 0.801
|
// Version 0.801
|
||||||
|
@ -84,21 +84,18 @@
|
||||||
var NOTIFICATION_MENU_ITEM_POST = " Notifications";
|
var NOTIFICATION_MENU_ITEM_POST = " Notifications";
|
||||||
var PLAY_NOTIFICATION_SOUNDS_SETTING = "play_notification_sounds";
|
var PLAY_NOTIFICATION_SOUNDS_SETTING = "play_notification_sounds";
|
||||||
var PLAY_NOTIFICATION_SOUNDS_TYPE_SETTING_PRE = "play_notification_sounds_type_";
|
var PLAY_NOTIFICATION_SOUNDS_TYPE_SETTING_PRE = "play_notification_sounds_type_";
|
||||||
var lodTextID = false;
|
var NOTIFICATIONS_MESSAGE_CHANNEL = "Hifi-Notifications";
|
||||||
var NOTIFICATIONS_MESSAGE_CHANNEL = "Hifi-Notifications"
|
|
||||||
|
|
||||||
var NotificationType = {
|
var NotificationType = {
|
||||||
UNKNOWN: 0,
|
UNKNOWN: 0,
|
||||||
SNAPSHOT: 1,
|
SNAPSHOT: 1,
|
||||||
LOD_WARNING: 2,
|
CONNECTION_REFUSED: 2,
|
||||||
CONNECTION_REFUSED: 3,
|
EDIT_ERROR: 3,
|
||||||
EDIT_ERROR: 4,
|
TABLET: 4,
|
||||||
TABLET: 5,
|
CONNECTION: 5,
|
||||||
CONNECTION: 6,
|
WALLET: 6,
|
||||||
WALLET: 7,
|
|
||||||
properties: [
|
properties: [
|
||||||
{ text: "Snapshot" },
|
{ text: "Snapshot" },
|
||||||
{ text: "Level of Detail" },
|
|
||||||
{ text: "Connection Refused" },
|
{ text: "Connection Refused" },
|
||||||
{ text: "Edit error" },
|
{ text: "Edit error" },
|
||||||
{ text: "Tablet" },
|
{ text: "Tablet" },
|
||||||
|
@ -153,10 +150,6 @@
|
||||||
|
|
||||||
// This handles the final dismissal of a notification after fading
|
// This handles the final dismissal of a notification after fading
|
||||||
function dismiss(firstNoteOut, firstButOut, firstOut) {
|
function dismiss(firstNoteOut, firstButOut, firstOut) {
|
||||||
if (firstNoteOut === lodTextID) {
|
|
||||||
lodTextID = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Overlays.deleteOverlay(firstNoteOut);
|
Overlays.deleteOverlay(firstNoteOut);
|
||||||
Overlays.deleteOverlay(firstButOut);
|
Overlays.deleteOverlay(firstButOut);
|
||||||
notifications.splice(firstOut, 1);
|
notifications.splice(firstOut, 1);
|
||||||
|
@ -418,9 +411,6 @@
|
||||||
|
|
||||||
function deleteNotification(index) {
|
function deleteNotification(index) {
|
||||||
var notificationTextID = notifications[index];
|
var notificationTextID = notifications[index];
|
||||||
if (notificationTextID === lodTextID) {
|
|
||||||
lodTextID = false;
|
|
||||||
}
|
|
||||||
Overlays.deleteOverlay(notificationTextID);
|
Overlays.deleteOverlay(notificationTextID);
|
||||||
Overlays.deleteOverlay(buttons[index]);
|
Overlays.deleteOverlay(buttons[index]);
|
||||||
notifications.splice(index, 1);
|
notifications.splice(index, 1);
|
||||||
|
@ -674,20 +664,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LODManager.LODDecreased.connect(function () {
|
|
||||||
var warningText = "\n" +
|
|
||||||
"Due to the complexity of the content, the \n" +
|
|
||||||
"level of detail has been decreased. " +
|
|
||||||
"You can now see: \n" +
|
|
||||||
LODManager.getLODFeedbackText();
|
|
||||||
|
|
||||||
if (lodTextID === false) {
|
|
||||||
lodTextID = createNotification(warningText, NotificationType.LOD_WARNING);
|
|
||||||
} else {
|
|
||||||
Overlays.editOverlay(lodTextID, { text: warningText });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Controller.keyPressEvent.connect(keyPressEvent);
|
Controller.keyPressEvent.connect(keyPressEvent);
|
||||||
Controller.mousePressEvent.connect(mousePressEvent);
|
Controller.mousePressEvent.connect(mousePressEvent);
|
||||||
Controller.keyReleaseEvent.connect(keyReleaseEvent);
|
Controller.keyReleaseEvent.connect(keyReleaseEvent);
|
||||||
|
|
Loading…
Reference in a new issue