From 74b7dce3945d63ff05dbc48c4d77f3111afd71b8 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 20 Mar 2018 15:57:54 +0100 Subject: [PATCH] Examples: Renamed applications to emphasis on use of GLFW as a platform framework + minor local tweaks --- examples/opengl2_example/main.cpp | 2 +- examples/opengl3_example/main.cpp | 2 +- examples/sdl_opengl2_example/main.cpp | 6 +++--- examples/sdl_opengl3_example/main.cpp | 6 +++--- examples/vulkan_example/main.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp index 6728347c..8ee95cad 100644 --- a/examples/opengl2_example/main.cpp +++ b/examples/opengl2_example/main.cpp @@ -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 diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index ce2f1156..06a9231a 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -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(); diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp index 2dfdd72b..79765037 100644 --- a/examples/sdl_opengl2_example/main.cpp +++ b/examples/sdl_opengl2_example/main.cpp @@ -29,8 +29,8 @@ int main(int, char**) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_DisplayMode current; SDL_GetCurrentDisplayMode(0, ¤t); - 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(); diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp index 4426fcde..1cac6b16 100644 --- a/examples/sdl_opengl3_example/main.cpp +++ b/examples/sdl_opengl3_example/main.cpp @@ -28,8 +28,8 @@ int main(int, char**) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_DisplayMode current; SDL_GetCurrentDisplayMode(0, ¤t); - 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(); @@ -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(); diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp index 40d0a233..a708b6db 100644 --- a/examples/vulkan_example/main.cpp +++ b/examples/vulkan_example/main.cpp @@ -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())