RenderTarget

Base interface for all render targets (window, texture, ...).

Members

Functions

clear
void clear(Color color)

Clear the entire target with a single color.

draw
void draw(Drawable drawable, RenderStates states)

Draw a drawable object to the render target.

draw
void draw(const(Vertex)[] vertices, PrimitiveType type, RenderStates states)

Draw primitives defined by an array of vertices.

getDefaultView
View getDefaultView()

Get the default view of the render target.

getSize
Vector2u getSize()

Return the size of the rendering region of the target.

getViewport
IntRect getViewport(View view)

Get the viewport of a view, applied to this render target.

mapCoordsToPixel
Vector2i mapCoordsToPixel(Vector2f point)

Convert a point from target coordinates to world coordinates, using the curtheView.view.

mapCoordsToPixel
Vector2i mapCoordsToPixel(Vector2f point, View theView)

Convert a point from world coordinates to target coordinates.

mapPixelToCoords
Vector2f mapPixelToCoords(Vector2i point)

Convert a point fom target coordinates to world coordinates, using the current view.

mapPixelToCoords
Vector2f mapPixelToCoords(Vector2i point, View theView)

Convert a point from target coordinates to world coordinates.

popGLStates
void popGLStates()

Restore the previously saved OpenGL render states and matrices.

pushGLStates
void pushGLStates()

Save the current OpenGL render states and matrices.

resetGLStates
void resetGLStates()

Reset the internal OpenGL states so that the target is ready for drawing.

Properties

view
View view [@property setter]
View view [@property getter]

The current active view.

Meta