Пример #1
0
        internal void Validate(ValidationContext result, int count)
        {
            result = result.GetContext(this);

            var bv = result.Root.LogicalBufferViews[_bufferView];

            BufferView.CheckAccess(result, bv, _byteOffset ?? _byteOffsetDefault, DimensionType.SCALAR, _componentType.ToComponent(), false, count);
        }
Пример #2
0
        protected override void OnValidate(Validation.ValidationContext result)
        {
            base.OnValidate(result);

            _sparse?.Validate(result);

            BufferView.CheckAccess(result, this.SourceBufferView, this.ByteOffset, this.Dimensions, this.Encoding, this.Normalized, this.Count);

            ValidateBounds(result);

            // at this point we don't know which kind of data we're accessing, so it's up to the components
            // using this accessor to validate the data.
        }