Ported glsl to version 110 (GL 2.0)

This commit is contained in:
David Salvisberg 2015-07-15 19:21:52 +02:00
parent 9e9c000dfd
commit 440972ddfa
1 changed files with 10 additions and 11 deletions

View File

@ -193,13 +193,13 @@ void ImGui_ImplSdl_CreateFontsTexture()
bool ImGui_ImplSdl_CreateDeviceObjects() bool ImGui_ImplSdl_CreateDeviceObjects()
{ {
const GLchar *vertex_shader = const GLchar *vertex_shader =
"#version 130\n" "#version 110\n"
"uniform mat4 ProjMtx;\n" "uniform mat4 ProjMtx;\n"
"in vec2 Position;\n" "attribute vec2 Position;\n"
"in vec2 UV;\n" "attribute vec2 UV;\n"
"in vec4 Color;\n" "attribute vec4 Color;\n"
"out vec2 Frag_UV;\n" "varying vec2 Frag_UV;\n"
"out vec4 Frag_Color;\n" "varying vec4 Frag_Color;\n"
"void main()\n" "void main()\n"
"{\n" "{\n"
" Frag_UV = UV;\n" " Frag_UV = UV;\n"
@ -208,14 +208,13 @@ bool ImGui_ImplSdl_CreateDeviceObjects()
"}\n"; "}\n";
const GLchar* fragment_shader = const GLchar* fragment_shader =
"#version 130\n" "#version 110\n"
"uniform sampler2D Texture;\n" "uniform sampler2D Texture;\n"
"in vec2 Frag_UV;\n" "varying vec2 Frag_UV;\n"
"in vec4 Frag_Color;\n" "varying vec4 Frag_Color;\n"
"out vec4 Out_Color;\n"
"void main()\n" "void main()\n"
"{\n" "{\n"
" Out_Color = Frag_Color * texture( Texture, Frag_UV.st);\n" " gl_FragColor = Frag_Color * texture2D(Texture, Frag_UV.st);\n"
"}\n"; "}\n";
g_ShaderHandle = gl.CreateProgram(); g_ShaderHandle = gl.CreateProgram();