Init Imgui.
Context, a concept of OpenGL, means OpenGL objects in used during a render stage. Likes VkInstance.
@breif Init ImPlot Library's Context.
@breif Configuration of ImGui. Can Set custom UI style here.
ImGui Slate Layout cache file. Set nullptr, if not need.
Setup Platform / Renderer backends.
Instance a ImGui_ImplVulkan_InitInfo.
ImGui Init for Vulkan.
Create IconFont.
Init NsightPerf HUD Renderer.
Context, a concept of OpenGL, means OpenGL objects in used during a render stage. Likes VkInstance.
@breif Init ImPlot Library's Context.
@breif Configuration of ImGui. Can Set custom UI style here.
ImGui Slate Layout cache file. Set nullptr, if not need.
Setup Platform / Renderer backends.
Instance a ImGui_ImplVulkan_InitInfo.
ImGui Init for Vulkan.
Create IconFont.
Init NsightPerf HUD Renderer.
Definition at line 97 of file SlateRenderer.cpp.
98 {
100
105 ImGui::CreateContext();
106
110 ImPlot::CreateContext();
111
116 ImGuiIO& io = ImGui::GetIO();
117
119 SPICES_ENGINE_ASSETS_PATH + "SlateLayout/DefaultLayout.ini",
120 "DefaultLayout.ini"
121 );
122
127 io.IniFilename = "DefaultLayout.ini";
128 io.LogFilename = nullptr;
129 io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
130 io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
131 io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
132
135
140
144 ImGui_ImplVulkan_InitInfo init_info = {};
150 init_info.PipelineCache = VK_NULL_HANDLE;
152 init_info.RenderPass =
m_Pass->Get();
153 init_info.Subpass = 0;
156 init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
157 init_info.Allocator = VK_NULL_HANDLE;
158 init_info.CheckVkResultFn = [](VkResult result) {
VK_CHECK(result); };
159
163 ImGui_ImplVulkan_Init(&init_info);
164
168 ImGui_ImplVulkan_CreateFontsTexture();
169
173 NSIGHTPERF_GPUPROFILERHUD_INITHUDRENDERER;
174
176 }
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
static bool FileLibrary_CopyFile(std::string srcFilePath, std::string dstFilePath)
Copy a file to dst path.
static void SetFonts(FontMode fontmode=FontMode::FONT_PROPORTIONAL_SCALED)
Looking for TTF fonts, first on the VULKAN SDK, then Windows default fonts.
static void SetStyle()
Setting common style across samples.
std::shared_ptr< RendererPass > m_Pass
RendererPass.
std::shared_ptr< VulkanDescriptorPool > m_DescriptorPool
This variable is passed while renderer instanced.
VulkanState & m_VulkanState
This variable is passed while renderer instanced.
constexpr uint32_t MaxFrameInFlight
Max In Flight Frame. 2 buffers are enough in this program.
uint32_t m_GraphicQueueFamily
VkPhysicalDevice m_PhysicalDevice
References Spices::Renderer::m_VulkanState, Spices::ImGuiH::SetFonts(), and Spices::ImGuiH::SetStyle().
Referenced by OnSystemInitialize().