provides a class that manages a frame buffer along with its attachments
More...
#include <managed_frame_buffer.h>
|
| void | destruct (const context &ctx) |
| ivec2 | get_size () |
| void | set_size (const ivec2 &size) |
| | Set the size of the framebuffer attachments.
|
| void | add_attachment (const std::string &name, const std::string &format="uint8[R,G,B]", TextureFilter tf=TF_NEAREST, TextureWrap tw=TW_CLAMP_TO_EDGE, bool attach=true) |
| bool | enable_attachment (context &ctx, const std::string &name, int tex_unit=-1) |
| bool | disable_attachment (context &ctx, const std::string &name) |
| texture * | attachment_texture_ptr (const std::string &name) |
| bool | ensure (context &ctx) |
| | Ensure the framebuffer is constructed with the specified size.
|
| bool | enable (context &ctx, bool push_viewport=true) |
| bool | disable (context &ctx, bool pop_viewport=true) |
| frame_buffer & | ref_frame_buffer () |
provides a class that manages a frame buffer along with its attachments
Definition at line 13 of file managed_frame_buffer.h.
◆ managed_frame_buffer()
| cgv::render::managed_frame_buffer::managed_frame_buffer |
( |
| ) |
|
◆ add_attachment()
| void cgv::render::managed_frame_buffer::add_attachment |
( |
const std::string & | name, |
|
|
const std::string & | format = "uint8[R,G,B]", |
|
|
TextureFilter | tf = TF_NEAREST, |
|
|
TextureWrap | tw = TW_CLAMP_TO_EDGE, |
|
|
bool | attach = true ) |
◆ attachment_texture_ptr()
| texture * cgv::render::managed_frame_buffer::attachment_texture_ptr |
( |
const std::string & | name | ) |
|
◆ destruct()
| void cgv::render::managed_frame_buffer::destruct |
( |
const context & | ctx | ) |
|
◆ disable()
| bool cgv::render::managed_frame_buffer::disable |
( |
context & | ctx, |
|
|
bool | pop_viewport = true ) |
◆ disable_attachment()
| bool cgv::render::managed_frame_buffer::disable_attachment |
( |
context & | ctx, |
|
|
const std::string & | name ) |
◆ enable()
| bool cgv::render::managed_frame_buffer::enable |
( |
context & | ctx, |
|
|
bool | push_viewport = true ) |
◆ enable_attachment()
| bool cgv::render::managed_frame_buffer::enable_attachment |
( |
context & | ctx, |
|
|
const std::string & | name, |
|
|
int | tex_unit = -1 ) |
◆ ensure()
| bool cgv::render::managed_frame_buffer::ensure |
( |
context & | ctx | ) |
|
◆ get_size()
| ivec2 cgv::render::managed_frame_buffer::get_size |
( |
| ) |
|
◆ ref_frame_buffer()
| frame_buffer & cgv::render::managed_frame_buffer::ref_frame_buffer |
( |
| ) |
|
|
inline |
◆ set_size()
| void cgv::render::managed_frame_buffer::set_size |
( |
const ivec2 & | size | ) |
|
Set the size of the framebuffer attachments.
Requires to call ensure afterwards to actually construct the framebuffer.
If the given width or height is <= 0, the attachment widths or heights will be set to the context width or height respectively.
- Parameters
-
Definition at line 28 of file managed_frame_buffer.cxx.
◆ attachments
| std::unordered_map<std::string, attachment> cgv::render::managed_frame_buffer::attachments |
|
protected |
◆ fb
◆ index_counter
| unsigned cgv::render::managed_frame_buffer::index_counter = 0 |
|
protected |
◆ size
| ivec2 cgv::render::managed_frame_buffer::size |
|
protected |
The documentation for this class was generated from the following files: