#region usings
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL4;
using SM.OGL.Mesh;
#endregion
namespace SM.Base.Objects
{
///
/// This class allows for fast mesh creation.
///
public class InstancedMesh : Mesh
{
///
/// Generates a mesh, with a primitive and attributes, that are required.
///
/// The mesh type
/// A list of (additional) attributes.
/// Possible values: uv, normals and color
///
public InstancedMesh(PrimitiveType type, string[] enabledAttibute) : base(type)
{
Attributes["vertex"] = Vertex = new VBO();
foreach (string attribute in enabledAttibute)
switch (attribute)
{
case "uv":
Attributes["uv"] = UVs = new VBO();
break;
case "normals":
Attributes["normal"] = Normals = new VBO();
break;
case "color":
Attributes["color"] = Color = new VBO();
break;
}
}
}
}