Commit 74d2d2e9 authored by Jonathan Kunstwald's avatar Jonathan Kunstwald

Reintroduce file check in instance load method

parent 90c87333
......@@ -24,6 +24,17 @@ glow::assimp::Importer::Importer() {}
glow::SharedVertexArray glow::assimp::Importer::load(const std::string& filename)
using namespace assimp;
if (!std::ifstream(filename).good())
error() << "Error loading `" << filename << "' with Assimp.";
error() << " File not found/not readable";
return nullptr;
uint32_t flags = aiProcess_SortByPType;
if (mTriangulate)
......@@ -156,7 +156,8 @@ public:
/// Each attribute gets their own buffer.
static SharedVertexArray LoadAndCreateMesh(std::string const& filename, uint32_t flags = importDefaultFlags);
/// Creates a VA from MeshData, requires OGL context and initialized GLOW on the same thread
/// Creates a VA from MeshData
/// Requires OGL context and initialized GLOW on the same thread
static SharedVertexArray CreateMeshFromData(const MeshData& data);
/// Loads MeshData from a given filename with the given importer flags
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