From be09303e2813a45f06fc1db78f0514681944cc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 25 May 2015 23:42:28 +0200 Subject: [PATCH] Removed deprecated Texture::Target enum. Use dedicated Texture, TextureArray, RectangleTexture, MultisampleTexture classes instead. --- src/Magnum/AbstractTexture.h | 35 ------------------------ src/Magnum/Texture.h | 53 ------------------------------------ 2 files changed, 88 deletions(-) diff --git a/src/Magnum/AbstractTexture.h b/src/Magnum/AbstractTexture.h index 5d3d8fc9f..e80476d45 100644 --- a/src/Magnum/AbstractTexture.h +++ b/src/Magnum/AbstractTexture.h @@ -35,10 +35,6 @@ #include "Magnum/DimensionTraits.h" #include "Magnum/Sampler.h" -#ifdef MAGNUM_BUILD_DEPRECATED -#include -#endif - namespace Magnum { namespace Implementation { @@ -572,12 +568,6 @@ class MAGNUM_EXPORT AbstractTexture: public AbstractObject { #ifndef DOXYGEN_GENERATING_OUTPUT #ifndef MAGNUM_TARGET_GLES template<> struct MAGNUM_EXPORT AbstractTexture::DataHelper<1> { - #ifdef MAGNUM_BUILD_DEPRECATED - enum class Target: GLenum { - Texture1D = GL_TEXTURE_1D - }; - #endif - static Math::Vector<1, GLint> imageSize(AbstractTexture& texture, GLint level); static void setWrapping(AbstractTexture& texture, const Array1D& wrapping); @@ -594,17 +584,6 @@ template<> struct MAGNUM_EXPORT AbstractTexture::DataHelper<1> { }; #endif template<> struct MAGNUM_EXPORT AbstractTexture::DataHelper<2> { - #ifdef MAGNUM_BUILD_DEPRECATED - enum class Target: GLenum { - Texture2D = GL_TEXTURE_2D, - #ifndef MAGNUM_TARGET_GLES - Texture2DMultisample = GL_TEXTURE_2D_MULTISAMPLE, - Texture1DArray = GL_TEXTURE_1D_ARRAY, - Rectangle = GL_TEXTURE_RECTANGLE - #endif - }; - #endif - #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) static Vector2i imageSize(AbstractTexture& texture, GLint level); #endif @@ -637,20 +616,6 @@ template<> struct MAGNUM_EXPORT AbstractTexture::DataHelper<2> { }; template<> struct MAGNUM_EXPORT AbstractTexture::DataHelper<3> { #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - #ifdef MAGNUM_BUILD_DEPRECATED - enum class Target: GLenum { - #ifndef MAGNUM_TARGET_GLES2 - Texture3D = GL_TEXTURE_3D, - Texture2DArray = GL_TEXTURE_2D_ARRAY, - #ifndef MAGNUM_TARGET_GLES - Texture2DMultisampleArray = GL_TEXTURE_2D_MULTISAMPLE_ARRAY - #endif - #else - Texture3D = GL_TEXTURE_3D_OES - #endif - }; - #endif - #ifndef MAGNUM_TARGET_GLES2 static Vector3i imageSize(AbstractTexture& texture, GLint level); #endif diff --git a/src/Magnum/Texture.h b/src/Magnum/Texture.h index 5ba84f746..f2b1ded3c 100644 --- a/src/Magnum/Texture.h +++ b/src/Magnum/Texture.h @@ -107,44 +107,6 @@ template class Texture: public AbstractTexture { public: static const UnsignedInt Dimensions = dimensions; /**< @brief Texture dimension count */ - #ifdef MAGNUM_BUILD_DEPRECATED - /** - * @brief Texture target - * - * @deprecated Use dedicated classes instead, see documentation of - * particular enum value for more information. - */ - #ifdef DOXYGEN_GENERATING_OUTPUT - enum class Target: GLenum { - /** @deprecated Used implicitly in @ref Texture1D class. */ - Texture1D = GL_TEXTURE_1D, - - /** @deprecated Used implicitly in @ref Texture2D class. */ - Texture2D = GL_TEXTURE_2D, - - /** @deprecated Used implicitly in @ref Texture3D class. */ - Texture3D = GL_TEXTURE_3D, - - /** @deprecated Use @ref Texture1DArray class instead. */ - Texture1DArray = GL_TEXTURE_1D_ARRAY, - - /** @deprecated Use @ref Texture2DArray class instead. */ - Texture2DArray = GL_TEXTURE_2D_ARRAY, - - /** @deprecated Use @ref MultisampleTexture2D class instead. */ - Texture2DMultisample = GL_TEXTURE_2D_MULTISAMPLE, - - /** @deprecated Use @ref MultisampleTexture2DArray class instead. */ - Texture2DMultisampleArray = GL_TEXTURE_2D_MULTISAMPLE_ARRAY, - - /** @deprecated Use @ref RectangleTexture class instead. */ - Rectangle = GL_TEXTURE_RECTANGLE - }; - #else - typedef typename DataHelper::Target Target; - #endif - #endif - /** * @brief Max supported texture size * @@ -187,21 +149,6 @@ template class Texture: public AbstractTexture { */ explicit Texture(): AbstractTexture(Implementation::textureTarget()) {} - #ifdef MAGNUM_BUILD_DEPRECATED - /** @copybrief Texture() - * @deprecated Use the parameterless @ref Texture() "Texture()" - * constructor or dedicated @ref TextureArray, - * @ref MultisampleTexture, @ref RectangleTexture classes instead. - */ - explicit CORRADE_DEPRECATED("use the parameterless constructor or dedicated TextureArray, MultisampleTexture, RectangleTexture classes instead") Texture(Target target): AbstractTexture(GLenum(target)) {} - - /** @brief Texture target - * @deprecated Use dedicated @ref Texture, @ref TextureArray, - * @ref MultisampleTexture, @ref RectangleTexture classes instead. - */ - constexpr CORRADE_DEPRECATED("use dedicated Texture, TextureArray, MultisampleTexture, RectangleTexture classes instead") Target target() const { return static_cast(_target); } - #endif - #ifndef MAGNUM_TARGET_GLES2 /** * @brief Set base mip level