1 #ifndef LXGUI_GUI_SDL_RENDER_TARGET_HPP
2 #define LXGUI_GUI_SDL_RENDER_TARGET_HPP
4 #include "lxgui/gui_matrix4.hpp"
5 #include "lxgui/gui_render_target.hpp"
6 #include "lxgui/impl/gui_sdl_material.hpp"
7 #include "lxgui/utils.hpp"
100 std::shared_ptr<sdl::material> texture_;
Holds a single color (float RGBA, 128 bits)
A place to render things (the screen, a texture, ...)
A place to render things (the screen, a texture, ...)
void save_to_file(std::string filename) const override
Saves the content of this render target into a file.
std::weak_ptr< sdl::material > get_material()
Returns the associated texture for rendering.
vector2ui get_canvas_dimensions() const override
Returns this render target's canvas dimension.
SDL_Texture * get_render_texture()
Returns the underlying SDL render texture object. return The underlying SDL render texture object.
bool set_dimensions(const vector2ui &dimensions) override
Sets this render target's dimensions.
static void check_availability(SDL_Renderer *rdr)
Checks if the machine is capable of using render targets.
void clear(const color &c) override
Clears the content of this render_target.
void begin() override
Begins rendering on this target.
render_target(SDL_Renderer *rdr, const vector2ui &dimensions, material::filter filt=material::filter::none)
Constructor.
void end() override
Ends rendering on this target.
bounds2f get_rect() const override
Returns this render target's pixel rect.
const matrix4f & get_view_matrix() const
Returns the view matrix of this render target.
A 4x4 matrix, used for coordinate transformations.