X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture.cpp;h=703ea96c5fabfddb2cb8b33c65cb8056df205f16;hb=99e833421259dd90b164a9c49d63c936c343c65f;hp=b747a2a6b0d7001b3d06e7a2811f91e93f075e78;hpb=2ba5af95fb7341b0e6b212e28d03208c6747aae5;p=libs%2Fgl.git diff --git a/source/texture.cpp b/source/texture.cpp index b747a2a6..703ea96c 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -306,14 +306,18 @@ unsigned Texture::Loader::get_levels() const #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -void Texture::Loader::external_image(const string &fn) +void Texture::Loader::load_external_image(Graphics::Image &img, const std::string &fn) { - Graphics::Image img; RefPtr io = get_collection().open_raw(fn); if(!io) throw IO::file_not_found(fn); img.load_io(*io); +} +void Texture::Loader::external_image(const string &fn) +{ + Graphics::Image img; + load_external_image(img, fn); obj.image(img, get_levels(), srgb); }