Skip to content

Commit

Permalink
Examples: Renamed applications to emphasis on use of GLFW as a platfo…
Browse files Browse the repository at this point in the history
…rm framework + minor local tweaks
  • Loading branch information
ocornut committed Mar 20, 2018
1 parent 70d5005 commit 74b7dce
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/opengl2_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main(int, char**)
glfwSetErrorCallback(glfw_error_callback);
if (!glfwInit())
return 1;
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui OpenGL2 example", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL2 example", NULL, NULL);
glfwMakeContextCurrent(window);
glfwSwapInterval(1); // Enable vsync

Expand Down
2 changes: 1 addition & 1 deletion examples/opengl3_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(int, char**)
#if __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui OpenGL3 example", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui GLFW+OpenGL3 example", NULL, NULL);
glfwMakeContextCurrent(window);
glfwSwapInterval(1); // Enable vsync
gl3wInit();
Expand Down
6 changes: 3 additions & 3 deletions examples/sdl_opengl2_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();

Expand Down
6 changes: 3 additions & 3 deletions examples/sdl_opengl3_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,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+OpenGL3 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+OpenGL3 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
gl3wInit();

Expand Down Expand Up @@ -129,7 +129,7 @@ int main(int, char**)
ImGui_ImplSdlGL3_Shutdown();
ImGui::DestroyContext();

SDL_GL_DeleteContext(glcontext);
SDL_GL_DeleteContext(gl_context);
SDL_DestroyWindow(window);
SDL_Quit();

Expand Down
2 changes: 1 addition & 1 deletion examples/vulkan_example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ int main(int, char**)
return 1;

glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui Vulkan example", NULL, NULL);
GLFWwindow* window = glfwCreateWindow(1280, 720, "ImGui GLFW+Vulkan example", NULL, NULL);

// Setup Vulkan
if (!glfwVulkanSupported())
Expand Down

0 comments on commit 74b7dce

Please sign in to comment.