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