don't use copy when iterating over primitives

This commit is contained in:
Nick Fisher
2021-09-21 16:30:22 +08:00
parent aca72e1576
commit 02a5fc5661
2 changed files with 49 additions and 19 deletions

View File

@@ -58,12 +58,14 @@ namespace gltfio {
struct GltfPrimitive {
filament::VertexBuffer *vertexBuffer;
// const std::unique_ptr<Texture> texture;
Texture* texture;
std::vector <GltfTarget> targets; // TODO: flatten this?
const char* materialName;
cgltf_size numTargets = 0;
cgltf_size numVertices = 0;
MaterialInstance* materialInstance = nullptr;
//const std::unique_ptr<MaterialInstance> materialInstance;
MaterialInstance* materialInstance;
};
struct TableEntry {