X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexturecube.cpp;fp=source%2Fcore%2Ftexturecube.cpp;h=3f8eabb3ed8a31b86d2ad236d34cf1095ce285f4;hb=8b3e51aeff0e22d29a34772c77b8647108f58677;hp=2a15eb1bec3359a3f665e4d48c4f62392644b41f;hpb=729a477b47e97aea41f3f0b5db551f02bf70d1ee;p=libs%2Fgl.git diff --git a/source/core/texturecube.cpp b/source/core/texturecube.cpp index 2a15eb1b..3f8eabb3 100644 --- a/source/core/texturecube.cpp +++ b/source/core/texturecube.cpp @@ -126,9 +126,7 @@ void TextureCube::image(TextureCubeFace face, const Graphics::Image &img) if(w!=h) throw incompatible_data("TextureCube::image"); - PixelFormat fmt = pixelformat_from_image(img); - storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w); - + storage(pixelformat_from_image(img, use_srgb_format), w); image(face, 0, img.get_pixels()); } @@ -141,9 +139,8 @@ void TextureCube::image(const Graphics::Image &img, unsigned lv) throw incompatible_data("TextureCube::image"); h /= 6; - PixelFormat fmt = pixelformat_from_image(img); if(size==0) - storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv); + storage(pixelformat_from_image(img, use_srgb_format), w, lv); else if(w!=size || h!=size) throw incompatible_data("TextureCube::image");