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 private:
28 void WaitForResizeAndRecreateSwapchain();
29 void SetupVulkanWindow(
32 int width,
33 int height
34 );
35
36 void CreateOrResizeWindow(
39 int width, int height
40 );
41
42 VkDescriptorPool imguiPool = nullptr;
43 Grindstone::GraphicsAPI::DescriptorSetLayout* textureDescriptorLayout = nullptr;
44 std::vector<GraphicsAPI::CommandBuffer*> commandBuffers;
45
46 bool shouldRebuildSwapchain = false;
47 };
48}
Definition ImguiRenderer.hpp:12
Definition CommandBuffer.hpp:59
Definition DescriptorSetLayout.hpp:13
Definition VulkanCore.hpp:31
Definition WindowGraphicsBinding.hpp:16