6#include <imgui_impl_sdl2.h>
7#include <imgui_impl_opengl3.h>
31 ImGui::DockSpaceOverViewport(0, ImGui::GetMainViewport(),
32 ImGuiDockNodeFlags_NoDockingOverCentralNode |
33 ImGuiDockNodeFlags_PassthruCentralNode);
35 if (ImGui::GetFrameCount() == 1) {
37 ImGui::SetWindowFocus(
nullptr);
41 const ImGuiIO& io = ImGui::GetIO();
48 if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) {
49 SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow();
50 SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext();
51 ImGui::UpdatePlatformWindows();
52 ImGui::RenderPlatformWindowsDefault();
53 SDL_GL_MakeCurrent(backup_current_window, backup_current_context);
56 if (ImGui::GetFrameCount() == 1) {
ImGuiLayer(ImGuiManager &manager)
Interface for display layers.
Coverage
Describes how much of the screen is currently covered by a particular layer.
ZIndex
Determines stacking order of layers: layers with higher Z-indices are closer to the viewer.
A frame buffer where pixels can be written to.
static uint32_t getMainWindowId()
void ImGui_ImplOpenGL3_NewFrame()
void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData *draw_data)
void ImGui_ImplSDL2_NewFrame()
This file implemented 3 utility functions: