Loading...
Searching...
No Matches
RenderTarget.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
258 void draw(const VertexBuffer& vertexBuffer, const RenderStates& states = RenderStates::Default);
269 void draw(const VertexBuffer& vertexBuffer, std::size_t firstVertex, std::size_t vertexCount, const RenderStates& states = RenderStates::Default);
Abstract base class for objects that can be drawn to a render target.
Definition Drawable.hpp:45
static const RenderStates Default
Special instance holding the default render states.
Definition RenderStates.hpp:110
Vector2f mapPixelToCoords(const Vector2i &point) const
Convert a point from target coordinates to world coordinates, using the current view.
void draw(const VertexBuffer &vertexBuffer, std::size_t firstVertex, std::size_t vertexCount, const RenderStates &states=RenderStates::Default)
Draw primitives defined by a vertex buffer.
void draw(const Drawable &drawable, const RenderStates &states=RenderStates::Default)
Draw a drawable object to the render target.
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 draw(const VertexBuffer &vertexBuffer, const RenderStates &states=RenderStates::Default)
Draw primitives defined by a vertex buffer.
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.
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.
virtual bool setActive(bool active=true)
Activate or deactivate the render target for rendering.
virtual bool isSrgb() const
Tell if the render target will use sRGB encoding when drawing on it.
void initialize()
Performs the common initialization step after creation.
Definition AlResource.hpp:35