Browse Source

Disable TextureFormat::RGB10 for ES3.

It was defined in OES_required_internalformat which I don't want to
support in ES3+.
pull/68/head
Vladimír Vondruš 12 years ago
parent
commit
05e0c8dcaa
  1. 4
      src/Magnum/AbstractTexture.cpp
  2. 6
      src/Magnum/TextureFormat.h

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

6
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
/**

Loading…
Cancel
Save