diff --git a/src/editor/src/gui/core.cpp b/src/editor/src/gui/core.cpp index 7ab29b6..ade39f6 100644 --- a/src/editor/src/gui/core.cpp +++ b/src/editor/src/gui/core.cpp @@ -177,6 +177,8 @@ namespace fgl::engine::gui drawEntityInfo( info ); drawFilesystemGUI( info ); + drawStats( info ); + endImGui( info.command_buffer ); } diff --git a/src/editor/src/gui/core.hpp b/src/editor/src/gui/core.hpp index 7f636f7..a14cecc 100644 --- a/src/editor/src/gui/core.hpp +++ b/src/editor/src/gui/core.hpp @@ -25,4 +25,6 @@ namespace fgl::engine::gui void drawCameraOutputs( FrameInfo& info ); + void drawStats( const FrameInfo& info ); + } // namespace fgl::engine::gui diff --git a/src/editor/src/gui/drawStats.cpp b/src/editor/src/gui/drawStats.cpp new file mode 100644 index 0000000..004414d --- /dev/null +++ b/src/editor/src/gui/drawStats.cpp @@ -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 diff --git a/src/editor/src/gui/safe_include.hpp b/src/editor/src/gui/safe_include.hpp index 469ceb8..99af8c8 100644 --- a/src/editor/src/gui/safe_include.hpp +++ b/src/editor/src/gui/safe_include.hpp @@ -16,6 +16,8 @@ #include +#include "engine/FGL_DEFINES.hpp" + namespace ImGui {