]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resourcemanager.h
Implement manual loading policy and async flag
[libs/gl.git] / source / resourcemanager.h
index 49a4c0bde3a7d33b1a02da359c486257a2e9b735..1e3cb54f3b439c72fe26811ccd546d6993743327 100644 (file)
@@ -28,8 +28,12 @@ private:
                std::string name;
                IO::Seekable *io;
                Resource::AsyncLoader *loader;
+               bool loaded;
 
                ManagedResource(Resource &);
+
+               void start_loading();
+               void finish_loading();
        };
 
        class LoadingThread: public Thread
@@ -82,8 +86,10 @@ public:
        void set_async_loads(bool);
 
        void add_resource(Resource &);
+       void *get_data_for_resource(const Resource &);
        void set_resource_location(Resource &, DataFile::Collection &, const std::string &);
-       void load_resource(const Resource &);
+       void load_resource(Resource &);
+       void resource_used(const Resource &);
        void remove_resource(Resource &);
 
        void tick();