- return sub_image(level, 0, 0, w, h, data);
+ {
+ LinAl::Vector<unsigned, 2> size = get_level_size(level);
+ return sub_image(level, 0, 0, size.x, size.y, data);
+ }
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(target, id);
+
+ image_(level, data);
+
+ if(auto_gen_mipmap && level==0)
+ {
+ generate_mipmap_();
+ allocated |= (1<<levels)-1;
+ }