#ifndef MSP_GL_TEXTURE_H_
#define MSP_GL_TEXTURE_H_
+#include <msp/datafile/dynamicobjectloader.h>
#include <msp/datafile/objectloader.h>
#include <msp/graphics/image.h>
#include "pixelformat.h"
void mipmap_levels(unsigned);
};
+public:
+ class GenericLoader: public DataFile::DynamicObjectLoader<Texture>
+ {
+ friend class Texture;
+
+ public:
+ GenericLoader(Collection &c): DynamicObjectLoader<Texture>(&c) { }
+
+ protected:
+ virtual const TypeRegistry &get_type_registry() const { return get_texture_registry(); }
+ };
+
+protected:
enum FormatSwizzle
{
NO_SWIZZLE,
virtual std::uint64_t get_data_size() const { return 0; }
using TextureBackend::set_debug_name;
+
+private:
+ static GenericLoader::TypeRegistry &get_texture_registry();
};
} // namespace GL