From 440972ddfa579c797656c5d15fda4158b6e4280c Mon Sep 17 00:00:00 2001 From: David Salvisberg Date: Wed, 15 Jul 2015 19:21:52 +0200 Subject: [PATCH] Ported glsl to version 110 (GL 2.0) --- src/imgui/imgui_impl_sdl.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/imgui/imgui_impl_sdl.cpp b/src/imgui/imgui_impl_sdl.cpp index 96c0c12..5119e93 100644 --- a/src/imgui/imgui_impl_sdl.cpp +++ b/src/imgui/imgui_impl_sdl.cpp @@ -193,13 +193,13 @@ void ImGui_ImplSdl_CreateFontsTexture() bool ImGui_ImplSdl_CreateDeviceObjects() { const GLchar *vertex_shader = - "#version 130\n" + "#version 110\n" "uniform mat4 ProjMtx;\n" - "in vec2 Position;\n" - "in vec2 UV;\n" - "in vec4 Color;\n" - "out vec2 Frag_UV;\n" - "out vec4 Frag_Color;\n" + "attribute vec2 Position;\n" + "attribute vec2 UV;\n" + "attribute vec4 Color;\n" + "varying vec2 Frag_UV;\n" + "varying vec4 Frag_Color;\n" "void main()\n" "{\n" " Frag_UV = UV;\n" @@ -208,14 +208,13 @@ bool ImGui_ImplSdl_CreateDeviceObjects() "}\n"; const GLchar* fragment_shader = - "#version 130\n" + "#version 110\n" "uniform sampler2D Texture;\n" - "in vec2 Frag_UV;\n" - "in vec4 Frag_Color;\n" - "out vec4 Out_Color;\n" + "varying vec2 Frag_UV;\n" + "varying vec4 Frag_Color;\n" "void main()\n" "{\n" - " Out_Color = Frag_Color * texture( Texture, Frag_UV.st);\n" + " gl_FragColor = Frag_Color * texture2D(Texture, Frag_UV.st);\n" "}\n"; g_ShaderHandle = gl.CreateProgram();