mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:49:27 +02:00
Remove fps throttle from Application
This commit is contained in:
parent
4ccc2bbcd0
commit
8c653c70fb
3 changed files with 3 additions and 11 deletions
|
@ -372,7 +372,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
_runningScriptsWidgetWasVisible(false),
|
_runningScriptsWidgetWasVisible(false),
|
||||||
_lastNackTime(usecTimestampNow()),
|
_lastNackTime(usecTimestampNow()),
|
||||||
_lastSendDownstreamAudioStats(usecTimestampNow()),
|
_lastSendDownstreamAudioStats(usecTimestampNow()),
|
||||||
_isThrottleFPSEnabled(true),
|
|
||||||
_aboutToQuit(false),
|
_aboutToQuit(false),
|
||||||
_notifiedPacketVersionMismatchThisDomain(false),
|
_notifiedPacketVersionMismatchThisDomain(false),
|
||||||
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
|
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
|
||||||
|
@ -4526,10 +4525,6 @@ void Application::takeSnapshot() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setThrottleFPSEnabled() {
|
|
||||||
_isThrottleFPSEnabled = Menu::getInstance()->isOptionChecked(MenuOption::ThrottleFPSIfNotFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
float Application::getRenderResolutionScale() const {
|
float Application::getRenderResolutionScale() const {
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::RenderResolutionOne)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::RenderResolutionOne)) {
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
|
|
|
@ -345,9 +345,6 @@ public slots:
|
||||||
|
|
||||||
void domainSettingsReceived(const QJsonObject& domainSettingsObject);
|
void domainSettingsReceived(const QJsonObject& domainSettingsObject);
|
||||||
|
|
||||||
void setThrottleFPSEnabled();
|
|
||||||
bool isThrottleFPSEnabled() { return _isThrottleFPSEnabled; }
|
|
||||||
|
|
||||||
void resetSensors();
|
void resetSensors();
|
||||||
void setActiveFaceTracker();
|
void setActiveFaceTracker();
|
||||||
|
|
||||||
|
@ -539,8 +536,6 @@ private:
|
||||||
|
|
||||||
quint64 _lastNackTime;
|
quint64 _lastNackTime;
|
||||||
quint64 _lastSendDownstreamAudioStats;
|
quint64 _lastSendDownstreamAudioStats;
|
||||||
|
|
||||||
bool _isThrottleFPSEnabled;
|
|
||||||
|
|
||||||
bool _aboutToQuit;
|
bool _aboutToQuit;
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
|
#include "Menu.h"
|
||||||
|
|
||||||
static QGLFormat& getDesiredGLFormat() {
|
static QGLFormat& getDesiredGLFormat() {
|
||||||
// Specify an OpenGL 3.3 format using the Core profile.
|
// Specify an OpenGL 3.3 format using the Core profile.
|
||||||
|
@ -62,7 +63,8 @@ void GLCanvas::paintGL() {
|
||||||
// FIXME - I'm not sure why this still remains, it appears as if this GLCanvas gets a single paintGL call near
|
// FIXME - I'm not sure why this still remains, it appears as if this GLCanvas gets a single paintGL call near
|
||||||
// the beginning of the application starting up. I'm not sure if we really need to call Application::paintGL()
|
// the beginning of the application starting up. I'm not sure if we really need to call Application::paintGL()
|
||||||
// in this case, since the display plugins eventually handle all the painting
|
// in this case, since the display plugins eventually handle all the painting
|
||||||
if (!qApp->getWindow()->isMinimized() || !qApp->isThrottleFPSEnabled()) {
|
bool isThrottleFPSEnabled = Menu::getInstance()->isOptionChecked(MenuOption::ThrottleFPSIfNotFocus);
|
||||||
|
if (!qApp->getWindow()->isMinimized() || !isThrottleFPSEnabled) {
|
||||||
qApp->paintGL();
|
qApp->paintGL();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue