Browse Source

Actually make use of EXT_texture_storage on ES2.

Currently it was ignored when deciding about *Texture::setStorage()
implementation.
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
a88155a198
  1. 11
      src/Magnum/Implementation/TextureState.cpp

11
src/Magnum/Implementation/TextureState.cpp

@ -114,13 +114,16 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
#endif #endif
/* Texture storage implementation */ /* Texture storage implementation */
#ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::texture_storage>()) if(context.isExtensionSupported<Extensions::GL::ARB::texture_storage>())
#elif defined(MAGNUM_TARGET_GLES2)
if(context.isExtensionSupported<Extensions::GL::EXT::texture_storage>())
#endif #endif
{ {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extensions.push_back(Extensions::GL::ARB::texture_storage::string()); extensions.push_back(Extensions::GL::ARB::texture_storage::string());
#elif defined(MAGNUM_TARGET_GLES2)
extensions.push_back(Extensions::GL::EXT::texture_storage::string());
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -138,12 +141,8 @@ TextureState::TextureState(Context& context, std::vector<std::string>& extension
storage3DImplementation = &AbstractTexture::storageImplementationDefault; storage3DImplementation = &AbstractTexture::storageImplementationDefault;
} }
} }
#endif
#ifndef MAGNUM_TARGET_GLES3 #ifndef MAGNUM_TARGET_GLES3
#ifndef MAGNUM_TARGET_GLES else {
else
#endif
{
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
storage1DImplementation = &AbstractTexture::storageImplementationFallback; storage1DImplementation = &AbstractTexture::storageImplementationFallback;
#endif #endif

Loading…
Cancel
Save