Nebula
Loading...
Searching...
No Matches
graphicsprofilerpanel.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
17//------------------------------------------------------------------------------
18#if WITH_NEBULA_EDITOR
20#include "coregraphics/config.h"
21#include "imgui.h"
22#include "math/vec4.h"
23#include "neweditor/base/timeline.h"
24#include "neweditor/core/editorpanel.h"
25#include "util/array.h"
26
27namespace GraphicsFeature
28{
29
30class GraphicsProfilerPanel final : public Editor::EditorPanel
31{
33public:
35 virtual ~GraphicsProfilerPanel();
36
38 void Draw() override;
39
40private:
42 void ReadFrame();
43
45 IndexT DrawMarker(const CoreGraphics::FrameProfilingMarker& marker, Editor::TimelineCanvas& canvas,
46 ImVec2 pos, IndexT level);
47
49 IndexT DrawQueue(const char* name, CoreGraphics::QueueType queue,
50 const Util::Array<CoreGraphics::FrameProfilingMarker>& markers, Editor::TimelineCanvas& canvas,
51 ImVec2 pos);
52
53 bool pauseProfiling;
54 bool captureWorstFrame;
55
56 float currentFrameTime;
57 float worstFrameTime;
58
59 Editor::TimelineCanvas canvas;
60
62#if NEBULA_ENABLE_PROFILING
65#endif
66};
67
68} // namespace GraphicsFeature
69#endif // WITH_NEBULA_EDITOR
70//------------------------------------------------------------------------------
The GPU half of the profiler.
Nebula's dynamic array class.
Definition array.h:61
QueueType
Definition config.h:40
Definition graphicsfeatureunit.cc:66
Compile time configuration options for the CoreGraphics subsystem.
#define __DeclareClass(type)
int IndexT
Definition types.h:49