191 std::vector<Vertex> m_vertices;
#define SFML_GRAPHICS_API
Definition Export.hpp:42
Abstract base class for objects that can be drawn to a render target.
Definition Drawable.hpp:44
friend class RenderTarget
Definition Drawable.hpp:53
Base class for all render targets (window, texture, ...).
Definition RenderTarget.hpp:63
void resize(std::size_t vertexCount)
Resize the vertex array.
void clear()
Clear the vertex array.
VertexArray(PrimitiveType type, std::size_t vertexCount=0)
Construct the vertex array with a type and an initial number of vertices.
void append(const Vertex &vertex)
Add a vertex to the array.
const Vertex & operator[](std::size_t index) const
Get a read-only access to a vertex by its index.
Vertex & operator[](std::size_t index)
Get a read-write access to a vertex by its index.
PrimitiveType getPrimitiveType() const
Get the type of primitives drawn by the vertex array.
void setPrimitiveType(PrimitiveType type)
Set the type of primitives to draw.
FloatRect getBounds() const
Compute the bounding rectangle of the vertex array.
std::size_t getVertexCount() const
Return the vertex count.
VertexArray()=default
Default constructor.
Definition BlendMode.hpp:34
PrimitiveType
Types of primitives that a sf::VertexArray can render.
Definition PrimitiveType.hpp:39
@ Points
List of individual points.
Definition PrimitiveType.hpp:40
Rect< float > FloatRect
Definition Rect.hpp:154
Define the states used for drawing to a RenderTarget.
Definition RenderStates.hpp:48
Define a point with color and texture coordinates.
Definition Vertex.hpp:44