- /**
- Loads an image from a file and uploads it to the texture. If storage() has
- not been called, the storage format will be set to match the loaded image.
- */
+ /** Updates a rectangular region of the texture. Storage must be defined
+ and allocated beforehand. The update region must be fully inside the
+ texture. */
+ void sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht,
+ PixelFormat fmt, DataType type, const void *data);
+
+ /** Loads an image from a file and uploads it to the texture. If storage
+ has not been defined, it will be set to match the loaded image. Otherwise
+ the image must be compatible with the defined storage. */