From 53bfcd17e2537c7930faa3221ab1c74de5a2a482 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Wed, 2 Dec 2015 16:41:16 -0800 Subject: [PATCH] Use plugins data for Application frame rate/period. --- interface/src/Application.cpp | 2 ++ interface/src/Application.h | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index ef10ad4464..94aa3949cc 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3246,6 +3246,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node bool Application::isHMDMode() const { return getActiveDisplayPlugin()->isHmd(); } +float Application::getTargetFrameRate() { return getActiveDisplayPlugin()->getTargetFrameRate(); } +float Application::getTargetFramePeriod() { return getActiveDisplayPlugin()->getTargetFramePeriod(); } QRect Application::getDesirableApplicationGeometry() { QRect applicationGeometry = getWindow()->geometry(); diff --git a/interface/src/Application.h b/interface/src/Application.h index 730158c689..adef152ac5 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -159,10 +159,8 @@ public: bool isForeground() const { return _isForeground; } float getFps() const { return _fps; } - float const HMD_TARGET_FRAME_RATE = 75.0f; - float const DESKTOP_TARGET_FRAME_RATE = 60.0f; - 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 getTargetFrameRate(); // frames/second + float getTargetFramePeriod(); // seconds float getLastInstanteousFps() const { return _lastInstantaneousFps; } float getLastPaintWait() const { return _lastPaintWait; }; float getLastDeducedNonVSyncFps() const { return _lastDeducedNonVSyncFps; }