From 61aa2cd8842dca9286ba35c7bb827903e96a28db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 25 May 2015 23:43:45 +0200 Subject: [PATCH] Removed deprecated Framebuffer::attachTexture*D() overloads. Use one of attachTexture() or attachTextureLayer() overloads instead. --- src/Magnum/Framebuffer.cpp | 21 --------------------- src/Magnum/Framebuffer.h | 34 +++------------------------------- 2 files changed, 3 insertions(+), 52 deletions(-) diff --git a/src/Magnum/Framebuffer.cpp b/src/Magnum/Framebuffer.cpp index 1ea6b7e4c..2f2d4e2f4 100644 --- a/src/Magnum/Framebuffer.cpp +++ b/src/Magnum/Framebuffer.cpp @@ -273,27 +273,6 @@ Framebuffer& Framebuffer::attachTextureLayer(Framebuffer::BufferAttachment attac } #endif -#ifdef MAGNUM_BUILD_DEPRECATED -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4996) /* deprecated warning */ -#endif -Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D& texture, Int mipLevel) { - #ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" - #endif - (this->*Context::current()->state().framebuffer->texture2DImplementation)(attachment, GLenum(texture.target()), texture.id(), mipLevel); - #ifdef __GNUC__ - #pragma GCC diagnostic pop - #endif - return *this; -} -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#endif - void Framebuffer::renderbufferImplementationDefault(BufferAttachment attachment, Renderbuffer& renderbuffer) { glFramebufferRenderbuffer(GLenum(bindInternal()), GLenum(attachment), GL_RENDERBUFFER, renderbuffer.id()); } diff --git a/src/Magnum/Framebuffer.h b/src/Magnum/Framebuffer.h index 9aa5b5c04..6bd092ac2 100644 --- a/src/Magnum/Framebuffer.h +++ b/src/Magnum/Framebuffer.h @@ -61,8 +61,8 @@ Renderbuffer depthStencil; // configure the textures and allocate texture memory... -framebuffer.attachTexture2D(Framebuffer::ColorAttachment(0), color); -framebuffer.attachTexture2D(Framebuffer::ColorAttachment(1), normal); +framebuffer.attachTexture(Framebuffer::ColorAttachment(0), color); +framebuffer.attachTexture(Framebuffer::ColorAttachment(1), normal); framebuffer.attachRenderbuffer(Framebuffer::BufferAttachment::DepthStencil, depthStencil); @endcode @@ -636,7 +636,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje * nor @extension{EXT,direct_state_access} desktop extension is * available, the framebuffer is bound before the operation (if not * already). - * @see @ref attachTexture2D(), @fn_gl2{NamedFramebufferTexture,FramebufferTexture}, + * @see @ref attachTexture(), @fn_gl2{NamedFramebufferTexture,FramebufferTexture}, * @fn_gl_extension{NamedFramebufferTexture2D,EXT,direct_state_access}, * eventually @fn_gl{BindFramebuffer} and @fn_gl2{FramebufferTexture2D,FramebufferTexture} */ @@ -701,34 +701,6 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje Framebuffer& attachTextureLayer(BufferAttachment attachment, MultisampleTexture2DArray& texture, Int layer); #endif - #ifdef MAGNUM_BUILD_DEPRECATED - #ifndef MAGNUM_TARGET_GLES - /** - * @copybrief attachTexture() - * @deprecated Use one of @ref attachTexture() overloads instead. - */ - CORRADE_DEPRECATED("use one of attachTexture() overloads instead") Framebuffer& attachTexture1D(BufferAttachment attachment, Texture1D& texture, Int level) { - return attachTexture(attachment, texture, level); - } - #endif - - /** - * @copybrief attachTexture() - * @deprecated Use one of @ref attachTexture() overloads instead. - */ - CORRADE_DEPRECATED("use one of attachTexture() overloads instead") Framebuffer& attachTexture2D(BufferAttachment attachment, Texture2D& texture, Int level); - - #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - /** - * @copybrief attachTextureLayer() - * @deprecated Use one of @ref attachTextureLayer() overloads instead. - */ - CORRADE_DEPRECATED("use one of attachTexture() overloads instead") Framebuffer& attachTexture3D(BufferAttachment attachment, Texture3D& texture, Int level, Int layer) { - return attachTextureLayer(attachment, texture, level, layer); - } - #endif - #endif - /* Overloads to remove WTF-factor from method chaining order */ #ifndef DOXYGEN_GENERATING_OUTPUT Framebuffer& setViewport(const Range2Di& rectangle) {