From c2ceda73d1670d5cbe4daefb529ec58dcdbcb29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 27 Sep 2015 00:37:15 +0200 Subject: [PATCH] Fix compilation of MeshGLTest shader. Precision qualifiers are not available in GLSL 1.20 and non-NVidia cards are complaining. --- src/Magnum/Test/MeshGLTest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Test/MeshGLTest.cpp b/src/Magnum/Test/MeshGLTest.cpp index d166ec99b..784b85124 100644 --- a/src/Magnum/Test/MeshGLTest.cpp +++ b/src/Magnum/Test/MeshGLTest.cpp @@ -1158,7 +1158,10 @@ MultipleShader::MultipleShader() { " valueInterpolated = position + vec4(normal, 0.0) + vec4(textureCoordinates, 0.0, 0.0);\n" " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n" "}\n"); - frag.addSource("varying mediump vec4 valueInterpolated;\n" + frag.addSource("#if !defined(GL_ES) && __VERSION__ == 120\n" + "#define mediump\n" + "#endif\n" + "varying mediump vec4 valueInterpolated;\n" "void main() { gl_FragColor = valueInterpolated; }\n"); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag}));