2929#include " platform/input_events.h"
3030#include " platform/window.h"
3131#include " rendering/hpp_pipeline_state.h"
32- #include " stats/hpp_stats.h"
3332#include " stats/stats.h"
3433#include < glm/glm.hpp>
3534#include < imgui.h>
@@ -106,7 +105,6 @@ class Gui
106105 using PipelineLayoutType = typename std::conditional<bindingType == BindingType::Cpp, vk::PipelineLayout, VkPipelineLayout>::type;
107106 using PipelineShaderStageCreateInfoType = typename std::conditional<bindingType == BindingType::Cpp, vk::PipelineShaderStageCreateInfo, VkPipelineShaderStageCreateInfo>::type;
108107 using RenderPassType = typename std::conditional<bindingType == BindingType::Cpp, vk::RenderPass, VkRenderPass>::type;
109- using StatsType = typename std::conditional<bindingType == BindingType::Cpp, vkb::stats::HPPStats, vkb::Stats>::type;
110108
111109 public:
112110 /* *
@@ -128,9 +126,9 @@ class Gui
128126 public:
129127 /* *
130128 * @brief Constructs a StatsView
131- * @param stats Const pointer to the Stats data object; may be null
129+ * @param stats Const pointer to the vkb::stats:: Stats data object; may be null
132130 */
133- StatsView (const StatsType *stats);
131+ StatsView (const vkb::stats::Stats<bindingType> *stats);
134132
135133 float get_graph_height () const ;
136134
@@ -165,7 +163,7 @@ class Gui
165163 */
166164 Gui (vkb::rendering::RenderContext<bindingType> &render_context,
167165 Window const &window,
168- StatsType const *stats = nullptr ,
166+ vkb::stats::Stats<bindingType> const *stats = nullptr ,
169167 float font_size = 21 .0f ,
170168 bool explicit_update = false );
171169
@@ -259,7 +257,7 @@ class Gui
259257 * @param stats Statistics to show (can be null)
260258 * @param debug_info Debug info to show (can be null)
261259 */
262- void show_top_window (const std::string &app_name, const StatsType *stats = nullptr , DebugInfo *debug_info = nullptr );
260+ void show_top_window (const std::string &app_name, const vkb::stats::Stats<bindingType> *stats = nullptr , DebugInfo *debug_info = nullptr );
263261
264262 /* *
265263 * @brief Updates the Gui
@@ -273,7 +271,7 @@ class Gui
273271 * @brief Shows a child with statistics
274272 * @param stats Statistics to show
275273 */
276- void show_stats (const StatsType &stats);
274+ void show_stats (const vkb::stats::Stats<bindingType> &stats);
277275
278276 private:
279277 static constexpr char const *default_font = " Roboto-Regular" ; // The name of the default font file to use
@@ -350,7 +348,7 @@ using GuiCpp = Gui<vkb::BindingType::Cpp>;
350348
351349template <vkb::BindingType bindingType>
352350inline Gui<bindingType>::Gui(
353- vkb::rendering::RenderContext<bindingType> &render_context_, Window const &window, StatsType const *stats, float font_size, bool explicit_update) :
351+ vkb::rendering::RenderContext<bindingType> &render_context_, Window const &window, vkb::stats::Stats<bindingType> const *stats, float font_size, bool explicit_update) :
354352 render_context{render_context_},
355353 content_scale_factor{window.get_content_scale_factor ()},
356354 dpi_factor{window.get_dpi_factor () * content_scale_factor},
@@ -1285,7 +1283,7 @@ inline void Gui<bindingType>::show_simple_window(const std::string &name, uint32
12851283}
12861284
12871285template <vkb::BindingType bindingType>
1288- inline void Gui<bindingType>::show_stats(const StatsType &stats)
1286+ inline void Gui<bindingType>::show_stats(const vkb::stats::Stats<bindingType> &stats)
12891287{
12901288 for (const auto &stat_index : stats.get_requested_stats ())
12911289 {
@@ -1327,7 +1325,7 @@ inline void Gui<bindingType>::show_stats(const StatsType &stats)
13271325}
13281326
13291327template <vkb::BindingType bindingType>
1330- inline void Gui<bindingType>::show_top_window(const std::string &app_name, const StatsType *stats, DebugInfo *debug_info)
1328+ inline void Gui<bindingType>::show_top_window(const std::string &app_name, const vkb::stats::Stats<bindingType> *stats, DebugInfo *debug_info)
13311329{
13321330 // Transparent background
13331331 ImGui::SetNextWindowBgAlpha (overlay_alpha);
@@ -1501,7 +1499,7 @@ inline void Gui<bindingType>::upload_draw_data(const ImDrawData *draw_data, uint
15011499}
15021500
15031501template <vkb::BindingType bindingType>
1504- inline Gui<bindingType>::StatsView::StatsView(const StatsType *stats)
1502+ inline Gui<bindingType>::StatsView::StatsView(const vkb::stats::Stats<bindingType> *stats)
15051503{
15061504 if (stats == nullptr )
15071505 {
0 commit comments