diff --git a/src/texture.cpp b/src/texture.cpp index bb8c55f215b..3eda70d52f6 100644 --- a/src/texture.cpp +++ b/src/texture.cpp @@ -367,7 +367,11 @@ bool texLoad(const char *fileName) } } - decalTexArr = gfx_api::context::get().loadTextureArrayFromFiles(tile_base_filepaths, gfx_api::texture_type::game_texture, mipmap_max, mipmap_max, nullptr, nullptr, "decalTexArr"); + decalTexArr = gfx_api::context::get().loadTextureArrayFromFiles(tile_base_filepaths, gfx_api::texture_type::game_texture, mipmap_max, mipmap_max, [](int width, int height, int channels) -> std::unique_ptr { + std::unique_ptr pDefaultTexture = std::unique_ptr(new iV_Image); + pDefaultTexture->allocate(width, height, channels, true); + return pDefaultTexture; + }, nullptr, "decalTexArr"); if (has_auxillary_texture_info) { if (has_nm)