mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Make sure we reset our LOD adjustments before we switch back from throttling
the renderer.
This commit is contained in:
parent
eab4b4bc5d
commit
077df3906f
4 changed files with 11 additions and 2 deletions
|
@ -14,12 +14,12 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/Application.cpp" line="3608"/>
|
||||
<location filename="src/Application.cpp" line="3610"/>
|
||||
<source>Open Script</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="src/Application.cpp" line="3609"/>
|
||||
<location filename="src/Application.cpp" line="3611"/>
|
||||
<source>JavaScript Files (*.js)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -1636,6 +1636,8 @@ void Application::updateLOD() {
|
|||
// adjust it unless we were asked to disable this feature, or if we're currently in throttleRendering mode
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableAutoAdjustLOD) && !isThrottleRendering()) {
|
||||
Menu::getInstance()->autoAdjustLOD(_fps);
|
||||
} else {
|
||||
Menu::getInstance()->resetLODAdjust();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1249,6 +1249,12 @@ void Menu::autoAdjustLOD(float currentFPS) {
|
|||
}
|
||||
}
|
||||
|
||||
void Menu::resetLODAdjust() {
|
||||
_fpsAverage.reset();
|
||||
_fastFPSAverage.reset();
|
||||
_lastAvatarDetailDrop = _lastAdjust = usecTimestampNow();
|
||||
}
|
||||
|
||||
void Menu::setVoxelSizeScale(float sizeScale) {
|
||||
_voxelSizeScale = sizeScale;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ public:
|
|||
// User Tweakable LOD Items
|
||||
QString getLODFeedbackText();
|
||||
void autoAdjustLOD(float currentFPS);
|
||||
void resetLODAdjust();
|
||||
void setVoxelSizeScale(float sizeScale);
|
||||
float getVoxelSizeScale() const { return _voxelSizeScale; }
|
||||
float getAvatarLODDistanceMultiplier() const { return _avatarLODDistanceMultiplier; }
|
||||
|
|
Loading…
Reference in a new issue