X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture2darray.cpp;h=1ecb4cf2be69e1b34a28f1f8b8cea643b84e2325;hp=c080481b106590f5a6a159be78ad1618142cf85f;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hpb=2ba5af95fb7341b0e6b212e28d03208c6747aae5 diff --git a/source/texture2darray.cpp b/source/texture2darray.cpp index c080481b..1ecb4cf2 100644 --- a/source/texture2darray.cpp +++ b/source/texture2darray.cpp @@ -48,7 +48,7 @@ void Texture2DArray::layer_image(unsigned level, unsigned z, const Graphics::Ima PixelStore pstore = PixelStore::from_image(img); BindRestore _bind_ps(pstore); - layer_image(level, z, img.get_data()); + layer_image(level, z, img.get_pixels()); } @@ -72,11 +72,7 @@ void Texture2DArray::Loader::init() void Texture2DArray::Loader::external_image(unsigned z, const string &fn) { Graphics::Image img; - RefPtr 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); }