From 39cb56c39e662a330b278061fb5ab59813c0c911 Mon Sep 17 00:00:00 2001 From: omar Date: Sun, 7 Jan 2018 19:06:20 +0100 Subject: [PATCH] Examples: OpenGL3+GLFW: Using 3.2 context + GLSL version 150 (#1466) --- examples/opengl3_example/imgui_impl_glfw_gl3.cpp | 4 ++-- examples/opengl3_example/main.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp index a608e370b..3307d5310 100644 --- a/examples/opengl3_example/imgui_impl_glfw_gl3.cpp +++ b/examples/opengl3_example/imgui_impl_glfw_gl3.cpp @@ -217,7 +217,7 @@ bool ImGui_ImplGlfwGL3_CreateDeviceObjects() glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array); const GLchar *vertex_shader = - "#version 330\n" + "#version 150\n" "uniform mat4 ProjMtx;\n" "in vec2 Position;\n" "in vec2 UV;\n" @@ -232,7 +232,7 @@ bool ImGui_ImplGlfwGL3_CreateDeviceObjects() "}\n"; const GLchar* fragment_shader = - "#version 330\n" + "#version 150\n" "uniform sampler2D Texture;\n" "in vec2 Frag_UV;\n" "in vec4 Frag_Color;\n" diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp index 9e9a3fb6c..6beb855dc 100644 --- a/examples/opengl3_example/main.cpp +++ b/examples/opengl3_example/main.cpp @@ -21,7 +21,7 @@ int main(int, char**) if (!glfwInit()) return 1; glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); #if __APPLE__ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);