dsfml.graphics.vertexarray

$(U VertexArray) is a very simple wrapper around a dynamic array of vertices *and a primitives type.

It inherits $(DRAWABLE_LINK), but unlike other drawables it is not transformable.

Members

Classes

VertexArray
class VertexArray

Define a set of one or more 2D primitives.

Examples

1 VertexArray lines(PrimitiveType.LineStrip, 4);
2 lines[0].position = Vector2f(10, 0);
3 lines[1].position = Vector2f(20, 0);
4 lines[2].position = Vector2f(30, 5);
5 lines[3].position = Vector2f(40, 2);
6 
7 window.draw(lines);

See Also

$(VERTEX_LINK)

Meta