Raised if a vertex is missing some of the attributes required by the source.
Module OgamlGraphics.VertexArray.VertexSource
Vertex source This module represents vertex sources, which are collections of vertices.
This module ensures that everything goes well. In particular, it verifies that all the vertices of a source are compatible (i.e. have the same initialized attributes).
An empty source can receive any vertex. The type of the source is then fixed by the first vertex added to it. Any vertex added to the source after the first one must have at least the same initialized attributes as the first vertex.
Note that the type of a source is reinitialized if the source is cleared.
Raised when trying to concatenate incompatible sources.
Type of a vertex source
Empty vertex source. The source will be redimensionned as needed, but an initial size can be specified with
size
.
Adds a vertex to a source. If the source is not empty, the vertex must have at least the same initialized fields as the first vertex put into the source.
Convenient operator to add vertices to a source.
Returns the length (in vertices) of a source.
Clears the source. Any source that has been converted into a vertex array can be safely cleared and reused. This avoids reallocation and garbage collection.
append s1 s2
appends the source s2
to s1
. s2
is not modified.
Iterates through all the vertices of a source.
Maps all the vertices of a source to a new source.
Maps all the vertices of a source to an existing source.