Пример #1
0
        private void DecodeSingleElement(ICollection <VertexElement> list, int index, int streamIndex, VertexElementUsage usage, ref int usageIndex)
        {
            var declTypes     = DeclarationTypes;
            var usageFlags    = UsageFlags;
            var usageFlagMask = (uint)(1 << index);
            var type          = GetType(declTypes, index);
            var size          = GetSize(type);

            if ((usageFlags & usageFlagMask) != 0)
            {
                var element = new VertexElement()
                {
                    UsageIndex  = usageIndex++,
                    StreamIndex = streamIndex,
                    Usage       = usage,
                    Type        = type,
                    Size        = size,
                };
                list.Add(element);
            }
        }
Пример #2
0
        private void DecodeSingleElement(ICollection<VertexElement> list, int index, int streamIndex, VertexElementUsage usage, ref int usageIndex)
        {
            var declTypes = DeclarationTypes;
            var usageFlags = UsageFlags;
            var usageFlagMask = (uint)(1 << index);
            var type = GetType(declTypes, index);
            var size = GetSize(type);

            if ((usageFlags & usageFlagMask) != 0)
            {
                var element = new VertexElement()
                                  {
                                      UsageIndex = usageIndex++,
                                      StreamIndex = streamIndex,
                                      Usage = usage,
                                      Type = type,
                                      Size = size,
                                  };
                list.Add(element);
            }
        }