Castor3D  ..
Public Member Functions | List of all members
Castor3D::BackBuffers Class Referenceabstract

Back buffers class. More...

+ Inheritance diagram for Castor3D::BackBuffers:
+ Collaboration diagram for Castor3D::BackBuffers:

Public Member Functions

C3D_API BackBuffers (Engine &p_engine)
 Constructor. More...
 
virtual C3D_API ~BackBuffers ()
 Destructor. More...
 
C3D_API bool Initialise (Castor::Size const &p_size, Castor::ePIXEL_FORMAT p_format)
 Initialises the internal buffer, in RAM memory. More...
 
virtual C3D_API bool Bind (eBUFFER p_buffer, eFRAMEBUFFER_TARGET p_target)=0
 Activation function, to tell the GPU it is active. More...
 
virtual C3D_API RenderBufferAttachmentSPtr CreateAttachment (RenderBufferSPtr p_renderBuffer)
 Creates an attachment to a render buffer. More...
 
virtual C3D_API TextureAttachmentSPtr CreateAttachment (DynamicTextureSPtr p_texture)
 Creates an attachment to a texture. More...
 
virtual C3D_API bool IsComplete () const
 Checks if the FBO is complete. More...
 
- Public Member Functions inherited from Castor3D::FrameBuffer
 DECLARE_VECTOR (FrameBufferAttachmentSPtr, Attach)
 
C3D_API FrameBuffer (Engine &p_engine)
 Constructor. More...
 
virtual C3D_API ~FrameBuffer ()
 Destructor. More...
 
C3D_API bool Initialise (Castor::Size const &p_size)
 Initialises color and depth cache buffers. More...
 
C3D_API void Cleanup ()
 Cleans up cache buffers. More...
 
C3D_API void SetClearColour (Castor::Colour const &p_colour)
 Defines the colour used when Clear is called on the color buffer. More...
 
C3D_API void Clear ()
 Clears the buffers. More...
 
C3D_API bool Bind (eFRAMEBUFFER_MODE p_mode=eFRAMEBUFFER_MODE_AUTOMATIC, eFRAMEBUFFER_TARGET p_target=eFRAMEBUFFER_TARGET_BOTH)
 Activation function, to tell the GPU it is active. More...
 
C3D_API void Unbind ()
 Deactivation function, to tell the GPU it is inactive. More...
 
C3D_API bool BlitInto (FrameBufferSPtr p_buffer, Castor::Rectangle const &p_rect, uint32_t p_components)
 Blit this frame buffer into the given one. More...
 
C3D_API bool StretchInto (FrameBufferSPtr p_buffer, Castor::Rectangle const &p_rectSrc, Castor::Rectangle const &p_rectDst, uint32_t p_components, eINTERPOLATION_MODE p_interpolation)
 Stretches this frame buffer into the given one. More...
 
C3D_API void SetDrawBuffers ()
 Specifies the buffers to be drawn into. More...
 
C3D_API void SetDrawBuffer (TextureAttachmentSPtr p_attach)
 Specifies the color buffer to be drawn into. More...
 
C3D_API void SetDrawBuffer (RenderBufferAttachmentSPtr p_attach)
 Specifies the color buffer to be drawn into. More...
 
C3D_API bool Attach (eATTACHMENT_POINT p_point, uint8_t p_index, TextureAttachmentSPtr p_texture, eTEXTURE_TARGET p_target, int p_layer=0)
 Attaches a texture to this frame buffer, at given attachment point. More...
 
C3D_API bool Attach (eATTACHMENT_POINT p_point, TextureAttachmentSPtr p_texture, eTEXTURE_TARGET p_target, int p_layer=0)
 Attaches a texture to this frame buffer, at given attachment point. More...
 
C3D_API bool Attach (eATTACHMENT_POINT p_point, uint8_t p_index, RenderBufferAttachmentSPtr p_renderBuffer)
 Attaches a render buffer to this frame buffer, at given attachment point. More...
 
C3D_API bool Attach (eATTACHMENT_POINT p_point, RenderBufferAttachmentSPtr p_renderBuffer)
 Attaches a render buffer to this frame buffer, at given attachment point. More...
 
C3D_API FrameBufferAttachmentSPtr GetAttachment (eATTACHMENT_POINT p_point, uint8_t p_index)
 Retrieves a buffer attached at given attachment point and index. More...
 
C3D_API void DetachAll ()
 Detaches all attached objects. More...
 
C3D_API void Resize (Castor::Size const &p_size)
 Resizes each attached buffer. More...
 
virtual C3D_API bool Create ()=0
 Creation function. More...
 
virtual C3D_API void Destroy ()=0
 Destruction function. More...
 
virtual C3D_API void SetDrawBuffers (AttachArray const &p_attaches)=0
 Uses given attachments to this framebuffer for next draw call. More...
 
virtual C3D_API void SetReadBuffer (eATTACHMENT_POINT p_point, uint8_t p_index)=0
 Specifies the color buffer source for pixels. More...
 
virtual C3D_API ColourRenderBufferSPtr CreateColourRenderBuffer (Castor::ePIXEL_FORMAT p_format)=0
 Creates a colour render buffer. More...
 
virtual C3D_API DepthStencilRenderBufferSPtr CreateDepthStencilRenderBuffer (Castor::ePIXEL_FORMAT p_format)=0
 Creates a depth/stencil render buffer. More...
 
virtual C3D_API bool DownloadBuffer (Castor3D::eATTACHMENT_POINT p_point, uint8_t p_index, Castor::PxBufferBaseSPtr p_buffer)=0
 Downloads the render buffer data. More...
 
Castor::Colour GetClearColour () const
 Retrieves the background colour. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Castor3D::FrameBuffer
C3D_API uint32_t DoGetSamplesCount (eATTACHMENT_POINT p_point, uint8_t p_index)
 
C3D_API Castor::ePIXEL_FORMAT DoGetPixelFormat (eATTACHMENT_POINT p_point, uint8_t p_index)
 
virtual C3D_API void DoClear (uint32_t p_targets)=0
 Clears the given buffers components. More...
 
virtual C3D_API bool DoBlitInto (FrameBufferSPtr p_buffer, Castor::Rectangle const &p_rect, uint32_t p_components)=0
 Blit this frame buffer into the given one. More...
 
virtual C3D_API bool DoStretchInto (FrameBufferSPtr p_buffer, Castor::Rectangle const &p_rectSrc, Castor::Rectangle const &p_rectDst, uint32_t p_components, eINTERPOLATION_MODE p_interpolation)=0
 Blit this frame buffer into the given one. More...
 
- Protected Attributes inherited from Castor3D::FrameBuffer
AttachArray m_attaches
 All attachments. More...
 
Castor::Colour m_clearColour
 The background colour. More...
 

Detailed Description

Back buffers class.

Author
Sylvain DOREMUS
Version
0.8.0
Date
20/10/2015
Remarks
Render window default back buffers.

Constructor & Destructor Documentation

◆ BackBuffers()

C3D_API Castor3D::BackBuffers::BackBuffers ( Engine p_engine)

Constructor.

Parameters
[in]p_engineThe engine.

◆ ~BackBuffers()

virtual C3D_API Castor3D::BackBuffers::~BackBuffers ( )
virtual

Destructor.

Member Function Documentation

◆ Bind()

virtual C3D_API bool Castor3D::BackBuffers::Bind ( eBUFFER  p_buffer,
eFRAMEBUFFER_TARGET  p_target 
)
pure virtual

Activation function, to tell the GPU it is active.

Parameters
[in]p_bufferThe frame buffer to bind.
[in]p_targetThe frame buffer binding target.
Returns
true if successful.

◆ CreateAttachment() [1/2]

virtual C3D_API RenderBufferAttachmentSPtr Castor3D::BackBuffers::CreateAttachment ( RenderBufferSPtr  p_renderBuffer)
inlinevirtual

Creates an attachment to a render buffer.

Parameters
[in]p_renderBufferThe render buffer
Returns
The created attachment

Implements Castor3D::FrameBuffer.

◆ CreateAttachment() [2/2]

virtual C3D_API TextureAttachmentSPtr Castor3D::BackBuffers::CreateAttachment ( DynamicTextureSPtr  p_texture)
inlinevirtual

Creates an attachment to a texture.

Parameters
[in]p_textureThe texture
Returns
The created attachment

Implements Castor3D::FrameBuffer.

◆ Initialise()

C3D_API bool Castor3D::BackBuffers::Initialise ( Castor::Size const &  p_size,
Castor::ePIXEL_FORMAT  p_format 
)

Initialises the internal buffer, in RAM memory.

Parameters
[in]p_sizeThe buffer dimensions.
[in]p_formatThe buffer pixel format.
Returns
true if successful.

◆ IsComplete()

virtual C3D_API bool Castor3D::BackBuffers::IsComplete ( ) const
inlinevirtual

Checks if the FBO is complete.

Returns
false if the buffer is in error if there is an attachment missing

Implements Castor3D::FrameBuffer.


The documentation for this class was generated from the following file: