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;
21 virtual ~AsyncLoader() { }
23 virtual bool needs_sync() const = 0;
24 virtual bool process() = 0;
28 ResourceManager *manager;
35 void set_manager(ResourceManager *);
36 ResourceManager *get_manager() const { return manager; }
37 void *get_manager_data() const { return manager_data; }
38 virtual int get_load_priority() const { return 0; }
39 virtual AsyncLoader *load(IO::Seekable &, const Resources * = 0) = 0;
40 virtual bool is_loaded() const;
41 virtual UInt64 get_data_size() const = 0;
42 virtual void unload() = 0;