]> git.tdb.fi Git - libs/gl.git/blobdiff - source/resource.h
Minor fixes to texture anisotropy handling
[libs/gl.git] / source / resource.h
index 8d34c357fe6b93ba85862fd1df50b1620066a8ca..571d1ea56c54e61ab10c43ef0f10cce766f19bb3 100644 (file)
@@ -8,6 +8,7 @@ namespace Msp {
 namespace GL {
 
 class ResourceManager;
+class Resources;
 
 class Resource
 {
@@ -34,9 +35,14 @@ public:
        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 int get_load_priority() const { return 0; }
+       virtual AsyncLoader *load(IO::Seekable &, const Resources * = 0) = 0;
        virtual bool is_loaded() const;
+
+       /** Returns the amount of graphics memory used by this resource.  The
+       returned value must not change while the resource is loaded. */
        virtual UInt64 get_data_size() const = 0;
+
        virtual void unload() = 0;
 };