From 51df5874a631a15fc2fa1f8cab129fcdcd4e4577 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 11 Jan 2015 18:03:40 +0000 Subject: [PATCH] Examples' Says "OpenGL2" vs "OpenGL3" in title bar. --- examples/opengl3_example/main.cpp | 4 +--- examples/opengl_example/main.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index c8fe320de..9f86ebee4 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -152,11 +152,9 @@ static void glfw_char_callback(GLFWwindow* window, unsigned int c) ImGui::GetIO().AddInputCharacter((unsigned short)c); } -// OpenGL code based on http://open.gl tutorials void InitGL() { glfwSetErrorCallback(glfw_error_callback); - if (!glfwInit()) exit(1); @@ -164,7 +162,7 @@ void InitGL() glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - window = glfwCreateWindow(1280, 720, "ImGui OpenGL example", NULL, NULL); + window = glfwCreateWindow(1280, 720, "ImGui OpenGL3 example", NULL, NULL); glfwMakeContextCurrent(window); glfwSetKeyCallback(window, glfw_key_callback); glfwSetMouseButtonCallback(window, glfw_mouse_button_callback); diff --git a/examples/opengl_example/main.cpp b/examples/opengl_example/main.cpp index cc3fae34a..018616fdc 100644 --- a/examples/opengl_example/main.cpp +++ b/examples/opengl_example/main.cpp @@ -130,15 +130,13 @@ static void glfw_char_callback(GLFWwindow* window, unsigned int c) ImGui::GetIO().AddInputCharacter((unsigned short)c); } -// OpenGL code based on http://open.gl tutorials void InitGL() { glfwSetErrorCallback(glfw_error_callback); - if (!glfwInit()) exit(1); - window = glfwCreateWindow(1280, 720, "ImGui OpenGL example", NULL, NULL); + window = glfwCreateWindow(1280, 720, "ImGui OpenGL2 example", NULL, NULL); glfwMakeContextCurrent(window); glfwSetKeyCallback(window, glfw_key_callback); glfwSetMouseButtonCallback(window, glfw_mouse_button_callback);