mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-04-21 21:49:56 +08:00
Merge pull request #249 from CesiumGS/accessor-index-fix
Ensures only valid bufferViews are mentioned in accessor
This commit is contained in:
commit
e391f6b03e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user