X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexture.h;h=154a8c030018f0087e062001ad851c8c8ae77758;hp=33e0769d65431ac8c6a25152b486ea589337fed4;hb=be92396630a2065e43c21d9d1904e97014844cff;hpb=6880f2eceaab2cec7882b0791dd982fe9d9c5068 diff --git a/source/core/texture.h b/source/core/texture.h index 33e0769d..154a8c03 100644 --- a/source/core/texture.h +++ b/source/core/texture.h @@ -1,6 +1,7 @@ #ifndef MSP_GL_TEXTURE_H_ #define MSP_GL_TEXTURE_H_ +#include #include #include #include "pixelformat.h" @@ -49,6 +50,19 @@ protected: void mipmap_levels(unsigned); }; +public: + class GenericLoader: public DataFile::DynamicObjectLoader + { + friend class Texture; + + public: + GenericLoader(Collection &c): DynamicObjectLoader(&c) { } + + protected: + virtual const TypeRegistry &get_type_registry() const { return get_texture_registry(); } + }; + +protected: enum FormatSwizzle { NO_SWIZZLE, @@ -83,6 +97,9 @@ public: virtual std::uint64_t get_data_size() const { return 0; } using TextureBackend::set_debug_name; + +private: + static GenericLoader::TypeRegistry &get_texture_registry(); }; } // namespace GL