public static VertexFloatBuffer GetTriangle(ColoredVector2 vector1, ColoredVector2 vector2, ColoredVector2 vector3) { var triangle = new VertexFloatBuffer(VertexFormat.XYZ_COLOR, 3); triangle.AddVertex(vector1); triangle.AddVertex(vector2); triangle.AddVertex(vector3); triangle.IndexFromLength(); return(triangle); }
public void AddVertex(ColoredVector2 vector) { AddVertex(vector.vector, vector.color); }