From ddcd679f8563b9a7d5c66f00f5a46926ef555651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 25 May 2015 23:36:33 +0200 Subject: [PATCH] Shaders: removed deprecated texture unit enums. Use dedicated texture setters instead. --- src/Magnum/Shaders/AbstractVector.h | 16 ++-------------- src/Magnum/Shaders/Flat.h | 11 ----------- src/Magnum/Shaders/Phong.h | 25 ------------------------- 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/src/Magnum/Shaders/AbstractVector.h b/src/Magnum/Shaders/AbstractVector.h index 02925ee7d..d643f2148 100644 --- a/src/Magnum/Shaders/AbstractVector.h +++ b/src/Magnum/Shaders/AbstractVector.h @@ -56,16 +56,6 @@ template class AbstractVector: public AbstractShaderProg */ typedef typename Generic::TextureCoordinates TextureCoordinates; - #ifdef MAGNUM_BUILD_DEPRECATED - enum: Int { - /** - * Vector texture binding unit - * @deprecated Use @ref setVectorTexture() instead. - */ - VectorTextureLayer = 15 - }; - #endif - /** * @brief Set vector texture * @return Reference to self (for method chaining) @@ -73,12 +63,10 @@ template class AbstractVector: public AbstractShaderProg AbstractVector& setVectorTexture(Texture2D& texture); protected: + enum: Int { VectorTextureLayer = 15 }; + explicit AbstractVector() = default; ~AbstractVector() = default; - - #ifndef MAGNUM_BUILD_DEPRECATED - enum: Int { VectorTextureLayer = 15 }; - #endif }; /** @brief Base for two-dimensional text shaders */ diff --git a/src/Magnum/Shaders/Flat.h b/src/Magnum/Shaders/Flat.h index a6d71011e..0e306dbe9 100644 --- a/src/Magnum/Shaders/Flat.h +++ b/src/Magnum/Shaders/Flat.h @@ -142,17 +142,6 @@ template class MAGNUM_SHADERS_EXPORT Flat: public Abstra */ typedef typename Generic::TextureCoordinates TextureCoordinates; - #ifdef MAGNUM_BUILD_DEPRECATED - enum: Int { - /** - * Color texture binding unit. Used only if @ref Flag::Textured is - * set. - * @deprecated use @ref setTexture() instead. - */ - TextureLayer = 0 - }; - #endif - #ifdef DOXYGEN_GENERATING_OUTPUT /** * @brief Flag diff --git a/src/Magnum/Shaders/Phong.h b/src/Magnum/Shaders/Phong.h index 13f7c9dfd..26496b487 100644 --- a/src/Magnum/Shaders/Phong.h +++ b/src/Magnum/Shaders/Phong.h @@ -153,31 +153,6 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram { */ typedef Generic3D::TextureCoordinates TextureCoordinates; - #ifdef MAGNUM_BUILD_DEPRECATED - enum: Int { - /** - * Ambient texture binding unit. Used only if - * @ref Flag::AmbientTexture is set. - * @deprecated Use @ref setAmbientTexture() instead. - */ - AmbientTextureLayer = 0, - - /** - * Diffuse texture binding unit. Used only if - * @ref Flag::DiffuseTexture is set. - * @deprecated Use @ref setDiffuseTexture() instead. - */ - DiffuseTextureLayer = 1, - - /** - * Specular texture binding unit. Used only if - * @ref Flag::SpecularTexture is set. - * @deprecated Use @ref setSpecularTexture() instead. - */ - SpecularTextureLayer = 2 - }; - #endif - /** * @brief Flag *