sculpto
Public Member Functions | Static Public Member Functions | List of all members
scl::frame_buffer Class Referenceabstract

#include <frame_buffer.h>

Inheritance diagram for scl::frame_buffer:
scl::gl_frame_buffer

Public Member Functions

virtual void SetFrameBufferProps (const frame_buffer_props &Props)=0
 
virtual const frame_buffer_propsGetFrameBufferProps () const =0
 
virtual const shared< texture_2d > & GetColorAttachment (int Index=0) const =0
 
virtual const shared< texture_2d > & GetDepthAttachment (int Index=0) const =0
 
virtual ~frame_buffer ()=default
 
virtual void Bind () const =0
 
virtual void Unbind () const =0
 
virtual void Resize (int Width, int Height)=0
 
virtual void Free ()=0
 
virtual void Clear ()=0
 

Static Public Member Functions

static shared< frame_bufferCreate (const frame_buffer_props &Props)
 

Detailed Description

Frame buffer interface.

Definition at line 47 of file frame_buffer.h.

Constructor & Destructor Documentation

◆ ~frame_buffer()

virtual scl::frame_buffer::~frame_buffer ( )
virtualdefault

Frame buffer default deatructor.

Member Function Documentation

◆ Bind()

virtual void scl::frame_buffer::Bind ( ) const
pure virtual
  • Bind frame buffer to current render stage function.
Parameters
None.
Returns
None.

Implemented in scl::gl_frame_buffer.

◆ Clear()

virtual void scl::frame_buffer::Clear ( )
pure virtual
  • Clear frame buffer funcrion.
Parameters
None.
Returns
None.

Implemented in scl::gl_frame_buffer.

◆ Create()

scl::shared< scl::frame_buffer > scl::frame_buffer::Create ( const frame_buffer_props Props)
static
  • Create frame buffer function.

\props Props - propsrties (specification) of creating frame buffer.

Returns
None.

Definition at line 14 of file frame_buffer.cpp.

15{
16 switch (render_context::GetApi())
17 {
18 case scl::render_context_api::OpenGL: return CreateShared<gl_frame_buffer>(Props);
19 case scl::render_context_api::DirectX: SCL_CORE_ASSERT(0, "This API is currently unsupported."); return nullptr;
20 }
21
22 SCL_CORE_ASSERT(0, "Unknown render API was selected.");
23 return nullptr;
24}
#define SCL_CORE_ASSERT(expr,...)
Definition: assert.h:69
static render_context_api GetApi()

◆ Free()

virtual void scl::frame_buffer::Free ( )
pure virtual
  • Unload frame buffer render target texture from GPU memory function.
Parameters
None.
Returns
None.

Implemented in scl::gl_frame_buffer.

◆ GetColorAttachment()

virtual const shared< texture_2d > & scl::frame_buffer::GetColorAttachment ( int  Index = 0) const
pure virtual

Frame buffer color attachment getter function.

Implemented in scl::gl_frame_buffer.

◆ GetDepthAttachment()

virtual const shared< texture_2d > & scl::frame_buffer::GetDepthAttachment ( int  Index = 0) const
pure virtual

Frame buffer depth attachment getter function.

Implemented in scl::gl_frame_buffer.

◆ GetFrameBufferProps()

virtual const frame_buffer_props & scl::frame_buffer::GetFrameBufferProps ( ) const
pure virtual

Frame buffer properties getter function.

Implemented in scl::gl_frame_buffer.

◆ Resize()

virtual void scl::frame_buffer::Resize ( int  Width,
int  Height 
)
pure virtual
  • Resize frame buffer (resize also could be called by setting frame buffer props).
Parameters
Width- new frame buffer width.
Height- new frame buffer height.
Returns
None.

Implemented in scl::gl_frame_buffer.

◆ SetFrameBufferProps()

virtual void scl::frame_buffer::SetFrameBufferProps ( const frame_buffer_props Props)
pure virtual

Frame buffer getter/setter functions.

Frame buffer properties setter function.

Implemented in scl::gl_frame_buffer.

◆ Unbind()

virtual void scl::frame_buffer::Unbind ( ) const
pure virtual
  • Unbind frame buffer from current render stage function.
Parameters
None.
Returns
None.

Implemented in scl::gl_frame_buffer.


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