- image(img, lv, false);
-}
-
-void Texture2D::image(const Graphics::Image &img, unsigned lv, bool from_buffer)
-{
- unsigned w = img.get_width();
- unsigned h = img.get_height();
- PixelFormat fmt = pixelformat_from_image(img);
- storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, h, lv);
-
- PixelStore pstore = PixelStore::from_image(img);
- BindRestore _bind_ps(pstore);
-
- image(0, from_buffer ? 0 : img.get_pixels());
+ storage(pixelformat_from_image(img, use_srgb_format), img.get_width(), img.get_height(), lv);
+ image(0, img.get_pixels());