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

Use multiple threads for mesh generation (#13062)

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
x2048 2022-12-27 18:44:18 +01:00 committed by GitHub
parent 03e710160f
commit 89e7f72c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 183 additions and 57 deletions

View file

@ -313,7 +313,7 @@ public:
void addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server=false, bool urgent=false);
void updateCameraOffset(v3s16 camera_offset)
{ m_mesh_update_thread.m_camera_offset = camera_offset; }
{ m_mesh_update_manager.m_camera_offset = camera_offset; }
bool hasClientEvents() const { return !m_client_event_queue.empty(); }
// Get event from queue. If queue is empty, it triggers an assertion failure.
@ -483,7 +483,7 @@ private:
RenderingEngine *m_rendering_engine;
MeshUpdateThread m_mesh_update_thread;
MeshUpdateManager m_mesh_update_manager;
ClientEnvironment m_env;
ParticleManager m_particle_manager;
std::unique_ptr<con::Connection> m_con;