public struct VertexElement
{
public string Name;
public int Size;
public VertexAttribPointerType Type;
public bool Normalized;
public IntPtr Offset;
public void Apply(ShaderProgram shaderProgram, int stride = 0)
{
int index = GL.GetAttribLocation(shaderProgram.ID, Name);
if (index != -1)
{
GL.VertexAttribPointer(index, Size, Type, Normalized, stride, Offset);
GL.EnableVertexAttribArray(index);
}
}
}