191 std::vector<Vertex> m_vertices;
#define SFML_GRAPHICS_API
Abstract base class for objects that can be drawn to a render target.
friend class RenderTarget
Base class for all render targets (window, texture, ...)
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.
PrimitiveType
Types of primitives that a sf::VertexArray can render.
@ Points
List of individual points.
Define the states used for drawing to a RenderTarget
Point with color and texture coordinates.