smrendererv3/SMCode/SM.OGL/Mesh/MeshAttributeList.cs
Michel Fedde 2e7051d800 + AxisHelper
~ Transformation can now set to be ignored. (Sending a Identity, when requested)
~ Changed how Meshes store Attributes
2020-12-13 13:03:57 +01:00

31 lines
No EOL
705 B
C#

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace SM.OGL.Mesh
{
public class MeshAttributeList : List<MeshAttribute>
{
public VBO this[string name]
{
get
{
for (int i = 0; i < Count; i++)
{
if (this[i].Name == name)
{
return this[i].ConnectedVBO;
}
}
return null;
}
}
public void Add(int id, string name, VBO vbo)
{
if (vbo == null) return;
Add(new MeshAttribute(id, name, vbo));
}
}
}