X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture2d.h;h=dce58a7873213e772381582e490c11363f8557b6;hp=6c089ed2fc675c27ed40edf9d07f85cffe1dd019;hb=e37851b98dde5082ee92570354746f2f92e21940;hpb=49758ab622d2e8ed4b3a60d7b9afc4abd741300c diff --git a/source/texture2d.h b/source/texture2d.h index 6c089ed2..dce58a78 100644 --- a/source/texture2d.h +++ b/source/texture2d.h @@ -22,7 +22,10 @@ public: { public: Loader(Texture2D &); + Loader(Texture2D &, Collection &); private: + void init(); + void image_data(const std::string &); void raw_data(const std::string &); void storage(PixelFormat, unsigned, unsigned); @@ -60,12 +63,12 @@ public: /** 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); + void load_image(const std::string &fn, bool srgb = false); /** Uploads an image to the texture. If storage has not been defined, it will be set to match the image. Otherwise the image must be compatible with the defined storage. */ - void image(const Graphics::Image &); + void image(const Graphics::Image &, bool srgb = false); unsigned get_width() const { return width; } unsigned get_height() const { return height; }