]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/mesh.h
Always set uniform array size to at least one
[libs/gl.git] / source / core / mesh.h
index 5544ed1f55e0e5cdf772cf9194d26bc9eabbd775..f8e1b6c1fa20f2148e582976b817109ca8e4f86c 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();
@@ -49,9 +52,9 @@ private:
        private:
                Mesh &mesh;
                IO::Seekable &io;
-               Bufferable::AsyncUpdater *vertex_updater;
-               Bufferable::AsyncUpdater *index_updater;
-               unsigned phase;
+               Bufferable::AsyncUpdater *vertex_updater = 0;
+               Bufferable::AsyncUpdater *index_updater = 0;
+               unsigned phase = 0;
 
        public:
                AsyncLoader(Mesh &, IO::Seekable &);