Karma Engine
Loading...
Searching...
No Matches
KarmaGuiRenderer.h
1#pragma once
2
3#include "krpch.h"
4
5#include "imgui_impl_glfw.h"
6#include "Platform/Vulkan/KarmaGuiVulkanHandler.h"
7#include "Platform/OpenGL/KarmaGuiOpenGLHandler.h"
8
9namespace Karma
10{
12 {
13 KGTextureID GetTextureIDAtIndex(uint32_t index);
14 uint32_t GetTextureWidthAtIndex(uint32_t index);
15
16 uint32_t GetTextureHeightAtIndex(uint32_t index);
17 };
18
19 class KARMA_API KarmaGuiRenderer
20 {
21 public:
22 static void SetUpKarmaGuiRenderer(GLFWwindow* window);
23 static void OnKarmaGuiLayerDetach();
24 static void OnKarmaGuiLayerBegin();
25 static void OnKarmaGuiLayerEnd();
26 static KarmaGuiBackendRendererUserData* GetBackendRendererUserData();
27 static void AddImageTexture(char const* fileName, const std::string& label);
28
29 // Vulkan specific functions
30 static void KarmaGui_ImplVulkan_Init(KarmaGui_ImplVulkan_InitInfo* initInfo);
31 static void CreateDescriptorPool();
32 static void GracefulVulkanShutDown();
33 static void CleanUpVulkanAndWindowData();
34 static void GiveLoopBeginControlToVulkan();
35 static void GiveLoopEndControlToVulkan();
36 static void FrameRender(KarmaGui_ImplVulkanH_Window* windowData, KGDrawData* drawData);
37 static void FramePresent(KarmaGui_ImplVulkanH_Window* windowData);
38
39 private:
40
41 static GLFWwindow* m_GLFWwindow;
42 static void* m_BackendRenderer;
43
44 // Vulkan specific members
45 static VkDescriptorPool m_KarmaGuiDescriptorPool;
46 static KarmaGui_ImplVulkanH_Window m_VulkanWindowData;
47
48 static bool m_SwapChainRebuild;
49 };
50}
Definition KarmaGuiRenderer.h:20
Definition KarmaGui.h:2647
Definition KarmaGuiRenderer.h:12
Definition KarmaGuiOpenGLHandler.h:36
Definition KarmaGuiVulkanHandler.h:83
Definition KarmaGuiVulkanHandler.h:186
Definition KarmaGuiVulkanHandler.h:18