3#include <backends/imgui_impl_opengl3.h>
4#include <backends/imgui_impl_sdl3.h>
12 ImGui::CreateContext();
14 ImGuiIO& io = ImGui::GetIO(); (void)io;
16 io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
17 io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
18 io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
21 ImGui::StyleColorsDark();
23 ImGuiStyle& style = ImGui::GetStyle();
24 if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) {
25 style.WindowRounding = 0.0f;
26 style.Colors[ImGuiCol_WindowBg].w = 1.0f;
31 const bool success = ImGui_ImplOpenGL3_Init(
"#version 460");
46 ImGui_ImplOpenGL3_Shutdown();
47 ImGui_ImplSDL3_Shutdown();
48 ImGui::DestroyContext();
54 const ImGuiIO& io = ImGui::GetIO();
57 event.m_Handled =
true;
60 event.m_Handled =
true;
67 ImGui_ImplOpenGL3_NewFrame();
68 ImGui_ImplSDL3_NewFrame();
76 ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
78 const ImGuiIO& io = ImGui::GetIO();
81 if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
83 SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow();
84 const SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext();
85 ImGui::UpdatePlatformWindows();
86 ImGui::RenderPlatformWindowsDefault();
87 SDL_GL_MakeCurrent(backup_current_window, backup_current_context);
#define CORI_CORE_DEBUG_TAGGED(...)
#define CORI_CORE_ASSERT(x,...)
#define CORI_CORE_INFO_TAGGED(...)
#define CORI_PROFILE_FUNCTION()
static Window & GetWindow()
Getter for the main Window.
An abstract class that is ment to be used as a template for defining events.
bool IsInCategory(const EventCategory category) const
Checks if the Event is in specific category.
void OnEvent(Event &event) override
This is the method to handle all the event at.
void OnAttach() override
Method that runs when the layer gets attached to the LayerStack.
void OnDetach() override
Method that runs when the layer gets detached to the LayerStack.
Core systems of the engine are here.