mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Remove idleTimer and call idle directly from paintGL.
This commit is contained in:
parent
61109d09af
commit
0c12bb5a4e
1 changed files with 3 additions and 5 deletions
|
@ -160,7 +160,6 @@ static QTimer balanceUpdateTimer;
|
||||||
static QTimer identityPacketTimer;
|
static QTimer identityPacketTimer;
|
||||||
static QTimer billboardPacketTimer;
|
static QTimer billboardPacketTimer;
|
||||||
static QTimer checkFPStimer;
|
static QTimer checkFPStimer;
|
||||||
static QTimer idleTimer;
|
|
||||||
|
|
||||||
static const QString SNAPSHOT_EXTENSION = ".jpg";
|
static const QString SNAPSHOT_EXTENSION = ".jpg";
|
||||||
static const QString SVO_EXTENSION = ".svo";
|
static const QString SVO_EXTENSION = ".svo";
|
||||||
|
@ -844,7 +843,6 @@ void Application::cleanupBeforeQuit() {
|
||||||
identityPacketTimer.stop();
|
identityPacketTimer.stop();
|
||||||
billboardPacketTimer.stop();
|
billboardPacketTimer.stop();
|
||||||
checkFPStimer.stop();
|
checkFPStimer.stop();
|
||||||
idleTimer.stop();
|
|
||||||
QMetaObject::invokeMethod(&_settingsTimer, "stop", Qt::BlockingQueuedConnection);
|
QMetaObject::invokeMethod(&_settingsTimer, "stop", Qt::BlockingQueuedConnection);
|
||||||
|
|
||||||
// save state
|
// save state
|
||||||
|
@ -982,9 +980,6 @@ void Application::initializeGL() {
|
||||||
connect(&checkFPStimer, &QTimer::timeout, this, &Application::checkFPS);
|
connect(&checkFPStimer, &QTimer::timeout, this, &Application::checkFPS);
|
||||||
checkFPStimer.start(1000);
|
checkFPStimer.start(1000);
|
||||||
|
|
||||||
// call our idle function whenever we can
|
|
||||||
connect(&idleTimer, &QTimer::timeout, this, &Application::idle);
|
|
||||||
idleTimer.start(TARGET_SIM_FRAME_PERIOD_MS);
|
|
||||||
_idleLoopStdev.reset();
|
_idleLoopStdev.reset();
|
||||||
|
|
||||||
// update before the first render
|
// update before the first render
|
||||||
|
@ -1048,6 +1043,9 @@ void Application::initializeUi() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::paintGL() {
|
void Application::paintGL() {
|
||||||
|
|
||||||
|
idle();
|
||||||
|
|
||||||
PROFILE_RANGE(__FUNCTION__);
|
PROFILE_RANGE(__FUNCTION__);
|
||||||
PerformanceTimer perfTimer("paintGL");
|
PerformanceTimer perfTimer("paintGL");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue