X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fresources%2Fresources.h;fp=source%2Fresources%2Fresources.h;h=f1aec26b283b2d6cb871f551e84456ffcc8e6b1e;hb=be92396630a2065e43c21d9d1904e97014844cff;hp=f830faaa510ff722a7dfc485195b015217efef48;hpb=6880f2eceaab2cec7882b0791dd982fe9d9c5068;p=libs%2Fgl.git diff --git a/source/resources/resources.h b/source/resources/resources.h index f830faaa..f1aec26b 100644 --- a/source/resources/resources.h +++ b/source/resources/resources.h @@ -28,11 +28,24 @@ public: Loader(Resources &); private: - template + 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; @@ -54,11 +67,11 @@ 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 &);