Fix glTF 2.0 multi-primitive support
authorJeremy Cowles <jcowles@google.com>
Sun, 17 Sep 2017 17:06:57 +0000 (10:06 -0700)
committerJeremy Cowles <jcowles@google.com>
Sun, 17 Sep 2017 17:08:49 +0000 (10:08 -0700)
commitc207e745349a18da5366286d2e8a18a21e2ce41c
treed3dabce25cb2feb9d05e541db982be05310bf659
parent702bc6358eccd1ae16bf58220680c83c2e3991ce
Fix glTF 2.0 multi-primitive support

Previously, only one primitive was supported, in fact memory was corrupted
when more than one primitive was found per glTF mesh.

In this change, each primitive is unrolled as a new Assimp Mesh, resulting
in multiple Assimp meshes per node when multiple primitives exist per
glTF mesh. This is required in the general case, since glTF primitives can
have different material bindings and primitive modes.
code/glTF2Importer.cpp