cgv
Loading...
Searching...
No Matches
render_buffer.h
1#pragma once
2
3#include <cgv/render/context.h>
4#include <cgv/data/component_format.h>
5
6#include "lib_begin.h"
7
8namespace cgv {
9 namespace render {
10
13class CGV_API render_buffer
14 : public render_buffer_base,
16{
17 int width, height;
18public:
19 using render_component::last_error;
20
22 render_buffer(const std::string& description = "[R,G,B,A]");
24 void set_nr_multi_samples(unsigned _nr_samples);
26 void destruct(const context& ctx);
29 bool create(const context& ctx, int width = -1, int height = -1);
31 bool is_created() const override;
35 int get_width() const { return width; }
37 int get_height() const { return height; }
39 bool is_multi_buffer() const { return nr_multi_samples > 0; }
41 unsigned get_nr_multi_samples() const { return nr_multi_samples; }
43 bool is_depth_buffer() const;
45 bool is_color_buffer() const;
46 // bool is_stencil_buffer() const;
47};
48
49 }
50}
51
52#include <cgv/config/lib_end.h>
53
the component format inherits the information of a packing_info and adds information on the component...
base class for all drawables, which is independent of the used rendering API.
Definition context.h:621
base interface for a render_buffer
Definition context.h:324
this class encapsulate render buffers that live on the GPU which must support frame buffer objects fo...
int get_height() const
return the height in pixels of the buffer
bool is_multi_buffer() const
whether this buffer is a multi sample buffer
unsigned get_nr_multi_samples() const
return number of multi samples
int get_width() const
return the width in pixels of the buffer
the cgv namespace
Definition print.h:11