1 #ifndef MSP_GL_RESOURCE_H_
2 #define MSP_GL_RESOURCE_H_
4 #include <msp/core/inttypes.h>
5 #include <msp/io/seekable.h>
10 class ResourceManager;
20 virtual ~AsyncLoader() { }
22 virtual bool needs_sync() const = 0;
23 virtual bool process() = 0;
27 ResourceManager *manager;
34 void set_manager(ResourceManager *);
35 ResourceManager *get_manager() const { return manager; }
36 void *get_manager_data() const { return manager_data; }
37 virtual AsyncLoader *load(IO::Seekable &) = 0;
38 virtual UInt64 get_data_size() const = 0;
39 virtual void unload() = 0;