]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturecube.cpp
Move srgb handling to storage_pixelformat_from_graphics
[libs/gl.git] / source / texturecube.cpp
index 24d02f4022b2aeac380410ea481a2e392181f8af..576f1c718b3848aa043cb165b04a578f83500a70 100644 (file)
@@ -86,10 +86,7 @@ void TextureCube::image(TextureCubeFace face, const Graphics::Image &img, bool s
                if(w!=h)
                        throw incompatible_data("TextureCube::image");
 
-               PixelFormat f = storage_pixelformat_from_graphics(img.get_format());
-               if(srgb)
-                       f = get_srgb_pixelformat(f);
-               storage(f, w);
+               storage(storage_pixelformat_from_graphics(img.get_format(), srgb), w);
        }
        else if(w!=size || h!=size)
                throw incompatible_data("TextureCube::image");