From 267b78f9fce76cc87b5cf97b688cc7a41ac2d989 Mon Sep 17 00:00:00 2001 From: saschawillems Date: Fri, 15 Apr 2016 21:24:50 +0200 Subject: [PATCH] Android fps log output --- base/vulkanexamplebase.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index b0693a4f..76e9af5e 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -403,6 +403,13 @@ void VulkanExampleBase::renderLoop() timer -= 1.0f; } } + fpsTimer += (float)tDiff; + if (fpsTimer > 1000.0f) + { + LOGD("%d fps", frameCounter); + fpsTimer = 0.0f; + frameCounter = 0.0f; + } // Check gamepad state const float deadZone = 0.0015f; // todo : check if gamepad is present