SpiecsEngine
 
Loading...
Searching...
No Matches
ImguiVirtualGeometryVisualizer.h
Go to the documentation of this file.
1/**
2* @file ImguiVirtualGeometryVisualizer.h
3* @brief The ImguiVirtualGeometryVisualizer Class Definitions.
4* @author Spices.
5*/
6
7#pragma once
8#include "Core/Core.h"
9#include "Slate/Imgui/ImguiUtils.h"
10
11namespace Spices {
12
13 /**
14 * @brief The VirtualGeometryBufferID Texture's ImTextureID.
15 */
17 {
18 ImTextureID TriangleID; /* @brief ImTextureID of TriangleID. */
19 ImTextureID MeshletID; /* @brief ImTextureID of MeshletID. */
20
21 /**
22 * @brief Free in used DescriptorSet used by GBuffer Visualizer.
23 */
24 void Free() const
25 {
26 ImGui_ImplVulkan_RemoveTexture(reinterpret_cast<VkDescriptorSet>(TriangleID));
27 ImGui_ImplVulkan_RemoveTexture(reinterpret_cast<VkDescriptorSet>(MeshletID));
28 }
29 };
30
31 /*
32 * @brief The ImguiVirtualGeometryVisualizer Class.
33 * This class defines how to render a VirtualGeometry Visualizer.
34 */
36 {
37 public:
38
39 /**
40 * @brief Constructor Function.
41 * @param[in] panelName The Slate's name to show.
42 * @param[in] frameInfo The Frame Date that in use.
43 */
45 const std::string& panelName,
46 FrameInfo& frameInfo
47 );
48
49 /**
50 * @brief Destructor Function.
51 */
52 virtual ~ImguiVirtualGeometryVisualizer() override = default;
53
54 /**
55 * @brief This interface is called On SlateSystem Update.
56 * @param[in] ts TimeStep.
57 */
58 virtual void OnUpdate(TimeStep& ts) override {}
59
60 /**
61 * @brief This interface is called On SlateRenderer Render.
62 */
63 virtual void OnRender() override;
64
65 /**
66 * @brief This interface is called On Global Event Function Pointer is called.
67 */
68 virtual void OnEvent(Event& event) override;
69
70 private:
71
72 /**
73 * @brief Event Dispatcher target. Registry on Slate(Viewport) Resized.
74 * @param[in] event SlateResizeEvent.
75 * @return Returns true if need block the event.
76 */
78
79 /**
80 * @brief Query ID from RendererResourcePool.
81 */
82 void QueryID();
83
84 private:
85
86 /**
87 * @brief The instance of GBufferID.
88 */
90
91 /**
92 * @brief The slate width.
93 */
94 float m_Width = 500;
95
96 /**
97 * @brief The slate height.
98 */
99 float m_Height = 500;
100 };
101}
#define BIND_EVENT_FN(x)
Bind Event.
Definition Event.h:88
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
EventDispatcher(Event &event)
Constructor Function.
Definition Event.h:172
This Class store a Specific Event type first and Dispatch a event handle function to it.
Definition Event.h:156
This Class is the basic Event Class. Inherit from it and create specific event class.
Definition Event.h:96
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
void End()
End a slate.
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
Definition ImguiUtils.h:35
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...
Definition ImguiUtils.h:27
bool OnSlateResized(SlateResizeEvent &event)
Event Dispatcher target. Registry on Slate(Viewport) Resized.
ImguiVirtualGeometryVisualizer(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function.
virtual void OnRender() override
This interface is called On SlateRenderer Render.
void QueryID()
Query ID from RendererResourcePool.
VirtualGeometryBufferID m_BufferID
The instance of GBufferID.
virtual ~ImguiVirtualGeometryVisualizer() override=default
Destructor Function.
virtual void OnEvent(Event &event) override
This interface is called On Global Event Function Pointer is called.
virtual void OnUpdate(TimeStep &ts) override
This interface is called On SlateSystem Update.
const uint32_t & GetHeight() const
Get New Viewport Height.
Definition SlateEvent.h:46
const uint32_t & GetWidth() const
Get New Viewport Width.
Definition SlateEvent.h:40
This Class is inherited from Event Class. Called by Viewport Resize.
Definition SlateEvent.h:18
This Class handles our engine time step during frames. Global Unique.
Definition TimeStep.h:22
void Free() const
Free in used DescriptorSet used by GBuffer Visualizer.
The VirtualGeometryBufferID Texture's ImTextureID.