25#ifndef SFML_RENDERTARGET_HPP
26#define SFML_RENDERTARGET_HPP
349 void applyCurrentView();
357 void applyBlendMode(
const BlendMode& mode);
365 void applyTransform(
const Transform& transform);
373 void applyTexture(
const Texture* texture);
381 void applyShader(
const Shader* shader);
395 virtual bool activate(
bool active) = 0;
403 enum {VertexCacheSize = 4};
410 Vertex vertexCache[VertexCacheSize];
#define SFML_GRAPHICS_API
Utility class for manipulating RGBA colors.
Abstract base class for objects that can be drawn to a render target.
NonCopyable()
Default constructor.
Define the states used for drawing to a RenderTarget.
static const RenderStates Default
Special instance holding the default render states.
Vector2f mapPixelToCoords(const Vector2i &point) const
Convert a point from target coordinates to world coordinates, using the current view.
void setView(const View &view)
Change the current active view.
void draw(const Drawable &drawable, const RenderStates &states=RenderStates::Default)
Draw a drawable object to the render target.
RenderTarget()
Default constructor.
Vector2f mapPixelToCoords(const Vector2i &point, const View &view) const
Convert a point from target coordinates to world coordinates.
virtual Vector2u getSize() const =0
Return the size of the rendering region of the target.
void clear(const Color &color=Color(0, 0, 0, 255))
Clear the entire target with a single color.
const View & getDefaultView() const
Get the default view of the render target.
Vector2i mapCoordsToPixel(const Vector2f &point, const View &view) const
Convert a point from world coordinates to target coordinates.
IntRect getViewport(const View &view) const
Get the viewport of a view, applied to this render target.
void pushGLStates()
Save the current OpenGL render states and matrices.
void draw(const Vertex *vertices, std::size_t vertexCount, PrimitiveType type, const RenderStates &states=RenderStates::Default)
Draw primitives defined by an array of vertices.
virtual ~RenderTarget()
Destructor.
void resetGLStates()
Reset the internal OpenGL states so that the target is ready for drawing.
void popGLStates()
Restore the previously saved OpenGL render states and matrices.
Vector2i mapCoordsToPixel(const Vector2f &point) const
Convert a point from world coordinates to target coordinates, using the current view.
const View & getView() const
Get the view currently in use in the render target.
void initialize()
Performs the common initialization step after creation.
Shader class (vertex, geometry and fragment).
Image living on the graphics card that can be used for drawing.
Define a point with color and texture coordinates.
2D camera that defines what region is shown on screen
PrimitiveType
Types of primitives that a sf::VertexArray can render.
Vector2< unsigned int > Vector2u
Vector2< float > Vector2f
unsigned long long Uint64
Blending modes for drawing.