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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user