From 493766caa6ad4ec5f72904d63ac8c93dc448f042 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sat, 8 Jun 2013 08:25:03 -0700 Subject: [PATCH] Added vsync info to debug display. --- src/renderer_d3d11.cpp | 3 ++- src/renderer_d3d9.cpp | 3 ++- src/renderer_gl.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 3f39189d..f4005a35 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -2748,11 +2748,12 @@ namespace bgfx ); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS" + tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS%s" , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs , freq/frameTime + , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? " (vsync)" : "" ); double elapsedCpuMs = double(elapsed)*toMs; diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 8dad2b2a..1308f716 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -2782,11 +2782,12 @@ namespace bgfx tvm.printf(0, pos++, 0x0f, " Device: %s (%s)", identifier.Description, identifier.Driver); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS" + tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS%s" , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs , freq/frameTime + , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? " (vsync)" : "" ); double elapsedCpuMs = double(elapsed)*toMs; diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 314dff30..eac46754 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -3317,11 +3317,12 @@ namespace bgfx tvm.printf(0, pos++, 0x0f, "GLSL version: %s", s_renderCtx.m_glslVersion); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame CPU: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS" + tvm.printf(10, pos++, 0x8e, " Frame CPU: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS%s" , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs , freq/frameTime + , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? " (vsync)" : "" ); double elapsedCpuMs = double(elapsed)*toMs;