Frame-buffer object class. More...
#include <frame_buffer.h>
Public Member Functions | |
FrameBuffer () | |
Constructs a null instance. | |
FrameBuffer (GraphicContext &context) | |
Constructs a FrameBuffer. | |
void | attach_color (int attachment_index, const RenderBuffer &render_buffer) |
Attach color buffer. | |
void | attach_color (int attachment_index, const Texture1D &texture, int level=0) |
Attach color buffer. | |
void | attach_color (int attachment_index, const Texture1DArray &texture, int array_index=-1, int level=0) |
Attach color buffer. | |
void | attach_color (int attachment_index, const Texture2D &texture, int level=0) |
Attach color buffer. | |
void | attach_color (int attachment_index, const Texture2DArray &texture, int array_index=-1, int level=0) |
Attach color buffer. | |
void | attach_color (int attachment_index, const Texture3D &texture, int depth, int level=0) |
Attach color buffer. | |
void | attach_color (int attachment_index, const TextureCube &texture, TextureSubtype subtype, int level=0) |
Attach color buffer. | |
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. | |
void | detach_depth () |
void | detach_depth_stencil () |
void | detach_stencil () |
FrameBufferBindTarget | get_bind_target () const |
Get the bind target of the framebuffer. | |
float | get_pixel_ratio () const |
FrameBufferProvider * | get_provider () const |
Get Provider. | |
Size | get_size () const |
Get the minumum size of all the frame buffer attachments. | |
bool | is_null () const |
Returns true if this object is invalid. | |
operator bool () const | |
bool | operator== (const FrameBuffer &other) const |
Equality operator. | |
void | set_bind_target (FrameBufferBindTarget target) |
Set the bind target of the framebuffer to either drawn to or read from. | |
void | throw_if_null () const |
Throw an exception if this object is invalid. | |
Frame-buffer object class.
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()
context | = Graphic Context |
void clan::FrameBuffer::attach_color | ( | int | attachment_index, |
const RenderBuffer & | render_buffer ) |
Attach color buffer.
attachment_index | = value |
render_buffer | = Render Buffer |
void clan::FrameBuffer::attach_color | ( | int | attachment_index, |
const Texture1D & | texture, | ||
int | level = 0 ) |
Attach color buffer.
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.
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.
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.
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.
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 ) |
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.
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.
float clan::FrameBuffer::get_pixel_ratio | ( | ) | const |
Retrieves the pixel ratio of this texture.
FrameBufferProvider * clan::FrameBuffer::get_provider | ( | ) | const |
Get Provider.
Size clan::FrameBuffer::get_size | ( | ) | const |
Get the minumum size of all the frame buffer attachments.
|
inline |
Returns true if this object is invalid.
|
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
target | = Target |
void clan::FrameBuffer::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.