[gtk+/wip/ebassi/gles: 8/11] tests: Add precision to the GLES shader



commit c164efe7f334cf5aab4da05c5d07d6f6fa4aec23
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Apr 23 10:23:28 2016 +0100

    tests: Add precision to the GLES shader
    
    The embedded GLES shader in testglaea needs a precision annotation,
    otherwise we'll get a warning, and the compilation will fail.

 tests/testglarea.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/tests/testglarea.c b/tests/testglarea.c
index b8e9be0..ef2bec8 100644
--- a/tests/testglarea.c
+++ b/tests/testglarea.c
@@ -88,6 +88,7 @@ static const char *vertex_shader_code_gles =
 "}";
 
 static const char *fragment_shader_code_gles =
+"precision mediump float;\n" \
 "void main() {\n" \
 "  float lerpVal = gl_FragCoord.y / 400.0;\n" \
 "  gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);\n" \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]