}
}
+void TextureCube::sub_image(TextureCubeFace face, unsigned level, int x, int y, unsigned wd, unsigned ht, PixelFormat fmt, DataType type, const void *data)
+{
+ if(size==0)
+ throw invalid_operation("TextureCube::sub_image");
+
+ allocate(level);
+
+ BindRestore _bind(this);
+ glTexSubImage2D(face, level, x, y, wd, ht, fmt, type, data);
+}
+
void TextureCube::image(TextureCubeFace face, const Graphics::Image &img, bool srgb)
{
unsigned w = img.get_width();