A place to render things (the screen, a texture, ...)
More...
#include <gui_gl_render_target.hpp>
|
static void | check_availability () |
| Checks if the machine is capable of using render targets.
|
|
A place to render things (the screen, a texture, ...)
Definition at line 15 of file gui_gl_render_target.hpp.
◆ render_target()
Constructor.
- Parameters
-
dimensions | The dimensions of the render_target |
filt | The filtering to apply to the target texture when displayed |
◆ ~render_target()
lxgui::gui::gl::render_target::~render_target |
( |
| ) |
|
|
overridevirtual |
◆ begin()
void lxgui::gui::gl::render_target::begin |
( |
| ) |
|
|
overridevirtual |
◆ check_availability()
static void lxgui::gui::gl::render_target::check_availability |
( |
| ) |
|
|
static |
Checks if the machine is capable of using render targets.
- Note
- If not, this function throws a gui::exception.
◆ clear()
void lxgui::gui::gl::render_target::clear |
( |
const color & |
c | ) |
|
|
overridevirtual |
◆ end()
void lxgui::gui::gl::render_target::end |
( |
| ) |
|
|
overridevirtual |
◆ get_canvas_dimensions()
vector2ui lxgui::gui::gl::render_target::get_canvas_dimensions |
( |
| ) |
const |
|
overridevirtual |
Returns this render target's canvas dimension.
- Returns
- This render target's canvas dimension
- Note
- This is the physical size of the render target. On some systems, abitrary dimensions are not supported: they can be promoted to the nearest power of two from for example.
Implements lxgui::gui::render_target.
◆ get_material()
std::weak_ptr< gl::material > lxgui::gui::gl::render_target::get_material |
( |
| ) |
|
Returns the associated texture for rendering.
- Returns
- The underlying pixel buffer, that you can use to render its content
◆ get_rect()
bounds2f lxgui::gui::gl::render_target::get_rect |
( |
| ) |
const |
|
overridevirtual |
◆ get_view_matrix()
const matrix4f & lxgui::gui::gl::render_target::get_view_matrix |
( |
| ) |
const |
Returns the view matrix of this render target.
- Returns
- The view matrix of this render target
◆ save_to_file()
void lxgui::gui::gl::render_target::save_to_file |
( |
std::string |
filename | ) |
const |
|
overridevirtual |
Saves the content of this render target into a file.
- Parameters
-
filename | The path of the file to save to |
- Note
- The file format will be detected based on the extension. Not all renderer backends support all extensions.
Implements lxgui::gui::render_target.
◆ set_dimensions()
bool lxgui::gui::gl::render_target::set_dimensions |
( |
const vector2ui & |
dimensions | ) |
|
|
overridevirtual |
Sets this render target's dimensions.
- Parameters
-
dimensions | The new dimensions (in pixels) |
- Returns
- 'true' if the function had to re-create a new render target
Implements lxgui::gui::render_target.
The documentation for this class was generated from the following file: