Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,8 @@ set(STATS_FILES
stats/stats_provider.h
stats/frame_time_stats_provider.h
stats/vulkan_stats_provider.h
stats/hpp_stats.h

# Source Files
stats/stats.cpp
stats/stats_provider.cpp
stats/frame_time_stats_provider.cpp
stats/vulkan_stats_provider.cpp)
Expand Down
20 changes: 9 additions & 11 deletions framework/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "platform/input_events.h"
#include "platform/window.h"
#include "rendering/hpp_pipeline_state.h"
#include "stats/hpp_stats.h"
#include "stats/stats.h"
#include <glm/glm.hpp>
#include <imgui.h>
Expand Down Expand Up @@ -106,7 +105,6 @@ class Gui
using PipelineLayoutType = typename std::conditional<bindingType == BindingType::Cpp, vk::PipelineLayout, VkPipelineLayout>::type;
using PipelineShaderStageCreateInfoType = typename std::conditional<bindingType == BindingType::Cpp, vk::PipelineShaderStageCreateInfo, VkPipelineShaderStageCreateInfo>::type;
using RenderPassType = typename std::conditional<bindingType == BindingType::Cpp, vk::RenderPass, VkRenderPass>::type;
using StatsType = typename std::conditional<bindingType == BindingType::Cpp, vkb::stats::HPPStats, vkb::Stats>::type;

public:
/**
Expand All @@ -128,9 +126,9 @@ class Gui
public:
/**
* @brief Constructs a StatsView
* @param stats Const pointer to the Stats data object; may be null
* @param stats Const pointer to the vkb::stats::Stats data object; may be null
*/
StatsView(const StatsType *stats);
StatsView(const vkb::stats::Stats<bindingType> *stats);

float get_graph_height() const;

Expand Down Expand Up @@ -165,7 +163,7 @@ class Gui
*/
Gui(vkb::rendering::RenderContext<bindingType> &render_context,
Window const &window,
StatsType const *stats = nullptr,
vkb::stats::Stats<bindingType> const *stats = nullptr,
float font_size = 21.0f,
bool explicit_update = false);

Expand Down Expand Up @@ -259,7 +257,7 @@ class Gui
* @param stats Statistics to show (can be null)
* @param debug_info Debug info to show (can be null)
*/
void show_top_window(const std::string &app_name, const StatsType *stats = nullptr, DebugInfo *debug_info = nullptr);
void show_top_window(const std::string &app_name, const vkb::stats::Stats<bindingType> *stats = nullptr, DebugInfo *debug_info = nullptr);

/**
* @brief Updates the Gui
Expand All @@ -273,7 +271,7 @@ class Gui
* @brief Shows a child with statistics
* @param stats Statistics to show
*/
void show_stats(const StatsType &stats);
void show_stats(const vkb::stats::Stats<bindingType> &stats);

private:
static constexpr char const *default_font = "Roboto-Regular"; // The name of the default font file to use
Expand Down Expand Up @@ -350,7 +348,7 @@ using GuiCpp = Gui<vkb::BindingType::Cpp>;

template <vkb::BindingType bindingType>
inline Gui<bindingType>::Gui(
vkb::rendering::RenderContext<bindingType> &render_context_, Window const &window, StatsType const *stats, float font_size, bool explicit_update) :
vkb::rendering::RenderContext<bindingType> &render_context_, Window const &window, vkb::stats::Stats<bindingType> const *stats, float font_size, bool explicit_update) :
render_context{render_context_},
content_scale_factor{window.get_content_scale_factor()},
dpi_factor{window.get_dpi_factor() * content_scale_factor},
Expand Down Expand Up @@ -1285,7 +1283,7 @@ inline void Gui<bindingType>::show_simple_window(const std::string &name, uint32
}

template <vkb::BindingType bindingType>
inline void Gui<bindingType>::show_stats(const StatsType &stats)
inline void Gui<bindingType>::show_stats(const vkb::stats::Stats<bindingType> &stats)
{
for (const auto &stat_index : stats.get_requested_stats())
{
Expand Down Expand Up @@ -1327,7 +1325,7 @@ inline void Gui<bindingType>::show_stats(const StatsType &stats)
}

template <vkb::BindingType bindingType>
inline void Gui<bindingType>::show_top_window(const std::string &app_name, const StatsType *stats, DebugInfo *debug_info)
inline void Gui<bindingType>::show_top_window(const std::string &app_name, const vkb::stats::Stats<bindingType> *stats, DebugInfo *debug_info)
{
// Transparent background
ImGui::SetNextWindowBgAlpha(overlay_alpha);
Expand Down Expand Up @@ -1501,7 +1499,7 @@ inline void Gui<bindingType>::upload_draw_data(const ImDrawData *draw_data, uint
}

template <vkb::BindingType bindingType>
inline Gui<bindingType>::StatsView::StatsView(const StatsType *stats)
inline Gui<bindingType>::StatsView::StatsView(const vkb::stats::Stats<bindingType> *stats)
{
if (stats == nullptr)
{
Expand Down
65 changes: 0 additions & 65 deletions framework/stats/hpp_stats.h

This file was deleted.

Loading
Loading