Fix VBO hint for transparent block parts

This commit is contained in:
sfan5 2024-08-28 14:56:10 +02:00
parent 19a58745c9
commit 1298d6c020

@ -783,12 +783,15 @@ MapBlockMesh::MapBlockMesh(Client *client, MeshMakeData *data, v3s16 camera_offs
}
if (mesh) {
// Use VBO for mesh (this just would set this for ever buffer)
// Use VBO for mesh (this just would set this for every buffer)
mesh->setHardwareMappingHint(scene::EHM_STATIC);
}
}
//std::cout<<"added "<<fastfaces.getSize()<<" faces."<<std::endl;
// Transparent parts have changing indices
for (auto &it : m_transparent_triangles)
it.buffer->setHardwareMappingHint(scene::EHM_STREAM, scene::EBT_INDEX);
m_bsp_tree.buildTree(&m_transparent_triangles, data->side_length);
// Check if animation is required for this mesh