Commit 9d06ad8f authored by Jonathan Kunstwald's avatar Jonathan Kunstwald

Reintroduce valid data flag

parent 6fb4609c
...@@ -61,6 +61,8 @@ glow::SharedVertexArray glow::assimp::Importer::LoadAndCreateMesh(std::string co ...@@ -61,6 +61,8 @@ glow::SharedVertexArray glow::assimp::Importer::LoadAndCreateMesh(std::string co
glow::SharedVertexArray glow::assimp::Importer::CreateMeshFromData(const MeshData & data) glow::SharedVertexArray glow::assimp::Importer::CreateMeshFromData(const MeshData & data)
{ {
if (!data.valid) return nullptr;
std::vector<SharedArrayBuffer> abs; std::vector<SharedArrayBuffer> abs;
if (!data.positions.empty()) if (!data.positions.empty())
...@@ -229,5 +231,6 @@ glow::assimp::Importer::MeshData glow::assimp::Importer::LoadData(std::string co ...@@ -229,5 +231,6 @@ glow::assimp::Importer::MeshData glow::assimp::Importer::LoadData(std::string co
} }
data.filename = filename; data.filename = filename;
data.valid = true;
return data; return data;
} }
...@@ -87,6 +87,7 @@ public: ...@@ -87,6 +87,7 @@ public:
std::vector<std::vector<glm::vec4>> colors; std::vector<std::vector<glm::vec4>> colors;
std::vector<uint32_t> indices; std::vector<uint32_t> indices;
std::string filename; std::string filename;
bool valid = false;
}; };
Importer(); Importer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment