CollectionObjectLoader<Texture>(t, c),
levels(0)
{
- add("external_image", &Loader::external_image);
- add("external_image_srgb", &Loader::external_image_srgb);
+ add("external_image", &Loader::external_image, false);
+ add("external_image_srgb", &Loader::external_image, true);
add("generate_mipmap", &Loader::generate_mipmap);
add("image_data", &Loader::image_data);
add("mipmap_levels", &Loader::mipmap_levels);
img.load_io(*io);
}
-void Texture::Loader::external_image(const string &fn)
-{
- obj.use_srgb_format = false;
- external_image_common(fn);
-}
-
-void Texture::Loader::external_image_srgb(const string &fn)
-{
- obj.use_srgb_format = true;
- external_image_common(fn);
-}
-
-void Texture::Loader::external_image_common(const string &fn)
+void Texture::Loader::external_image(bool srgb, const string &fn)
{
+ obj.use_srgb_format = srgb;
if(obj.manager)
obj.manager->set_resource_location(obj, get_collection(), fn);
else
void load_external_image(Graphics::Image &, const std::string &);
private:
- void external_image(const std::string &);
- void external_image_srgb(const std::string &);
- void external_image_common(const std::string &);
+ void external_image(bool, const std::string &);
void generate_mipmap(bool);
void image_data(const std::string &);
void mipmap_levels(unsigned);