Frame-buffer object class. More...

#include <frame_buffer.h>

Public Member Functions

 FrameBuffer ()
 Constructs a null instance. More...
 
 FrameBuffer (GraphicContext &context)
 Constructs a FrameBuffer. More...
 
void attach_color (int attachment_index, const RenderBuffer &render_buffer)
 Attach color buffer. More...
 
void attach_color (int attachment_index, const Texture1D &texture, int level=0)
 Attach color buffer. More...
 
void attach_color (int attachment_index, const Texture1DArray &texture, int array_index=-1, int level=0)
 Attach color buffer. More...
 
void attach_color (int attachment_index, const Texture2D &texture, int level=0)
 Attach color buffer. More...
 
void attach_color (int attachment_index, const Texture2DArray &texture, int array_index=-1, int level=0)
 Attach color buffer. More...
 
void attach_color (int attachment_index, const Texture3D &texture, int depth, int level=0)
 Attach color buffer. More...
 
void attach_color (int attachment_index, const TextureCube &texture, TextureSubtype subtype, int level=0)
 Attach color buffer. More...
 
void attach_depth (const RenderBuffer &render_buffer)
 
void attach_depth (const Texture2D &texture, int level=0)
 
void attach_depth (const TextureCube &texture, TextureSubtype subtype, int level=0)
 
void attach_depth_stencil (const RenderBuffer &render_buffer)
 
void attach_depth_stencil (const Texture2D &texture, int level=0)
 
void attach_depth_stencil (const TextureCube &texture, TextureSubtype subtype, int level=0)
 
void attach_stencil (const RenderBuffer &render_buffer)
 
void attach_stencil (const Texture2D &texture, int level=0)
 
void attach_stencil (const TextureCube &texture, TextureSubtype subtype, int level=0)
 
void detach_color (int attachment_index)
 Detach color buffer. More...
 
void detach_depth ()
 
void detach_depth_stencil ()
 
void detach_stencil ()
 
FrameBufferBindTarget get_bind_target () const
 Get the bind target of the framebuffer. More...
 
float get_pixel_ratio () const
 
FrameBufferProviderget_provider () const
 Get Provider. More...
 
Size get_size () const
 Get the minumum size of all the frame buffer attachments. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
 operator bool () const
 
bool operator== (const FrameBuffer &other) const
 Equality operator. More...
 
void set_bind_target (FrameBufferBindTarget target)
 Set the bind target of the framebuffer to either drawn to or read from. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 

Detailed Description

Frame-buffer object class.

Constructor & Destructor Documentation

clan::FrameBuffer::FrameBuffer ( )

Constructs a null instance.

clan::FrameBuffer::FrameBuffer ( GraphicContext context)

Constructs a FrameBuffer.

By default, the bind target is set to framebuffer_draw. See set_bind_target()

Parameters
context= Graphic Context

Member Function Documentation

void clan::FrameBuffer::attach_color ( int  attachment_index,
const RenderBuffer render_buffer 
)

Attach color buffer.

Parameters
attachment_index= value
render_buffer= Render Buffer
void clan::FrameBuffer::attach_color ( int  attachment_index,
const Texture1D texture,
int  level = 0 
)

Attach color buffer.

Parameters
attachment_index= value
texture= Texture
level= value
void clan::FrameBuffer::attach_color ( int  attachment_index,
const Texture1DArray texture,
int  array_index = -1,
int  level = 0 
)

Attach color buffer.

Parameters
attachment_index= value
texture= Texture
array_index= value
level= value
void clan::FrameBuffer::attach_color ( int  attachment_index,
const Texture2D texture,
int  level = 0 
)

Attach color buffer.

Parameters
attachment_index= value
texture= Texture
level= value
void clan::FrameBuffer::attach_color ( int  attachment_index,
const Texture2DArray texture,
int  array_index = -1,
int  level = 0 
)

Attach color buffer.

Parameters
attachment_index= value
texture= Texture
array_index= value
level= value
void clan::FrameBuffer::attach_color ( int  attachment_index,
const Texture3D texture,
int  depth,
int  level = 0 
)

Attach color buffer.

Parameters
attachment_index= value
texture= Texture
depth= value
level= value
void clan::FrameBuffer::attach_color ( int  attachment_index,
const TextureCube texture,
TextureSubtype  subtype,
int  level = 0 
)

Attach color buffer.

Parameters
attachment_index= value
texture= Texture
subtype= Texture Subtype
level= value
zoffset= value
void clan::FrameBuffer::attach_depth ( const RenderBuffer render_buffer)
void clan::FrameBuffer::attach_depth ( const Texture2D texture,
int  level = 0 
)
void clan::FrameBuffer::attach_depth ( const TextureCube texture,
TextureSubtype  subtype,
int  level = 0 
)
void clan::FrameBuffer::attach_depth_stencil ( const RenderBuffer render_buffer)
void clan::FrameBuffer::attach_depth_stencil ( const Texture2D texture,
int  level = 0 
)
void clan::FrameBuffer::attach_depth_stencil ( const TextureCube texture,
TextureSubtype  subtype,
int  level = 0 
)
void clan::FrameBuffer::attach_stencil ( const RenderBuffer render_buffer)
void clan::FrameBuffer::attach_stencil ( const Texture2D texture,
int  level = 0 
)
void clan::FrameBuffer::attach_stencil ( const TextureCube texture,
TextureSubtype  subtype,
int  level = 0 
)
void clan::FrameBuffer::detach_color ( int  attachment_index)

Detach color buffer.

Parameters
attachment_index= value
texture= Texture
level= value
zoffset= value
void clan::FrameBuffer::detach_depth ( )
void clan::FrameBuffer::detach_depth_stencil ( )
void clan::FrameBuffer::detach_stencil ( )
FrameBufferBindTarget clan::FrameBuffer::get_bind_target ( ) const

Get the bind target of the framebuffer.

Returns
The bind target
float clan::FrameBuffer::get_pixel_ratio ( ) const

Retrieves the pixel ratio of this texture.

Returns
The display pixel ratio set for this texture. A zero value implies that no pixel ratio has been set
FrameBufferProvider* clan::FrameBuffer::get_provider ( ) const

Get Provider.

Returns
provider
Size clan::FrameBuffer::get_size ( ) const

Get the minumum size of all the frame buffer attachments.

Returns
size
bool clan::FrameBuffer::is_null ( ) const
inline

Returns true if this object is invalid.

clan::FrameBuffer::operator bool ( ) const
inlineexplicit
bool clan::FrameBuffer::operator== ( const FrameBuffer other) const

Equality operator.

void clan::FrameBuffer::set_bind_target ( FrameBufferBindTarget  target)

Set the bind target of the framebuffer to either drawn to or read from.

Detach existing textures and renderbuffers before setting a new bind target

Parameters
target= Target
void clan::FrameBuffer::throw_if_null ( ) const

Throw an exception if this object is invalid.


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