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
8
namespace
cgv
{
9
namespace
render {
10
13
class
CGV_API
render_buffer
14
:
public
render_buffer_base
,
15
public
cgv::data::component_format
16
{
17
int
width, height;
18
public
:
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
;
33
~render_buffer
();
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
cgv::data::component_format
the component format inherits the information of a packing_info and adds information on the component...
Definition
component_format.h:56
cgv::render::context
base class for all drawables, which is independent of the used rendering API.
Definition
context.h:621
cgv::render::render_buffer_base
base interface for a render_buffer
Definition
context.h:324
cgv::render::render_buffer
this class encapsulate render buffers that live on the GPU which must support frame buffer objects fo...
Definition
render_buffer.h:16
cgv::render::render_buffer::get_height
int get_height() const
return the height in pixels of the buffer
Definition
render_buffer.h:37
cgv::render::render_buffer::is_multi_buffer
bool is_multi_buffer() const
whether this buffer is a multi sample buffer
Definition
render_buffer.h:39
cgv::render::render_buffer::get_nr_multi_samples
unsigned get_nr_multi_samples() const
return number of multi samples
Definition
render_buffer.h:41
cgv::render::render_buffer::get_width
int get_width() const
return the width in pixels of the buffer
Definition
render_buffer.h:35
cgv
the cgv namespace
Definition
print.h:11
cgv
render
render_buffer.h
Generated by
1.9.8