Merge pull request #76875 from lyuma/fix_zero_sparse_accessors

gltf: Permit sparse accessors without a bufferView.
This commit is contained in:
Rémi Verschelde 2023-05-09 19:28:50 +02:00
commit f20061d2d9
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@
<tutorials>
</tutorials>
<members>
<member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="0">
<member name="buffer_view" type="int" setter="set_buffer_view" getter="get_buffer_view" default="-1">
</member>
<member name="byte_offset" type="int" setter="set_byte_offset" getter="get_byte_offset" default="0">
</member>

View file

@ -39,7 +39,7 @@ struct GLTFAccessor : public Resource {
friend class GLTFDocument;
private:
GLTFBufferViewIndex buffer_view = 0;
GLTFBufferViewIndex buffer_view = -1;
int byte_offset = 0;
int component_type = 0;
bool normalized = false;