mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-08-21 10:38:36 +00:00
Ensures only valid bufferViews are mentioned in accessor
This commit is contained in:
@@ -6500,7 +6500,8 @@ static void SerializeExtensionMap(const ExtensionMap &extensions, json &o) {
|
||||
}
|
||||
|
||||
static void SerializeGltfAccessor(Accessor &accessor, json &o) {
|
||||
SerializeNumberProperty<int>("bufferView", accessor.bufferView, o);
|
||||
if (accessor.bufferView >= 0)
|
||||
SerializeNumberProperty<int>("bufferView", accessor.bufferView, o);
|
||||
|
||||
if (accessor.byteOffset != 0.0)
|
||||
SerializeNumberProperty<int>("byteOffset", int(accessor.byteOffset), o);
|
||||
|
||||
Reference in New Issue
Block a user