29 #ifndef NOMLIB_SDL2_RENDERER_HPP
30 #define NOMLIB_SDL2_RENDERER_HPP
38 #include "nomlib/config.hpp"
39 #include "nomlib/math/Color.hpp"
40 #include "nomlib/math/Coords.hpp"
41 #include "nomlib/SDL_helpers.hpp"
63 bool initialize ( SDL_WINDOW::RawPtr window, int32 rendering_driver = -1, uint32 context_flags = SDL_RENDERER_ACCELERATED );
66 SDL_RENDERER::RawPtr
renderer (
void )
const;
98 void update (
void )
const;
103 bool update ( SDL_TEXTURE::RawPtr input_texture );
110 bool clear (
void )
const;
117 bool fill (
const Color& color = Color::Blue );
139 bool set_color (
const Color& color );
160 void*
pixels (
void )
const;
171 #endif // include guard defined
const Point2i size(void) const
const Coords bounds(void) const
SDL_RENDERER::UniquePtr renderer_
Renderer(void)
Default constructor; initializes instance to sane defaults.
const Point2i scale_factor(void) const
Obtain the current scale factor.
const SDL_BlendMode blend_mode(void) const
Obtain the blending mode used for drawing.
bool set_blend_mode(const SDL_BlendMode mode)
virtual ~Renderer(void)
Lazy destructor with nothing to do.
bool renderer_valid(void) const
Is this object initialized? Valid when NOT nullptr.
bool fill(const Color &color=Color::Blue)
bool set_bounds(const Coords &clip_bounds)
Video subsystem responsible for managing high-level graphics display (think: very fancy back-buffer)...
bool set_viewport(const Coords &rect)
const Point2i logical_resolution(void) const
void update(void) const
Update the renderer surface on the attached window.
SDL_RENDERER::RawPtr renderer(void) const
Get a raw pointer to the SDL_Renderer in use.
bool initialize(SDL_WINDOW::RawPtr window, int32 rendering_driver=-1, uint32 context_flags=SDL_RENDERER_ACCELERATED)
Coordinate values (x, y, z, width, height ) wrapper.
bool set_logical_resolution(int width, int height)
Utility class container for RGBA colors.
void * pixels(void) const
const Coords viewport(void) const