From 0b4729a3e6cc225a49a4c3bb6297e7eacb7a85ce Mon Sep 17 00:00:00 2001 From: "A. Tombs" Date: Tue, 20 Sep 2016 16:29:06 +0100 Subject: [PATCH] Add version directives to GLSL shaders Although not technically required, I believe it is best practice for shaders to specify which version of the GLSL spec they conform to. To quote the spec: > Shaders should declare the version of the language they are written to. NB: I have presumed the version is 1.10, but it should be corrected if a later version was intended. --- tests/sharing.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sharing.c b/tests/sharing.c index 40254cf61..bed87c292 100644 --- a/tests/sharing.c +++ b/tests/sharing.c @@ -36,6 +36,7 @@ #include "linmath.h" static const char* vertex_shader_text = +"#version 110\n" "uniform mat4 MVP;\n" "attribute vec2 vPos;\n" "varying vec2 texcoord;\n" @@ -46,6 +47,7 @@ static const char* vertex_shader_text = "}\n"; static const char* fragment_shader_text = +"#version 110\n" "uniform sampler2D texture;\n" "uniform vec3 color;\n" "varying vec2 texcoord;\n"