]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/mesh.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / core / mesh.h
index 98a028dbc88ea8f231c039ce97dcc48834e3c347..ba2aebc76c1fd35254f66429f5035e4370d587b5 100644 (file)
@@ -27,15 +27,18 @@ a Technique and is usually the appropriate way to of rendering geometry.
 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();
@@ -80,6 +83,7 @@ private:
 public:
        Mesh() = default;
        Mesh(const VertexFormat &);
+       Mesh(Mesh &&);
        ~Mesh();
 
        /** Sets the vertex format for the mesh.  It cannot be changed once set. */
@@ -102,7 +106,7 @@ public:
 
        /** Adds a batch to the mesh.  It may be combined with the last existing
        batch if the primitive types are compatible. */
-       void add_batch(const Batch &b);
+       void add_batch(Batch &&b);
 
        const std::vector<Batch> &get_batches() const { return batches; }