- image_(level, 0);
-}
-
-void Texture1D::image(unsigned level, const void *data)
-{
- if(width==0)
- throw invalid_operation("Texture1D::image");
- if(level>=levels)
- throw out_of_range("Texture1D::image");
-
- if(ARB_texture_storage)
- return sub_image(level, 0, get_level_size(level), data);
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(target, id);
-
- image_(level, data);
-
- if(auto_gen_mipmap && level==0)
- {
- generate_mipmap_();
- allocated |= (1<<levels)-1;
- }
-
- glBindTexture(target, 0);
-}
-
-void Texture1D::image_(unsigned level, const void *data)
-{
- if(!allocated)