Browse Source

Try to not use MAGNUM_TARGET_GLES3.

It's confusing and should be removed (what if we have ES4?).
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
2424d47567
  1. 4
      src/Magnum/AbstractTexture.cpp
  2. 4
      src/Magnum/Test/MeshGLTest.cpp
  3. 6
      src/Magnum/Text/DistanceFieldGlyphCache.cpp
  4. 2
      src/Magnum/TextureFormat.h

4
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:

4
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

6
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

2
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}

Loading…
Cancel
Save