void Texture2DArray::layer_image(unsigned level, unsigned z, const void *data)
{
- if(level>=levels || z>=depth)
+ if(level>=n_levels || z>=depth)
throw out_of_range("Texture2DArray::layer_image");
LinAl::Vector<unsigned, 3> size = get_level_size(level);