From e0645d30dfb1564b05b0a5c71af57fa89b28d627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 2 Jan 2016 19:39:32 +0100 Subject: [PATCH] TgaImporter: fix compilation on ES2. --- src/MagnumPlugins/TgaImporter/TgaImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp index bcddbaba0..e052eceeb 100644 --- a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp +++ b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp @@ -100,7 +100,7 @@ std::optional TgaImporter::doImage2D(UnsignedInt) { /* Grayscale */ } else if(header.imageType == 3) { #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) - format = Context::current() && Context::current().isExtensionSupported() ? + format = Context::hasCurrent() && Context::current().isExtensionSupported() ? PixelFormat::Red : PixelFormat::Luminance; #elif !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) format = PixelFormat::Red;