namespace Dali
{
-
-namespace Integration
-{
-class RenderSurface;
-}
+using Mask = Dali::FrameBuffer::Attachment::Mask;
namespace Internal
{
}
class FrameBuffer;
-typedef IntrusivePtr<FrameBuffer> FrameBufferPtr;
+using FrameBufferPtr = IntrusivePtr<FrameBuffer>;
class FrameBuffer : public BaseObject
{
static FrameBufferPtr New( uint32_t width, uint32_t height, Mask attachments );
/**
- * @brief Create a new FrameBuffer
- *
- * @param[in] renderSurface The render surface
- * @param[in] attachments The attachments comprising the format of the FrameBuffer (bit-mask)
- * @return A smart-pointer to the newly allocated Texture.
- */
- static FrameBufferPtr New( Dali::Integration::RenderSurface& renderSurface, Mask attachments );
-
- /**
* A reference counted object may only be deleted by calling Unreference()
*/
- virtual ~FrameBuffer();
+ ~FrameBuffer() override;
/**
* @brief Get the FrameBuffer render object
void AttachColorTexture( TexturePtr texture, uint32_t mipmapLevel, uint32_t layer );
/**
+ * @copydoc Dali::DevelFrameBuffer::AttachDepthTexture()
+ */
+ void AttachDepthTexture( TexturePtr texture, uint32_t mipmapLevel );
+
+ /**
+ * @copydoc Dali::DevelFrameBuffer::AttachDepthStencilTexture()
+ */
+ void AttachDepthStencilTexture( TexturePtr texture, uint32_t mipmapLevel );
+
+ /**
* @copydoc Dali::FrameBuffer::GetColorTexture()
*/
Texture* GetColorTexture(uint8_t index) const;
/**
- * @brief Sets the frame buffer size.
- * @param[in] width The width size
- * @param[in] height The height size
+ * @copydoc Dali::DevelFrameBuffer::GetDepthTexture()
*/
- void SetSize( uint32_t width, uint32_t height );
+ Texture* GetDepthTexture() const;
/**
- * @brief Mark the render surface as invalid
- *
- * The render surface is maked as invalid when it is deleted.
+ * @copydoc Dali::DevelFrameBuffer::GetDepthStencilTexture()
+ */
+ Texture* GetDepthStencilTexture() const;
+
+ /**
+ * @brief Retrieve captured buffer
*
- * @note Only for FrameBuffer backed by a render surface.
- * @return True if the FrameBuffer is backed by a render surface
+ * @return a pointer of the buffer.
+ */
+ uint8_t* GetRenderedBuffer();
+
+ /**
+ * @copydoc Dali::FrameBuffer::CaptureRenderedResult()
*/
- void MarkSurfaceAsInvalid();
+ void CaptureRenderedResult();
/**
- * @brief Sets whether to enable partial update.
- * @param[in] value whether partial update or not
+ * @brief Sets the frame buffer size.
+ * @param[in] width The width size
+ * @param[in] height The height size
*/
- void SetPartialUpdateEnabled( bool value );
+ void SetSize( uint32_t width, uint32_t height );
private: // implementation
/**
* Second stage initialization of the Texture
*/
- void Initialize( Integration::RenderSurface* renderSurface = nullptr );
+ void Initialize();
protected:
Internal::Render::FrameBuffer* mRenderObject; ///< The Render::Texture associated to this texture
TexturePtr mColor[ Dali::DevelFrameBuffer::MAX_COLOR_ATTACHMENTS ];
+ TexturePtr mDepth;
+ TexturePtr mStencil;
uint32_t mWidth;
uint32_t mHeight;
Mask mAttachments; ///< Bit-mask of type FrameBuffer::Attachment::Mask
uint8_t mColorAttachmentCount;
-
- bool mIsSurfaceBacked:1;
-
};
} // namespace Internal