1#include "render_buffer.h"
16 nr_multi_samples = _nr_samples;
25 std::cerr <<
"could not destruct render buffer in destructor" << std::endl;
32 ctx.render_buffer_destruct(*
this);
47 bool res = ctx.render_buffer_create(*
this, *
this, _width, _height);
base class for all drawables, which is independent of the used rendering API.
bool create(const context &ctx, int width=-1, int height=-1)
create a render buffer.
render_buffer(const std::string &description="[R,G,B,A]")
construct from description of component format, where the default format specifies a color buffer wit...
bool is_depth_buffer() const
return whether the component format corresponds to a depth buffer format
void set_nr_multi_samples(unsigned _nr_samples)
set the number of multi samples, which should be done before create
bool is_color_buffer() const
return whether the component format corresponds to a color buffer format
bool is_created() const override
check whether the buffer has been created
void destruct(const context &ctx)
destruct the render buffer
~render_buffer()
calls the destruct method if necessary
const context * ctx_ptr
keep pointer to my context
namespace for data management components
@ CF_RGBA
color format with components R, G and B
@ CF_RGB
color format with two components R and G
@ CF_D
color format with components B, G, R and A
namespace for api independent GPU programming
this header is dependency free