From df699b75b5cfd0598bdc0135307e5ceab84e6283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 28 Jul 2014 23:04:12 +0200 Subject: [PATCH] TextureTools: properly create compatibility shader. --- src/Magnum/TextureTools/DistanceField.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Magnum/TextureTools/DistanceField.cpp b/src/Magnum/TextureTools/DistanceField.cpp index 2542977f7..42aadc390 100644 --- a/src/Magnum/TextureTools/DistanceField.cpp +++ b/src/Magnum/TextureTools/DistanceField.cpp @@ -36,6 +36,7 @@ #include "Magnum/Mesh.h" #include "Magnum/Shader.h" #include "Magnum/Texture.h" +#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h" namespace Magnum { namespace TextureTools { @@ -84,14 +85,12 @@ DistanceFieldShader::DistanceFieldShader(): radiusUniform(0), scalingUniform(1) const Version v = Context::current()->supportedVersion({Version::GLES300, Version::GLES200}); #endif - Shader vert(v, Shader::Type::Vertex); - Shader frag(v, Shader::Type::Fragment); + Shader vert = Shaders::Implementation::createCompatibilityShader(v, Shader::Type::Vertex); + Shader frag = Shaders::Implementation::createCompatibilityShader(v, Shader::Type::Fragment); - vert.addSource(rs.get("compatibility.glsl")) - .addSource(rs.get("FullScreenTriangle.glsl")) + vert.addSource(rs.get("FullScreenTriangle.glsl")) .addSource(rs.get("DistanceFieldShader.vert")); - frag.addSource(rs.get("compatibility.glsl")) - .addSource(rs.get("DistanceFieldShader.frag")); + frag.addSource(rs.get("DistanceFieldShader.frag")); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag}));