Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
ImguiRendererVulkan.hpp
1#pragma once
2
3#include <vulkan/vulkan.h>
4
5#include "ImguiRenderer.hpp"
6
7namespace Grindstone::GraphicsAPI {
9}
10
11namespace Grindstone::GraphicsAPI::Vulkan {
12 class Core;
13}
14
15namespace Grindstone::Editor::ImguiEditor {
16 class ImguiRendererVulkan : public ImguiRenderer {
17 public:
18 ImguiRendererVulkan();
19 ~ImguiRendererVulkan();
20
21 virtual GraphicsAPI::CommandBuffer* GetCommandBuffer() override;
22 virtual bool PreRender() override;
23 virtual void PrepareImguiRendering() override;
24 virtual void PostRender() override;
25 virtual void Resize() override;
26 virtual ImTextureID CreateTexture(std::filesystem::path path) override;
27 virtual ImTextureID GetThumbnailAtlas() override;
28 private:
29 void WaitForResizeAndRecreateSwapchain();
30 void SetupVulkanWindow(
31 Grindstone::GraphicsAPI::Vulkan::Core* graphicsCore,
33 int width,
34 int height
35 );
36
37 void CreateOrResizeWindow(
38 Grindstone::GraphicsAPI::Vulkan::Core* graphicsCore,
40 int width, int height
41 );
42
43 VkDescriptorPool imguiPool = nullptr;
44 Grindstone::GraphicsAPI::DescriptorSetLayout* textureDescriptorLayout = nullptr;
45 std::vector<GraphicsAPI::CommandBuffer*> commandBuffers;
46
47 bool shouldRebuildSwapchain = false;
48 };
49}
Definition ImguiRenderer.hpp:12
Definition CommandBuffer.hpp:73
Definition DescriptorSetLayout.hpp:13
Definition WindowGraphicsBinding.hpp:16