private static int GetSize(IndexBufferElementType type)
{
int result = 0;
switch (type)
{
case IndexBufferElementType.UByte:
result = sizeof(byte);
break;
case IndexBufferElementType.UShort:
result = sizeof(ushort);
break;
case IndexBufferElementType.UInt:
result = sizeof(uint);
break;
default:
break;
}
return result;
}