protected override void OnValidateReferences(Validation.ValidationContext result) { base.OnValidateReferences(result); result.CheckSchemaIsDefined("BufferView", _bufferView); result.CheckArrayIndexAccess("BufferView", _bufferView, this.LogicalParent.LogicalBufferViews); result.CheckSchemaNonNegative("ByteOffset", _byteOffset); result.CheckSchemaIsInRange("Count", _count, _countMinimum, int.MaxValue); _sparse?.ValidateReferences(result); }
protected override void OnValidateReferences(Validation.ValidationContext result) { base.OnValidateReferences(result); result.CheckArrayIndexAccess(nameof(Buffer), _buffer, this.LogicalParent.LogicalBuffers); result.CheckSchemaNonNegative("ByteOffset", _byteOffset); result.CheckSchemaIsInRange("ByteLength", _byteLength, _byteLengthMinimum, int.MaxValue); // ByteStride must be multiple of 4, between 4 and 252 if (_byteStride.HasValue) { result.CheckSchemaIsInRange(nameof(ByteStride), _byteStride.Value, _byteStrideMinimum, _byteStrideMaximum); result.CheckSchemaIsMultipleOf(nameof(ByteStride), _byteStride.Value, 4); } }