X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture1d.cpp;h=592e4d77d81e961a8e08a617f4f78400dee43a68;hp=553d4ffa8ab265f26f7d685b2c510a51bbb52286;hb=635e5dc;hpb=d0a888978ab0c2226ed5961c736c7cac551e79b1 diff --git a/source/texture1d.cpp b/source/texture1d.cpp index 553d4ffa..592e4d77 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -119,7 +119,7 @@ void Texture1D::sub_image(unsigned level, int x, unsigned wd, PixelComponents co sub_image(level, x, wd, data); } -void Texture1D::image(const Graphics::Image &img, unsigned lv, bool srgb) +void Texture1D::image(const Graphics::Image &img, unsigned lv) { if(img.get_height()!=1) throw incompatible_data("Texture1D::image"); @@ -127,7 +127,7 @@ void Texture1D::image(const Graphics::Image &img, unsigned lv, bool srgb) unsigned w = img.get_width(); PixelFormat fmt = pixelformat_from_image(img); if(width==0) - storage(make_pixelformat(get_components(fmt), get_component_type(fmt), srgb), w, lv); + storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv); else if(w!=width) throw incompatible_data("Texture1D::image");