diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index 1a36d0569..a61be3f14 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -548,7 +548,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in case TextureFormat::RGB5: #endif case TextureFormat::RGB565: - #if !defined(MAGNUM_TARGET_GLES3) && !defined(MAGNUM_TARGET_WEBGL) + #if !defined(MAGNUM_TARGET_GLES) || (defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)) case TextureFormat::RGB10: #endif #ifndef MAGNUM_TARGET_GLES @@ -806,7 +806,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern return ColorType::UnsignedShort565; #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - #ifndef MAGNUM_TARGET_GLES3 + #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2) case TextureFormat::RGB10: #endif case TextureFormat::RGB10A2: diff --git a/src/Magnum/Test/MeshGLTest.cpp b/src/Magnum/Test/MeshGLTest.cpp index c785f6090..3fd915c35 100644 --- a/src/Magnum/Test/MeshGLTest.cpp +++ b/src/Magnum/Test/MeshGLTest.cpp @@ -349,7 +349,7 @@ FloatShader::FloatShader(const std::string& type, const std::string& conversion) #endif vert.addSource( - #ifndef MAGNUM_TARGET_GLES3 + #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2) "attribute mediump " + type + " value;\n" "varying mediump " + type + " valueInterpolated;\n" #else @@ -361,7 +361,7 @@ FloatShader::FloatShader(const std::string& type, const std::string& conversion) " gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n" "}\n"); - #ifndef MAGNUM_TARGET_GLES3 + #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2) frag.addSource("varying mediump " + type + " valueInterpolated;\n" "void main() { gl_FragColor = " + conversion + "; }\n"); #else diff --git a/src/Magnum/Text/DistanceFieldGlyphCache.cpp b/src/Magnum/Text/DistanceFieldGlyphCache.cpp index 896225b76..47ab788af 100644 --- a/src/Magnum/Text/DistanceFieldGlyphCache.cpp +++ b/src/Magnum/Text/DistanceFieldGlyphCache.cpp @@ -37,7 +37,7 @@ namespace Magnum { namespace Text { DistanceFieldGlyphCache::DistanceFieldGlyphCache(const Vector2i& originalSize, const Vector2i& size, const UnsignedInt radius): - #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES3) + #if !(defined(MAGNUM_TARGET_GLES) && defined(MAGNUM_TARGET_GLES2)) GlyphCache(TextureFormat::R8, originalSize, size, Vector2i(radius)), #elif !defined(MAGNUM_TARGET_WEBGL) /* Luminance is not renderable in most cases */ @@ -60,7 +60,7 @@ DistanceFieldGlyphCache::DistanceFieldGlyphCache(const Vector2i& originalSize, c } void DistanceFieldGlyphCache::setImage(const Vector2i& offset, const ImageReference2D& image) { - #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES3) + #if !(defined(MAGNUM_TARGET_GLES) && defined(MAGNUM_TARGET_GLES2)) const TextureFormat internalFormat = TextureFormat::R8; CORRADE_ASSERT(image.format() == ColorFormat::Red, "Text::DistanceFieldGlyphCache::setImage(): expected" << ColorFormat::Red << "but got" << image.format(), ); @@ -91,7 +91,7 @@ void DistanceFieldGlyphCache::setImage(const Vector2i& offset, const ImageRefere } void DistanceFieldGlyphCache::setDistanceFieldImage(const Vector2i& offset, const ImageReference2D& image) { - #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES3) + #if !(defined(MAGNUM_TARGET_GLES) && defined(MAGNUM_TARGET_GLES2)) CORRADE_ASSERT(image.format() == ColorFormat::Red, "Text::DistanceFieldGlyphCache::setDistanceFieldImage(): expected" << ColorFormat::Red << "but got" << image.format(), ); #else diff --git a/src/Magnum/TextureFormat.h b/src/Magnum/TextureFormat.h index 8f2cf65f6..1e2c5b89d 100644 --- a/src/Magnum/TextureFormat.h +++ b/src/Magnum/TextureFormat.h @@ -648,7 +648,7 @@ enum class TextureFormat: GLenum { */ RGB565 = GL_RGB565, - #if !defined(MAGNUM_TARGET_GLES3) && !defined(MAGNUM_TARGET_WEBGL) + #if !defined(MAGNUM_TARGET_GLES) || (defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)) /** * RGB, each component normalized unsigned 10bit. * @requires_es_extension Extension @es_extension{EXT,texture_type_2_10_10_10_REV}