+ AxisHelper
~ Transformation can now set to be ignored. (Sending a Identity, when requested) ~ Changed how Meshes store Attributes
This commit is contained in:
parent
0895c600cf
commit
2e7051d800
14 changed files with 146 additions and 30 deletions
31
SMCode/SM.OGL/Mesh/MeshAttributeList.cs
Normal file
31
SMCode/SM.OGL/Mesh/MeshAttributeList.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue