A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122
  1. #include "PerfCounter.h"
  2. #include <imgui.h>
  3. #include "util.h"
  4. namespace Swan {
  5. void PerfCounter::render() {
  6. Deferred win([]{ ImGui::End(); });
  7. if (!ImGui::Begin("Perf Stats"))
  8. return;
  9. ImGui::PushItemWidth(ImGui::GetFontSize() * -12);
  10. ImGui::Text("Hello World");
  11. std::array<float, 64> buf;
  12. frame_time_.fill(buf);
  13. ImGui::PlotLines("Frame Time", buf.data(), 64);
  14. }
  15. }