}
-Mesh::Loader::Loader(Mesh &m, bool g):
- DataFile::ObjectLoader<Mesh>(m),
- allow_gl_calls(g)
+Mesh::Loader::Loader(Mesh &m):
+ DataFile::ObjectLoader<Mesh>(m)
{
add("batch", &Loader::batch);
add("storage", &Loader::storage);
{
// TODO use correct filename
DataFile::Parser parser(io, "async");
- Loader loader(mesh, false);
+ Loader loader(mesh);
+ loader.allow_gl_calls = false;
loader.load(parser);
}
else if(phase==1)
class Mesh: public Resource
{
friend class MeshBuilder;
+ class AsyncLoader;
public:
class Loader: public DataFile::ObjectLoader<Mesh>
{
+ friend class AsyncLoader;
+
private:
- bool allow_gl_calls;
+ bool allow_gl_calls = true;
public:
- Loader(Mesh &, bool = true);
+ Loader(Mesh &);
private:
void storage(const std::vector<VertexAttribute> &);
void vertices();