X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources%2Fresources.h;h=f1aec26b283b2d6cb871f551e84456ffcc8e6b1e;hb=be92396630a2065e43c21d9d1904e97014844cff;hp=293670f9cc06f78563c07a73d5cee3964bf5d781;hpb=23d4100160bfa33359ce297b6b36244abcaa5f82;p=libs%2Fgl.git diff --git a/source/resources/resources.h b/source/resources/resources.h index 293670f9..f1aec26b 100644 --- a/source/resources/resources.h +++ b/source/resources/resources.h @@ -28,10 +28,24 @@ public: Loader(Resources &); private: - void scene(const std::string &); + template + void generic(const std::string &); }; private: + template + class GenericResourceLoader: public T::GenericLoader + { + private: + Resources &resources; + + public: + GenericResourceLoader(Resources &r): T::GenericLoader(r), resources(r) { } + + protected: + virtual void type(const DataFile::Symbol &); + }; + bool srgb_conversion; ResourceManager *resource_manager; @@ -53,16 +67,16 @@ public: void set_resource_manager(ResourceManager *); protected: - template + template T *create_generic(const std::string &); Mesh *create_mesh(const std::string &); - Texture2D *create_texture2d(const std::string &); + Texture *create_texture(const std::string &); Module *create_module(const std::string &); Program *create_program(const std::string &); template - void set_debug_name(const std::string &, T &); + static void set_debug_name(const std::string &, T &); }; } // namespace GL