X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture1d.cpp;fp=source%2Fcore%2Ftexture1d.cpp;h=76ff946fc45959f58af87dfa93851c5c2f0a3327;hb=8b3e51aeff0e22d29a34772c77b8647108f58677;hp=3fd1ae0955e88c1d432219506fe960db9e4ecdd2;hpb=729a477b47e97aea41f3f0b5db551f02bf70d1ee;p=libs%2Fgl.git diff --git a/source/core/texture1d.cpp b/source/core/texture1d.cpp index 3fd1ae09..76ff946f 100644 --- a/source/core/texture1d.cpp +++ b/source/core/texture1d.cpp @@ -85,10 +85,7 @@ void Texture1D::image(const Graphics::Image &img, unsigned lv) if(img.get_height()!=1) throw incompatible_data("Texture1D::image"); - unsigned w = img.get_width(); - PixelFormat fmt = pixelformat_from_image(img); - storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv); - + storage(pixelformat_from_image(img, use_srgb_format), img.get_width(), lv); image(0, img.get_pixels()); }