Browse Source

TgaImporter: fix compilation on ES2.

pull/132/head
Vladimír Vondruš 10 years ago
parent
commit
e0645d30df
  1. 2
      src/MagnumPlugins/TgaImporter/TgaImporter.cpp

2
src/MagnumPlugins/TgaImporter/TgaImporter.cpp

@ -100,7 +100,7 @@ std::optional<ImageData2D> TgaImporter::doImage2D(UnsignedInt) {
/* Grayscale */
} else if(header.imageType == 3) {
#if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
format = Context::current() && Context::current().isExtensionSupported<Extensions::GL::EXT::texture_rg>() ?
format = Context::hasCurrent() && Context::current().isExtensionSupported<Extensions::GL::EXT::texture_rg>() ?
PixelFormat::Red : PixelFormat::Luminance;
#elif !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
format = PixelFormat::Red;

Loading…
Cancel
Save