]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2darray.cpp
Refactor texture external image loading into a helper function
[libs/gl.git] / source / texture2darray.cpp
index c080481b106590f5a6a159be78ad1618142cf85f..4d37263c76b75c59ddb06f5e03d6e0096cd43439 100644 (file)
@@ -72,11 +72,7 @@ void Texture2DArray::Loader::init()
 void Texture2DArray::Loader::external_image(unsigned z, const string &fn)
 {
        Graphics::Image img;
-       RefPtr<IO::Seekable> io = get_collection().open_raw(fn);
-       if(!io)
-               throw IO::file_not_found(fn);
-       img.load_io(*io);
-
+       load_external_image(img, fn);
        obj.layer_image(0, z, img);
 }