Use GLSL 3.30 shaders

We currently ask for anything above 3.2 GL contexts, but we're still
using GLSL 1.50 shaders all over the place. If a GL driver supports GL
3.2+ and GLSL 1.50 only then we'd be in trouble, but the chances of that
happening are really small.
This commit is contained in:
Emmanuele Bassi 2019-03-27 15:51:34 +00:00
parent d9a382d689
commit bfcd062e8e
3 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
#version 150
#version 330
in vec2 vUv;
@ -7,5 +7,5 @@ out vec4 vertexColor;
uniform sampler2D map;
void main() {
vertexColor = texture2D (map, vUv);
vertexColor = texture (map, vUv);
}

View File

@ -1,4 +1,4 @@
#version 150
#version 330
in vec2 position;
in vec2 uv;

View File

@ -652,7 +652,7 @@ gtk_gears_render (GtkGLArea *area,
}
static const char vertex_shader_gl[] =
"#version 150\n"
"#version 330\n"
"\n"
"in vec3 position;\n"
"in vec3 normal;\n"
@ -682,13 +682,15 @@ static const char vertex_shader_gl[] =
"}";
static const char fragment_shader_gl[] =
"#version 150\n"
"#version 330\n"
"\n"
"smooth in vec4 Color;\n"
"\n"
"out vec4 vertexColor;\n"
"\n"
"void main(void)\n"
"{\n"
" gl_FragColor = Color;\n"
" vertexColor = Color;\n"
"}";
static const char vertex_shader_gles[] =