public interface RenderTarget
| Modifier and Type | Method and Description |
|---|---|
void |
clear(Color color)
Clears the render target and fills it with a constant color.
|
void |
draw(Drawable drawable)
Draws a drawable object to the render target using the default render states.
|
void |
draw(Drawable drawable,
RenderStates renderStates)
Draws a drawable object to the render target using the given render states.
|
void |
draw(Vertex[] vertices,
PrimitiveType type)
Draws a primitive of the given type using the given vertices and the default render states.
|
void |
draw(Vertex[] vertices,
PrimitiveType type,
RenderStates states)
Draws a primitive of the given type using the given vertices and the given render states.
|
ConstView |
getDefaultView()
Gets the target's default view.
|
Vector2i |
getSize()
Gets the size of the render region.
|
ConstView |
getView()
Gets the target's current view.
|
IntRect |
getViewport(ConstView view)
Computes the viewport of the given view applied to this render target.
|
Vector2i |
mapCoordsToPixel(Vector2f point)
Converts a point from world coordinates to target coordinates using the target's
current view.
|
Vector2i |
mapCoordsToPixel(Vector2f point,
ConstView view)
Converts a point from world coordinates to target coordinates for a certain view.
|
Vector2f |
mapPixelToCoords(Vector2i point)
Converts a point from target coordinates to world coordinates using the target's
current view.
|
Vector2f |
mapPixelToCoords(Vector2i point,
ConstView view)
Converts a point from target coordinates to world coordinates for a certain view.
|
void |
popGLStates()
Pops the last OpenGL states and matrices from the top of the stack.
|
void |
pushGLStates()
Pushes the current OpenGL states and matrices to the stack.
|
void |
resetGLStates()
Resets the internal OpenGL states so that the target is ready for drawing.
|
void |
setView(ConstView view)
Sets the target's view.
|
void clear(Color color)
color - the color to fill the target with.void setView(ConstView view)
view - the target's new view.ConstView getView()
ConstView getDefaultView()
IntRect getViewport(ConstView view)
view - the view.Vector2f mapPixelToCoords(Vector2i point)
point - the point on the render target.Vector2f mapPixelToCoords(Vector2i point, ConstView view)
point - the point on the render target.view - the view to use for conversion.Vector2i mapCoordsToPixel(Vector2f point)
point - the point in the world.Vector2i mapCoordsToPixel(Vector2f point, ConstView view)
point - the point in the world.view - the view to use for conversion.void draw(Drawable drawable)
drawable - the object to draw.void draw(Drawable drawable, RenderStates renderStates)
drawable - the object to draw.renderStates - the render states to use for drawing.void draw(Vertex[] vertices, PrimitiveType type)
vertices - the vertices to draw.type - the type of OpenGL primitive to draw.void draw(Vertex[] vertices, PrimitiveType type, RenderStates states)
vertices - the vertices to draw.type - the type of OpenGL primitive to draw.states - the render states to use for drawing.Vector2i getSize()
void pushGLStates()
void popGLStates()
void resetGLStates()