Add in FPS counter and stats menu
This commit is contained in:
@@ -177,6 +177,8 @@ namespace fgl::engine::gui
|
||||
drawEntityInfo( info );
|
||||
drawFilesystemGUI( info );
|
||||
|
||||
drawStats( info );
|
||||
|
||||
endImGui( info.command_buffer );
|
||||
}
|
||||
|
||||
|
||||
@@ -25,4 +25,6 @@ namespace fgl::engine::gui
|
||||
|
||||
void drawCameraOutputs( FrameInfo& info );
|
||||
|
||||
void drawStats( const FrameInfo& info );
|
||||
|
||||
} // namespace fgl::engine::gui
|
||||
|
||||
17
src/editor/src/gui/drawStats.cpp
Normal file
17
src/editor/src/gui/drawStats.cpp
Normal 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
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "engine/FGL_DEFINES.hpp"
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user