Browse Source

Removed deprecated Texture::Target enum.

Use dedicated Texture, TextureArray, RectangleTexture,
MultisampleTexture classes instead.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
be09303e28
  1. 35
      src/Magnum/AbstractTexture.h
  2. 53
      src/Magnum/Texture.h

35
src/Magnum/AbstractTexture.h

@ -35,10 +35,6 @@
#include "Magnum/DimensionTraits.h"
#include "Magnum/Sampler.h"
#ifdef MAGNUM_BUILD_DEPRECATED
#include <Corrade/Utility/Macros.h>
#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<Sampler::Wrapping>& 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

53
src/Magnum/Texture.h

@ -107,44 +107,6 @@ template<UnsignedInt dimensions> 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<Dimensions>::Target Target;
#endif
#endif
/**
* @brief Max supported texture size
*
@ -187,21 +149,6 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
*/
explicit Texture(): AbstractTexture(Implementation::textureTarget<dimensions>()) {}
#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>(_target); }
#endif
#ifndef MAGNUM_TARGET_GLES2
/**
* @brief Set base mip level

Loading…
Cancel
Save