From 995e503ca46eae5830e9ed28937b20e138f7e065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 6 Jul 2015 14:55:38 +0200 Subject: [PATCH] Properly check for compute shader availability on ES3. --- src/Magnum/Shader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Magnum/Shader.cpp b/src/Magnum/Shader.cpp index 67eb89da7..25ea69547 100644 --- a/src/Magnum/Shader.cpp +++ b/src/Magnum/Shader.cpp @@ -104,6 +104,13 @@ bool isTypeSupported(const Shader::Type type) { return true; } +#elif !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) +bool isTypeSupported(const Shader::Type type) { + if(type == Shader::Type::Compute && !Context::current()->isVersionSupported(Version::GLES310)) + return false; + + return true; +} #else constexpr bool isTypeSupported(Shader::Type) { return true; } #endif