25 #ifndef CPP3DS_VERTEXARRAY_HPP
26 #define CPP3DS_VERTEXARRAY_HPP
31 #include <cpp3ds/Graphics/Vertex.hpp>
32 #include <cpp3ds/Graphics/PrimitiveType.hpp>
33 #include <cpp3ds/Graphics/Rect.hpp>
34 #include <cpp3ds/Graphics/Drawable.hpp>
36 #include <cpp3ds/System/LinearAllocator.hpp>
131 void resize(
unsigned int vertexCount);
193 std::vector<Vertex> m_vertices;
195 std::vector<Vertex, LinearAllocator<Vertex>> m_vertices;
void setPrimitiveType(PrimitiveType type)
Set the type of primitives to draw.
VertexArray()
Default constructor.
void append(const Vertex &vertex)
Add a vertex to the array.
Define a set of one or more 2D primitives.
PrimitiveType getPrimitiveType() const
Get the type of primitives drawn by the vertex array.
Define a point with color and texture coordinates.
Abstract base class for objects that can be drawn to a render target.
FloatRect getBounds() const
Compute the bounding rectangle of the vertex array.
Base class for all render targets (window, texture, ...)
void clear()
Clear the vertex array.
Define the states used for drawing to a RenderTarget.
PrimitiveType
Types of primitives that a cpp3ds::VertexArray can render.
void resize(unsigned int vertexCount)
Resize the vertex array.
Vertex & operator[](unsigned int index)
Get a read-write access to a vertex by its index.
unsigned int getVertexCount() const
Return the vertex count.