- /** 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. */
- void load_image(const std::string &fn);
+ DEPRECATED void sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht,
+ PixelComponents fmt, DataType type, const void *data);
+
+ /** Updates the contents of the entire texture from an image. If storage
+ has not been defined, it will be set to match the image. Otherwise the
+ image must match the defined storage.
+
+ If srgb is true and storage is determined by this call, then an sRGB pixel
+ format will be used. */
+ virtual void image(const Graphics::Image &, unsigned lv, bool srgb = false);
+
+ using Texture::image;