mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
refacto: RenderingEngine::get_scene_manager() is now not callable from singleton
This permits to make evidence that we have some bad object passing on various code parts. I fixed majority of them to reduce the scope of passed objects Unfortunately, for some edge cases i should have to expose ISceneManager from client, this should be fixed in the future when our POO will be cleaner client side (we have a mix of rendering and processing in majority of the client objects, it works but it's not clean)
This commit is contained in:
parent
ccdd886e27
commit
5a02c376ea
11 changed files with 28 additions and 23 deletions
|
@ -307,7 +307,8 @@ static scene::SMesh *createSpecialNodeMesh(Client *client, MapNode n,
|
|||
MeshMakeData mesh_make_data(client, false);
|
||||
MeshCollector collector;
|
||||
mesh_make_data.setSmoothLighting(false);
|
||||
MapblockMeshGenerator gen(&mesh_make_data, &collector);
|
||||
MapblockMeshGenerator gen(&mesh_make_data, &collector,
|
||||
client->getSceneManager()->getMeshManipulator());
|
||||
|
||||
if (n.getParam2()) {
|
||||
// keep it
|
||||
|
@ -538,7 +539,7 @@ void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result)
|
|||
content_t id = ndef->getId(def.name);
|
||||
|
||||
FATAL_ERROR_IF(!g_extrusion_mesh_cache, "Extrusion mesh cache is not yet initialized");
|
||||
|
||||
|
||||
scene::SMesh *mesh = nullptr;
|
||||
|
||||
// Shading is on by default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue