1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-07 10:45:18 +01:00

Introduce array textures for node rendering (#16574)

This commit is contained in:
sfan5
2025-11-01 17:21:41 +01:00
committed by GitHub
parent 1ead48c58b
commit de5ef4ca29
31 changed files with 777 additions and 187 deletions

View File

@@ -42,8 +42,11 @@ static video::ITexture *extractTexture(const TileDef &def, const TileLayer &laye
{
// If animated take first frame from tile layer (so we don't have to handle
// that manually), otherwise look up by name.
if (!layer.empty() && (layer.material_flags & MATERIAL_FLAG_ANIMATION))
return (*layer.frames)[0].texture;
if (!layer.empty() && (layer.material_flags & MATERIAL_FLAG_ANIMATION)) {
auto *ret = (*layer.frames)[0].texture;
assert(ret->getType() == video::ETT_2D);
return ret;
}
if (!def.name.empty())
return tsrc->getTexture(def.name);
return nullptr;