mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Merge branch 'context'
# Conflicts: # examples/allegro5_example/main.cpp # examples/directx10_example/main.cpp # examples/directx11_example/main.cpp # examples/directx9_example/main.cpp # examples/marmalade_example/main.cpp # examples/opengl2_example/main.cpp # examples/opengl3_example/main.cpp # examples/sdl_opengl2_example/main.cpp # examples/sdl_opengl3_example/main.cpp # examples/vulkan_example/main.cpp
This commit is contained in:
@ -250,7 +250,6 @@ bool ImGui_ImplSdlGL2_Init(SDL_Window* window)
|
||||
void ImGui_ImplSdlGL2_Shutdown()
|
||||
{
|
||||
ImGui_ImplSdlGL2_InvalidateDeviceObjects();
|
||||
ImGui::Shutdown();
|
||||
}
|
||||
|
||||
void ImGui_ImplSdlGL2_NewFrame(SDL_Window *window)
|
||||
|
@ -34,6 +34,7 @@ int main(int, char**)
|
||||
SDL_GL_SetSwapInterval(1); // Enable vsync
|
||||
|
||||
// Setup ImGui binding
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
ImGui_ImplSdlGL2_Init(window);
|
||||
//io.NavFlags |= ImGuiNavFlags_EnableKeyboard; // Enable Keyboard Controls
|
||||
@ -126,6 +127,8 @@ int main(int, char**)
|
||||
|
||||
// Cleanup
|
||||
ImGui_ImplSdlGL2_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
||||
SDL_GL_DeleteContext(glcontext);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
|
Reference in New Issue
Block a user