Shkyera Engine
Easy to use, game engine for Python
Loading...
Searching...
No Matches
ProfilerWidget.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <GLFW/glfw3.h>
4
#include <
Common/Profiler.hpp
>
5
#include <UI/Widget.hpp>
6
7
namespace
shkyera
{
8
9
class
ProfilerWidget
:
public
Widget
{
10
public
:
11
using
Widget::Widget
;
12
13
ProfilerWidget
(std::string name);
14
18
virtual
void
draw
()
override
;
19
20
private
:
21
void
reset
();
22
23
bool
mResetOnEachFrame
=
false
;
24
size_t
mFramesSinceLastReset
= 0;
25
std::chrono::high_resolution_clock::time_point
mTimeOfLastReset
= std::chrono::high_resolution_clock::now();
26
};
27
28
}
// namespace shkyera
Profiler.hpp
shkyera::ProfilerWidget
Definition
ProfilerWidget.hpp:9
shkyera::ProfilerWidget::draw
virtual void draw() override
Implementation of the abstract draw method to render the profiler widget.
Definition
ProfilerWidget.cpp:20
shkyera::ProfilerWidget::mResetOnEachFrame
bool mResetOnEachFrame
Definition
ProfilerWidget.hpp:23
shkyera::ProfilerWidget::mTimeOfLastReset
std::chrono::high_resolution_clock::time_point mTimeOfLastReset
Definition
ProfilerWidget.hpp:25
shkyera::ProfilerWidget::mFramesSinceLastReset
size_t mFramesSinceLastReset
Definition
ProfilerWidget.hpp:24
shkyera::ProfilerWidget::reset
void reset()
Definition
ProfilerWidget.cpp:127
shkyera::Widget
An abstract base class representing a GUI widget.
Definition
Widget.hpp:23
shkyera::Widget::Widget
Widget(std::string name)
Constructor to create a widget with a specified name.
Definition
Widget.cpp:5
shkyera
Definition
Asset.hpp:6
src
ui
widgets
ProfilerWidget.hpp
Generated by
1.9.8
Franciszek Szewczyk © 2023