Skip to content

Commit

Permalink
texLoad: Use default texture generator for missing decals
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Nov 7, 2023
1 parent de77ec6 commit f7657ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<iV_Image> {
std::unique_ptr<iV_Image> pDefaultTexture = std::unique_ptr<iV_Image>(new iV_Image);
pDefaultTexture->allocate(width, height, channels, true);
return pDefaultTexture;
}, nullptr, "decalTexArr");
if (has_auxillary_texture_info)
{
if (has_nm)
Expand Down

0 comments on commit f7657ee

Please sign in to comment.