1 #ifndef LXGUI_GUI_GL_RENDER_TARGET_HPP
2 #define LXGUI_GUI_GL_RENDER_TARGET_HPP
4 #include "lxgui/gui_matrix4.hpp"
5 #include "lxgui/gui_render_target.hpp"
6 #include "lxgui/impl/gui_gl_material.hpp"
7 #include "lxgui/utils.hpp"
88 static void save_rgba_to_png_(
89 const std::string& filename,
const color32* data, std::size_t width, std::size_t height);
91 std::uint32_t fbo_handle_ = 0;
92 std::shared_ptr<gl::material> texture_;
Holds a single color (float RGBA, 128 bits)
A place to render things (the screen, a texture, ...)
void end() override
Ends rendering on this target.
bool set_dimensions(const vector2ui &dimensions) override
Sets this render target's dimensions.
~render_target() override
Destructor.
bounds2f get_rect() const override
Returns this render target's pixel rect.
void begin() override
Begins rendering on this target.
render_target(const vector2ui &dimensions, material::filter filt=material::filter::none)
Constructor.
vector2ui get_canvas_dimensions() const override
Returns this render target's canvas dimension.
std::weak_ptr< gl::material > get_material()
Returns the associated texture for rendering.
void save_to_file(std::string filename) const override
Saves the content of this render target into a file.
const matrix4f & get_view_matrix() const
Returns the view matrix of this render target.
void clear(const color &c) override
Clears the content of this render_target.
static void check_availability()
Checks if the machine is capable of using render targets.
A place to render things (the screen, a texture, ...)
Holds a single color (byte RGBA, 32 bits)
A 4x4 matrix, used for coordinate transformations.