X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftexture3d.cpp;h=667f8c31c1ede8dfe9c1896159eaa263385738be;hb=635e5dc;hp=13bb3ff41a4ce99164a7443406a3eb3f4ac0bf50;hpb=d0a888978ab0c2226ed5961c736c7cac551e79b1;p=libs%2Fgl.git diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 13bb3ff4..667f8c31 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -138,7 +138,7 @@ void Texture3D::sub_image(unsigned level, int x, int y, int z, unsigned wd, unsi sub_image(level, x, y, z, wd, ht, dp, data); } -void Texture3D::image(const Graphics::Image &img, unsigned lv, bool srgb) +void Texture3D::image(const Graphics::Image &img, unsigned lv) { unsigned w = img.get_width(); unsigned h = img.get_height(); @@ -161,7 +161,7 @@ void Texture3D::image(const Graphics::Image &img, unsigned lv, bool srgb) PixelFormat fmt = pixelformat_from_image(img); if(width==0) - storage(make_pixelformat(get_components(fmt), get_component_type(fmt), srgb), w, h, d, lv); + storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, h, d, lv); else if(w!=width || h!=height || d!=depth) throw incompatible_data("Texture3D::load_image");