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:670
cgv::render::render_buffer::create
bool create(const context &ctx, int width=-1, int height=-1)
create a render buffer.
Definition
render_buffer.cxx:41
cgv::render::render_buffer::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...
Definition
render_buffer.cxx:6
cgv::render::render_buffer::set_nr_multi_samples
void set_nr_multi_samples(unsigned _nr_samples)
set the number of multi samples, which should be done before create
Definition
render_buffer.cxx:14
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::is_created
bool is_created() const override
check whether the buffer has been created
Definition
render_buffer.cxx:36
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::destruct
void destruct(const context &ctx)
destruct the render buffer
Definition
render_buffer.cxx:29
cgv::render::render_buffer::get_width
int get_width() const
return the width in pixels of the buffer
Definition
render_buffer.h:35
cgv::render::render_component::last_error
std::string last_error
a string that contains the last error
Definition
context.h:365
cgv::render
namespace for api independent GPU programming
Definition
attribute_array_binding.cxx:7
cgv
this header is dependency free
Definition
print.h:11
cgv
render
render_buffer.h
Generated by
1.15.0