1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Set VBO hints in more places

This commit is contained in:
sfan5 2024-02-19 15:10:18 +01:00
parent fbec378869
commit 5280863300
5 changed files with 19 additions and 1 deletions

View file

@ -462,11 +462,14 @@ public:
// Create new ClientCached
auto cc = std::make_unique<ClientCached>();
// Create an inventory texture
cc->inventory_texture = NULL;
if (!inventory_image.empty())
cc->inventory_texture = tsrc->getTexture(inventory_image);
getItemMesh(client, item, &(cc->wield_mesh));
// note: vertices are modified frequently (see hud.cpp) so only indices
// can be mapped
if (auto mesh = cc->wield_mesh.mesh)
mesh->setHardwareMappingHint(scene::EHM_STATIC, scene::EBT_INDEX);
cc->palette = tsrc->getPalette(def.palette_image);