if(s==0)
throw out_of_range("TextureCube::image");
- BindRestore _bind(this);
if(ARB_texture_storage)
return sub_image(face, level, 0, 0, s, s, fmt, type, data);
+ BindRestore _bind(this);
glTexImage2D(face, level, ifmt, s, s, 0, fmt, type, data);
// XXX Allocation should be tracked per-face, but we'll run out of bits
if(size==0)
throw invalid_operation("TextureCube::sub_image");
+ BindRestore _bind(this);
allocate(level);
- BindRestore _bind(this);
glTexSubImage2D(face, level, x, y, wd, ht, fmt, type, data);
if(gen_mipmap && level==0)