mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Examples: Updated for reorganized context functions. Calling CreateContext(), DestroyContext() in example code. Removed Shutdown() from binding code. (#1565, #586, #992, #1007, #1558)
This commit is contained in:
@ -245,7 +245,6 @@ bool ImGui_ImplSdlGL2_Init(SDL_Window* window)
|
||||
void ImGui_ImplSdlGL2_Shutdown()
|
||||
{
|
||||
ImGui_ImplSdlGL2_InvalidateDeviceObjects();
|
||||
ImGui::Shutdown();
|
||||
}
|
||||
|
||||
void ImGui_ImplSdlGL2_NewFrame(SDL_Window *window)
|
||||
|
@ -33,6 +33,7 @@ int main(int, char**)
|
||||
SDL_GLContext glcontext = SDL_GL_CreateContext(window);
|
||||
|
||||
// Setup ImGui binding
|
||||
ImGui::CreateContext();
|
||||
ImGui_ImplSdlGL2_Init(window);
|
||||
|
||||
// Setup style
|
||||
@ -116,6 +117,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