// Copyright (C) 2009-2015, Panagiotis Christopoulos Charitos. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #ifndef ANKI_GR_FRAMEBUFFER_HANDLE_H #define ANKI_GR_FRAMEBUFFER_HANDLE_H #include "anki/gr/GrHandle.h" #include "anki/gr/FramebufferCommon.h" namespace anki { /// @addtogroup graphics /// @{ /// Framebuffer handle class FramebufferHandle: public GrHandle { public: using Base = GrHandle; using Initializer = FramebufferInitializer; FramebufferHandle(); ~FramebufferHandle(); /// Create a framebuffer ANKI_USE_RESULT Error create(CommandBufferHandle& commands, Initializer& attachments); /// Bind it to the state /// @param commands The command buffer /// @param invalidate If true invalidate the FB after binding it void bind(CommandBufferHandle& commands, Bool invalidate); /// Blit another framebuffer to this /// @param[in, out] commands The command buffer /// @param[in] b The sorce framebuffer /// @param[in] sourceRect The source rectangle /// @param[in] destRect The destination rectangle /// @param attachmentMask The attachments to blit /// @param linear Perform linean filtering void blit(CommandBufferHandle& commands, const FramebufferHandle& b, const Array& sourceRect, const Array& destRect, GLbitfield attachmentMask, Bool linear); }; /// @} } // end namespace anki #endif