Browse Source

Removed deprecated Framebuffer::attachTexture*D() overloads.

Use one of attachTexture() or attachTextureLayer() overloads instead.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
61aa2cd884
  1. 21
      src/Magnum/Framebuffer.cpp
  2. 34
      src/Magnum/Framebuffer.h

21
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());
}

34
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) {

Loading…
Cancel
Save