29 virtual void OnAttach()
override;
30 virtual void OnDetach()
override;
31 virtual EventResult OnEvent(
Event& e)
override;
33 bool BeginUiFrame()
override;
34 void CancelUiFrame()
override;
38 void End(VkCommandBuffer commandBuffer);
39 ImTextureID GetRenderTargetTexture(std::string_view name);
41 void BlockEvents(
bool block)
43 block_events_ = block;
48 uint32_t GetActiveWidgetID()
const;
51 bool EnsureVulkanInitialized();
52 void CreateDescriptorPool(VkDevice device);
53 void DestroyRenderTargetTextures();
55 struct CachedRenderTargetTexture
57 std::vector<VkDescriptorSet> descriptor_sets;
58 std::vector<VkImageView> image_views;
59 std::vector<VkSampler> samplers;
63 bool block_events_ =
true;
66 VkDescriptorPool descriptor_pool_ = VK_NULL_HANDLE;
67 VkRenderPass render_pass_ = VK_NULL_HANDLE;
68 uint32_t image_count_ = 0;
69 bool vulkan_initialized_ =
false;
70 bool frame_started_ =
false;
71 std::map<std::string, CachedRenderTargetTexture> render_target_textures_;