Add in FPS counter and stats menu

This commit is contained in:
2024-08-07 03:17:14 -04:00
parent b01216a951
commit 48087b53ed
4 changed files with 23 additions and 0 deletions

View File

@@ -177,6 +177,8 @@ namespace fgl::engine::gui
drawEntityInfo( info );
drawFilesystemGUI( info );
drawStats( info );
endImGui( info.command_buffer );
}

View File

@@ -25,4 +25,6 @@ namespace fgl::engine::gui
void drawCameraOutputs( FrameInfo& info );
void drawStats( const FrameInfo& info );
} // namespace fgl::engine::gui

View File

@@ -0,0 +1,17 @@
#include "core.hpp"
#include "safe_include.hpp"
namespace fgl::engine::gui
{
void drawStats( const FrameInfo& info )
{
ImGui::Begin( "Stats" );
ImGui::Text( "FPS: %0.1f", ImGui::GetIO().Framerate );
ImGui::End();
}
} // namespace fgl::engine::gui

View File

@@ -16,6 +16,8 @@
#include <string_view>
#include "engine/FGL_DEFINES.hpp"
namespace ImGui
{