private static ushort[] ParseElement(ref byte *pData, XFDataFormat fmt, int count, int stride) { if (fmt == XFDataFormat.None) { return(null); } ushort[] indices = new ushort[count]; byte *tPtr = pData; if (fmt == XFDataFormat.Index8) { for (int i = 0; i < count; tPtr += stride) { indices[i++] = *tPtr; } pData++; } else if (fmt == XFDataFormat.Index16) { for (int i = 0; i < count; tPtr += stride) { indices[i++] = *(bushort *)tPtr; } pData += 2; } return(indices); }
public FacepointAttribute(GXAttribute attr, XFDataFormat fmt) { _attr = attr; _type = fmt; }
public void SetUVFormat(int index, XFDataFormat format) { _hi = (_hi & ~(uint)(3 << index * 2) | (uint)((int)format << index * 2)); }
public void SetColorFormat(int index, XFDataFormat format) { _lo = _lo & ~((uint)3 << (index * 2 + 13)) | ((uint)format << (index * 2 + 13)); }