- image(level, 0);
-}
-
-void Texture2D::image(unsigned level, const void *data)
-{
- if(width==0 || height==0)
- throw invalid_operation("Texture2D::image");
- if(level>=levels)
- throw out_of_range("Texture2D::image");
-
- LinAl::Vector<unsigned, 2> size = get_level_size(level);
-
- if(ARB_texture_storage)
- return sub_image(level, 0, 0, size.x, size.y, data);
-
- bind_scratch();
-
- if(!allocated)