Examples: Renamed applications to emphasis on use of GLFW as a platform framework + minor local tweaks

This commit is contained in:
omar
2018-03-20 15:57:54 +01:00
parent 70d500502a
commit 74b7dce394
5 changed files with 9 additions and 9 deletions

View File

@ -29,8 +29,8 @@ int main(int, char**)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
SDL_DisplayMode current;
SDL_GetCurrentDisplayMode(0, &current);
SDL_Window *window = SDL_CreateWindow("ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
SDL_GLContext glcontext = SDL_GL_CreateContext(window);
SDL_Window* window = SDL_CreateWindow("ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
SDL_GLContext gl_context = SDL_GL_CreateContext(window);
SDL_GL_SetSwapInterval(1); // Enable vsync
// Setup ImGui binding
@ -130,7 +130,7 @@ int main(int, char**)
ImGui_ImplSdlGL2_Shutdown();
ImGui::DestroyContext();
SDL_GL_DeleteContext(glcontext);
SDL_GL_DeleteContext(gl_context);
SDL_DestroyWindow(window);
SDL_Quit();