- Conditional<BindRestore> _bind(!ARB_direct_state_access, this);
- allocate(level);
-
- PixelComponents comp = get_components(storage_fmt);
- GLenum type = get_gl_type(get_component_type(storage_fmt));
- if(ARB_direct_state_access)
- glTextureSubImage3D(id, level, x, y, z, wd, ht, dp, comp, type, data);
- else
- glTexSubImage3D(target, level, x, y, z, wd, ht, dp, comp, type, data);
-
- if(auto_gen_mipmap && level==0)
- generate_mipmap();
-}
-
-void Texture3D::sub_image(unsigned level, int x, int y, int z, unsigned wd, unsigned ht, unsigned dp, PixelComponents comp, DataType type, const void *data)
-{
- if(comp!=get_components(format) || type!=get_component_type(format))
- throw incompatible_data("Texture3D::sub_image");
- sub_image(level, x, y, z, wd, ht, dp, data);
+ Texture3DBackend::sub_image(level, x, y, z, wd, ht, dp, data);