mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:28:09 +02:00
Use plugins data for Application frame rate/period.
This commit is contained in:
parent
8ae05d8490
commit
53bfcd17e2
2 changed files with 4 additions and 4 deletions
|
@ -3246,6 +3246,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
|
||||||
bool Application::isHMDMode() const {
|
bool Application::isHMDMode() const {
|
||||||
return getActiveDisplayPlugin()->isHmd();
|
return getActiveDisplayPlugin()->isHmd();
|
||||||
}
|
}
|
||||||
|
float Application::getTargetFrameRate() { return getActiveDisplayPlugin()->getTargetFrameRate(); }
|
||||||
|
float Application::getTargetFramePeriod() { return getActiveDisplayPlugin()->getTargetFramePeriod(); }
|
||||||
|
|
||||||
QRect Application::getDesirableApplicationGeometry() {
|
QRect Application::getDesirableApplicationGeometry() {
|
||||||
QRect applicationGeometry = getWindow()->geometry();
|
QRect applicationGeometry = getWindow()->geometry();
|
||||||
|
|
|
@ -159,10 +159,8 @@ public:
|
||||||
bool isForeground() const { return _isForeground; }
|
bool isForeground() const { return _isForeground; }
|
||||||
|
|
||||||
float getFps() const { return _fps; }
|
float getFps() const { return _fps; }
|
||||||
float const HMD_TARGET_FRAME_RATE = 75.0f;
|
float getTargetFrameRate(); // frames/second
|
||||||
float const DESKTOP_TARGET_FRAME_RATE = 60.0f;
|
float getTargetFramePeriod(); // seconds
|
||||||
float getTargetFrameRate() { return isHMDMode() ? HMD_TARGET_FRAME_RATE : DESKTOP_TARGET_FRAME_RATE; }
|
|
||||||
float getTargetFramePeriod() { return isHMDMode() ? 1.0f / HMD_TARGET_FRAME_RATE : 1.0f / DESKTOP_TARGET_FRAME_RATE; } // same as 1/getTargetFrameRate, but w/compile-time division
|
|
||||||
float getLastInstanteousFps() const { return _lastInstantaneousFps; }
|
float getLastInstanteousFps() const { return _lastInstantaneousFps; }
|
||||||
float getLastPaintWait() const { return _lastPaintWait; };
|
float getLastPaintWait() const { return _lastPaintWait; };
|
||||||
float getLastDeducedNonVSyncFps() const { return _lastDeducedNonVSyncFps; }
|
float getLastDeducedNonVSyncFps() const { return _lastDeducedNonVSyncFps; }
|
||||||
|
|
Loading…
Reference in a new issue