sub_image(face, level, x, y, wd, ht, data);
}
-void TextureCube::image(TextureCubeFace face, const Graphics::Image &img, bool srgb)
+void TextureCube::image(TextureCubeFace face, const Graphics::Image &img)
{
unsigned w = img.get_width();
unsigned h = img.get_height();
if(w!=h)
throw incompatible_data("TextureCube::image");
- storage(make_pixelformat(get_components(fmt), get_component_type(fmt), srgb), w);
+ storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w);
}
else if(w!=size || h!=size)
throw incompatible_data("TextureCube::image");
image(face, 0, img.get_data());
}
-void TextureCube::image(const Graphics::Image &img, unsigned lv, bool srgb)
+void TextureCube::image(TextureCubeFace face, const Graphics::Image &img, bool)
+{
+ image(face, img);
+}
+
+void TextureCube::image(const Graphics::Image &img, unsigned lv)
{
unsigned w = img.get_width();
unsigned h = img.get_height();
PixelFormat fmt = pixelformat_from_image(img);
if(size==0)
- storage(make_pixelformat(get_components(fmt), get_component_type(fmt), srgb), w, lv);
+ storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv);
else if(w!=size || h!=size)
throw incompatible_data("TextureCube::image");
RefPtr<IO::Seekable> io = get_collection().open_raw(fn);
img.load_io(*io);
- obj.image(face, img, srgb);
+ obj.image(face, img);
}
void TextureCube::Loader::image_data(TextureCubeFace face, const string &data)
IO::Memory mem(data.data(), data.size());
img.load_io(mem);
- obj.image(face, img, srgb);
+ obj.image(face, img);
}
void TextureCube::Loader::raw_data(TextureCubeFace face, const string &data)