unsigned d = depth;
get_level_size(level, w, h, d);
- BindRestore _bind(this);
if(ARB_texture_storage)
return sub_image(level, 0, 0, 0, w, h, d, fmt, type, data);
+ BindRestore _bind(this);
glTexImage3D(target, level, ifmt, width, height, depth, 0, fmt, type, data);
allocated |= 1<<level;
if(width==0 || height==0 || depth==0)
throw invalid_operation("Texture3D::image");
+ BindRestore _bind(this);
allocate(level);
- BindRestore _bind(this);
glTexSubImage3D(target, level, x, y, z, wd, ht, dp, fmt, type, data);
if(gen_mipmap && level==0)