Пример #1
0
        private void PlatformSetAttributeDescriptor(
            InputClassification classification,
            int index,
            string semanticName,
            int semanticIndex,
            VertexFormat format,
            int bufferIndex,
            int offset)
        {
            if (index + 1 > _inputElements.Length)
            {
                Array.Resize(ref _inputElements, index + 1);
            }

            _inputElements[index] = new InputElement
            {
                AlignedByteOffset    = offset,
                Classification       = classification.ToInputClassification(),
                Format               = format.ToDxgiFormat(),
                InstanceDataStepRate = (classification == InputClassification.PerInstanceData) ? 1 : 0,
                SemanticIndex        = semanticIndex,
                SemanticName         = semanticName,
                Slot = bufferIndex
            };

            _isDirty = true;
        }