+void Texture2D::Loader::storage(PixelFormat fmt, unsigned w, unsigned h)
+{
+ obj.storage(fmt, w, h);
+}
+
+void Texture2D::Loader::storage_levels(PixelFormat fmt, unsigned w, unsigned h, unsigned l)
+{
+ obj.storage(fmt, w, h, l);
+}
+
+
+Texture2D::AsyncTransfer::AsyncTransfer(Texture2D &t, unsigned l, unsigned x_, unsigned y_, unsigned wd, unsigned ht):
+ texture(&t),
+ level(l),
+ x(x_),
+ y(y_),
+ width(wd),
+ height(ht),
+ data_size(width*height*get_pixel_size(texture->storage_fmt)),
+ dest_addr(0)
+{
+ dest_addr = allocate();
+}
+
+Texture2D::AsyncTransfer::AsyncTransfer(AsyncTransfer &&other):
+ Texture2DBackend::AsyncTransfer(move(other)),
+ texture(other.texture),
+ level(other.level),
+ x(other.x),
+ y(other.y),
+ width(other.width),
+ height(other.height),
+ data_size(other.data_size),
+ dest_addr(other.dest_addr)
+{
+ other.dest_addr = 0;
+}
+
+Texture2D::AsyncTransfer &Texture2D::AsyncTransfer::operator=(AsyncTransfer &&other)