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:
omar
2018-01-21 20:09:30 +01:00
parent 5e2aa6185c
commit d3e826c247
21 changed files with 31 additions and 15 deletions

View File

@ -356,7 +356,6 @@ bool ImGui_ImplSdlGL3_Init(SDL_Window* window)
void ImGui_ImplSdlGL3_Shutdown()
{
ImGui_ImplSdlGL3_InvalidateDeviceObjects();
ImGui::Shutdown();
}
void ImGui_ImplSdlGL3_NewFrame(SDL_Window* window)

View File

@ -33,6 +33,7 @@ int main(int, char**)
gl3wInit();
// Setup ImGui binding
ImGui::CreateContext();
ImGui_ImplSdlGL3_Init(window);
// Setup style
@ -115,6 +116,8 @@ int main(int, char**)
// Cleanup
ImGui_ImplSdlGL3_Shutdown();
ImGui::DestroyContext();
SDL_GL_DeleteContext(glcontext);
SDL_DestroyWindow(window);
SDL_Quit();