Merge branch 'gl3-shaders' into 'gtk-3-24'

Use GLSL 3.30 shaders

See merge request GNOME/gtk!671
This commit is contained in:
Emmanuele Bassi
2019-03-29 09:57:21 +00:00
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[] =