CL_FrameBuffer Class Reference
[clanDisplay Display]

Frame-buffer object class. More...

#include <frame_buffer.h>

List of all members.

Public Member Functions

Construction

 CL_FrameBuffer ()
 Constructs a null instance.
 CL_FrameBuffer (CL_GraphicContext &context)
 Constructs a FrameBuffer.
Attributes

bool is_null () const
 Returns true if this object is invalid.
void throw_if_null () const
 Throw an exception if this object is invalid.
CL_FrameBufferProviderget_provider () const
 Get Provider.
CL_Size get_size () const
 Get the minumum size of all the frame buffer attachments.
CL_FrameBufferBindTarget get_bind_target () const
 Get the bind target of the framebuffer.
Operations

bool operator== (const CL_FrameBuffer &other) const
 Equality operator.
void attach_color_buffer (int attachment_index, const CL_RenderBuffer &render_buffer)
 Attach color buffer.
void detach_color_buffer (int attachment_index, const CL_RenderBuffer &render_buffer)
 Attach color buffer.
void attach_color_buffer (int attachment_index, const CL_Texture &texture, int level=0, int zoffset=0)
 Attach color buffer.
void attach_color_buffer (int attachment_index, const CL_Texture &texture, CL_TextureSubtype subtype, int level=0, int zoffset=0)
 Attach color buffer.
void detach_color_buffer (int attachment_index, const CL_Texture &texture, int level=0, int zoffset=0)
 Detach color buffer.
void attach_stencil_buffer (const CL_RenderBuffer &render_buffer)
void detach_stencil_buffer (const CL_RenderBuffer &render_buffer)
void attach_stencil_buffer (const CL_Texture &texture, int level=0, int zoffset=0)
void attach_stencil_buffer (const CL_Texture &texture, CL_TextureSubtype subtype, int level=0, int zoffset=0)
void detach_stencil_buffer (const CL_Texture &texture, int level=0, int zoffset=0)
void attach_depth_buffer (const CL_RenderBuffer &render_buffer)
void detach_depth_buffer (const CL_RenderBuffer &render_buffer)
void attach_depth_buffer (const CL_Texture &texture, int level=0, int zoffset=0)
void attach_depth_buffer (const CL_Texture &texture, CL_TextureSubtype subtype, int level=0, int zoffset=0)
void detach_depth_buffer (const CL_Texture &texture, int level=0, int zoffset=0)
void attach_depth_stencil_buffer (const CL_RenderBuffer &render_buffer)
void detach_depth_stencil_buffer (const CL_RenderBuffer &render_buffer)
void attach_depth_stencil_buffer (const CL_Texture &texture, int level=0, int zoffset=0)
void attach_depth_stencil_buffer (const CL_Texture &texture, CL_TextureSubtype subtype, int level=0, int zoffset=0)
void detach_depth_stencil_buffer (const CL_Texture &texture, int level=0, int zoffset=0)
void set_bind_target (CL_FrameBufferBindTarget target)
 Set the bind target of the framebuffer to either drawn to or read from.

Detailed Description

Frame-buffer object class.


Constructor & Destructor Documentation

CL_FrameBuffer::CL_FrameBuffer (  ) 

Constructs a null instance.

CL_FrameBuffer::CL_FrameBuffer ( CL_GraphicContext context  ) 

Constructs a FrameBuffer.

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

Parameters:
context = Graphic Context

Member Function Documentation

void CL_FrameBuffer::attach_color_buffer ( int  attachment_index,
const CL_RenderBuffer render_buffer 
)

Attach color buffer.

Parameters:
attachment_index = value
render_buffer = Render Buffer
void CL_FrameBuffer::attach_color_buffer ( int  attachment_index,
const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)

Attach color buffer.

Parameters:
attachment_index = value
texture = Texture
level = value
zoffset = value
void CL_FrameBuffer::attach_color_buffer ( int  attachment_index,
const CL_Texture texture,
CL_TextureSubtype  subtype,
int  level = 0,
int  zoffset = 0 
)

Attach color buffer.

Parameters:
attachment_index = value
texture = Texture
subtype = Texture Subtype
level = value
zoffset = value
void CL_FrameBuffer::attach_depth_buffer ( const CL_RenderBuffer render_buffer  ) 
void CL_FrameBuffer::attach_depth_buffer ( const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::attach_depth_buffer ( const CL_Texture texture,
CL_TextureSubtype  subtype,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::attach_depth_stencil_buffer ( const CL_RenderBuffer render_buffer  ) 
void CL_FrameBuffer::attach_depth_stencil_buffer ( const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::attach_depth_stencil_buffer ( const CL_Texture texture,
CL_TextureSubtype  subtype,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::attach_stencil_buffer ( const CL_RenderBuffer render_buffer  ) 
void CL_FrameBuffer::attach_stencil_buffer ( const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::attach_stencil_buffer ( const CL_Texture texture,
CL_TextureSubtype  subtype,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::detach_color_buffer ( int  attachment_index,
const CL_RenderBuffer render_buffer 
)

Attach color buffer.

Parameters:
attachment_index = value
render_buffer = Render Buffer
void CL_FrameBuffer::detach_color_buffer ( int  attachment_index,
const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)

Detach color buffer.

Parameters:
attachment_index = value
texture = Texture
level = value
zoffset = value
void CL_FrameBuffer::detach_depth_buffer ( const CL_RenderBuffer render_buffer  ) 
void CL_FrameBuffer::detach_depth_buffer ( const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::detach_depth_stencil_buffer ( const CL_RenderBuffer render_buffer  ) 
void CL_FrameBuffer::detach_depth_stencil_buffer ( const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)
void CL_FrameBuffer::detach_stencil_buffer ( const CL_RenderBuffer render_buffer  ) 
void CL_FrameBuffer::detach_stencil_buffer ( const CL_Texture texture,
int  level = 0,
int  zoffset = 0 
)
CL_FrameBufferBindTarget CL_FrameBuffer::get_bind_target (  )  const

Get the bind target of the framebuffer.

Returns:
The bind target
CL_FrameBufferProvider* CL_FrameBuffer::get_provider (  )  const

Get Provider.

Returns:
provider
CL_Size CL_FrameBuffer::get_size (  )  const

Get the minumum size of all the frame buffer attachments.

Returns:
size
bool CL_FrameBuffer::is_null (  )  const [inline]

Returns true if this object is invalid.

bool CL_FrameBuffer::operator== ( const CL_FrameBuffer other  )  const

Equality operator.

void CL_FrameBuffer::set_bind_target ( CL_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 CL_FrameBuffer::throw_if_null (  )  const

Throw an exception if this object is invalid.


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