From 05e0c8dcaafdc5b7e8575a09169f37ac1a7a5ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Aug 2014 23:11:54 +0200 Subject: [PATCH] Disable TextureFormat::RGB10 for ES3. It was defined in OES_required_internalformat which I don't want to support in ES3+. --- src/Magnum/AbstractTexture.cpp | 4 ++++ src/Magnum/TextureFormat.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index f55478ba9..2f5850cdf 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -455,7 +455,9 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in case TextureFormat::RGB5: #endif case TextureFormat::RGB565: + #ifndef MAGNUM_TARGET_GLES3 case TextureFormat::RGB10: + #endif #ifndef MAGNUM_TARGET_GLES case TextureFormat::RGB12: #endif @@ -698,7 +700,9 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern case TextureFormat::RGB565: return ColorType::UnsignedShort565; + #ifndef MAGNUM_TARGET_GLES3 case TextureFormat::RGB10: + #endif case TextureFormat::RGB10A2: #ifndef MAGNUM_TARGET_GLES2 case TextureFormat::RGB10A2UI: diff --git a/src/Magnum/TextureFormat.h b/src/Magnum/TextureFormat.h index a4f08a97d..343bf0823 100644 --- a/src/Magnum/TextureFormat.h +++ b/src/Magnum/TextureFormat.h @@ -540,16 +540,20 @@ enum class TextureFormat: GLenum { */ RGB565 = GL_RGB565, + #ifndef MAGNUM_TARGET_GLES3 /** * RGB, each component normalized unsigned 10bit. * @requires_es_extension %Extension @es_extension{OES,required_internalformat} - * and @es_extension{EXT,texture_type_2_10_10_10_REV} + * and @es_extension{EXT,texture_type_2_10_10_10_REV}. Included for + * compatibility reasons only, use @ref Magnum::TextureFormat::RGB10A2 "TextureFormat::RGB10A2" + * in OpenGL ES 3.0 instead. */ #ifndef MAGNUM_TARGET_GLES RGB10 = GL_RGB10, #else RGB10 = GL_RGB10_EXT, #endif + #endif #ifndef MAGNUM_TARGET_GLES /**