Files
OpenVulkano/openVulkanoCpp/Scene/UI/PerformanceInfo.hpp
2024-06-12 18:36:55 +03:00

35 lines
653 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "UI.hpp"
#include <deque>
namespace OpenVulkano::Scene::UI
{
struct FrameTimeCollection
{
std::deque<float> m_frameTimes;
float m_maxValue;
};
class PerformanceInfo : public UiElement
{
int m_windowSize = 200;
std::deque<float> m_ramUsed;
FrameTimeCollection m_frameCollection;
void UpdateQueues();
protected:
void BeginDraw() override;
void Draw() override;
void EndDraw() override;
};
}