Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public FacepointAttribute(GXAttribute attr, XFDataFormat fmt)
 {
     _attr = attr;
     _type = fmt;
 }
Esempio n. 3
0
 public void SetUVFormat(int index, XFDataFormat format)
 {
     _hi = (_hi & ~(uint)(3 << index * 2) | (uint)((int)format << index * 2));
 }
Esempio n. 4
0
 public void SetColorFormat(int index, XFDataFormat format)
 {
     _lo = _lo & ~((uint)3 << (index * 2 + 13)) | ((uint)format << (index * 2 + 13));
 }
Esempio n. 5
0
 public FacepointAttribute(GXAttribute attr, XFDataFormat fmt)
 {
     _attr = attr;
     _type = fmt;
 }
Esempio n. 6
0
 public void SetUVFormat(int index, XFDataFormat format)
 {
     _hi = (_hi & ~(uint)(3 << index * 2) | (uint)((int)format << index * 2));
 }
Esempio n. 7
0
 public void SetColorFormat(int index, XFDataFormat format)
 {
     _lo = _lo & ~((uint)3 << (index * 2 + 13)) | ((uint)format << (index * 2 + 13));
 }