28#include <SFML/Graphics/RenderTarget.hpp>
29#include <SFML/Graphics/Drawable.hpp>
30#include <SFML/Graphics/GraphicsContext.hpp>
40myCurrentView (&myDefaultView),
41myPreserveStates(
false),
105 if (myPreserveStates)
140 return *myCurrentView;
149 return myDefaultView;
184void RenderTarget::SetRenderStates()
Color is an utility class for manipulating 32-bits RGBA colors.
Abstract base class for every object that can be drawn into a render window.
void Clear(const Color &FillColor=Color(0, 0, 0))
Clear the entire target with a single color.
View & GetDefaultView()
Get the default view of the window for read / write.
virtual void Draw(const Drawable &Object)
Draw something into the target.
const View & GetView() const
Get the current view.
RenderTarget()
Default constructor.
void Initialize()
Called by the derived class when it's ready to be initialized.
virtual ~RenderTarget()
Destructor.
virtual unsigned int GetWidth() const =0
Get the width of the rendering region of the target.
void SetView(const View &NewView)
Change the current active view.
virtual unsigned int GetHeight() const =0
Get the height of the rendering region of the target.
void PreserveOpenGLStates(bool Preserve)
Tell SFML to preserve external OpenGL states, at the expense of more CPU charge.
Vector2 is an utility class for manipulating 2 dimensional vectors.
This class defines a view (position, size, etc.) ; you can consider it as a 2D camera.
void SetFromRect(const FloatRect &ViewRect)
Rebuild the view from a rectangle.