]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resource.h
Pass the resource collection to async loaders
[libs/gl.git] / source / resource.h
index 625c9f93059dd122cdf2ee526d85568a839f0dce..09d60e44917eb6e6e06a4476e42b3a75d4257bcd 100644 (file)
@@ -1,12 +1,14 @@
 #ifndef MSP_GL_RESOURCE_H_
 #define MSP_GL_RESOURCE_H_
 
+#include <msp/core/inttypes.h>
 #include <msp/io/seekable.h>
 
 namespace Msp {
 namespace GL {
 
 class ResourceManager;
+class Resources;
 
 class Resource
 {
@@ -31,8 +33,11 @@ public:
        virtual ~Resource();
 
        void set_manager(ResourceManager *);
+       ResourceManager *get_manager() const { return manager; }
        void *get_manager_data() const { return manager_data; }
-       virtual AsyncLoader *load(IO::Seekable &) = 0;
+       virtual AsyncLoader *load(IO::Seekable &, const Resources * = 0) = 0;
+       virtual bool is_loaded() const;
+       virtual UInt64 get_data_size() const = 0;
        virtual void unload() = 0;
 };