2
0

AccessorBufferViewMissingTest.cs 779 B

1234567891011121314151617181920
  1. using NUnit.Framework;
  2. using SharpGLTF.Schema2;
  3. namespace SharpGLTF.ThirdParty
  4. {
  5. public class AccessorBufferViewMissing
  6. {
  7. [Test]
  8. public void ModelLoadFailsWhenAccessorBufferViewMissing()
  9. {
  10. ExtensionsFactory.RegisterExtension<MeshPrimitive, SpzGaussianSplatsCompression>("KHR_spz_gaussian_splats_compression", p => new SpzGaussianSplatsCompression(p));
  11. // Currently, the model loading fails with SharpGLTF.Validation.SchemaException: 'Accessor[0] _bufferView: must be defined.Model'
  12. // This is because the accessor does not have a bufferView defined,
  13. // the bufferView is defined in the Splat extension.
  14. var modelRoot = ModelRoot.Load("./TestFixtures/tower.glb");
  15. }
  16. }
  17. }