Finality Engine
Loading...
Searching...
No Matches
ImGUIImpl.h
Go to the documentation of this file.
1
6#pragma once
7#include <imgui.h>
8
9#include <Core/RenderTypes.h>
10#include <Core/Window.h>
11
12#include <GLFW/glfw3.h>
13#include <backends/imgui_impl_glfw.h>
14
15#ifdef FINALITY_INCLUDE_VULKAN
16#include <backends/imgui_impl_vulkan.h>
17#endif
18#include <Core/Application.h>
19#include <Core/GLFWWindowImpl.h>
20
21namespace FINALITY
22{
23 inline void ImGuiImplGLFW(RendererAPI api, bool installCallbacks)
24 {
25 GLFWWindowImpl* wImpl = static_cast<GLFWWindowImpl*>(&Application::Get().GetWindow());
26 GLFWwindow* window = wImpl->GetGLFWwindow();
27
28 switch (api)
29 {
31 {
32#ifdef FINALITY_INCLUDE_VULKAN
33 ImGui_ImplGlfw_InitForVulkan(window, installCallbacks);
34#endif
35 break;
36 }
37 default:
38 {
39 assert(0);
40 break;
41 }
42 }
43 }
44}
Coordinates the engine application lifetime.
static Application & Get()
Definition Application.h:46
GLFWwindow * GetGLFWwindow() const
void ImGuiImplGLFW(RendererAPI api, bool installCallbacks)
Definition ImGUIImpl.h:23