Acts as a wrapper for SDL_Renderer*. You can't (and shouldn't) instantiate this, but rather derive from it.
More...
#include <RenderTarget.hpp>
Acts as a wrapper for SDL_Renderer*. You can't (and shouldn't) instantiate this, but rather derive from it.
◆ ~RenderTarget()
virtual RenderTarget::~RenderTarget |
( |
| ) |
|
|
virtual |
◆ RenderTarget() [1/2]
RenderTarget::RenderTarget |
( |
SDL_Window * |
target | ) |
|
|
protected |
Create Renderer and bind it to a window.
- Parameters
-
[in] | target | The SDL_Window to bind to |
◆ RenderTarget() [2/2]
RenderTarget::RenderTarget |
( |
SDL_Surface * |
target | ) |
|
|
protected |
Create Renderer and bind it to a texture.
- Parameters
-
[in] | target | The SDL_Surface to bind to |
◆ Clear()
Clears the display.
- Parameters
-
[in] | color | The color to clear the display with |
◆ Display()
void RenderTarget::Display |
( |
| ) |
|
Display the current state of the renderer to the screen.
◆ Draw()
void RenderTarget::Draw |
( |
const Drawable & |
drawable | ) |
|
Draws a sdlu::Drawable to the SDL_Renderer.
- Parameters
-
[in] | drawable | A reference to a derived class of Drawable |
◆ SetMaxFramerate()
void RenderTarget::SetMaxFramerate |
( |
Uint32 |
max | ) |
|
Sets a maximum framerate on the display function.
If the maximum framerate is not 0, SDL_Delay() will be called after each Display() to ensure that the time between displays is not shorter than the framerate limit.
- Parameters
-
[in] | max | The new maximum framerate |
◆ renderer
SDL_Renderer* RenderTarget::renderer |
|
protected |
The documentation for this class was generated from the following file: