Refactor Main/Update thread communication #14

Merged
EmaMaker merged 5 commits from multithread-refactor into main 2023-10-04 14:58:11 +02:00

Introduces a message queue system to send update requests from the main thread to the update thread, so that chunk updates only happen in the update thread, but the main one can still request.
Currently only used for block picking, can be expanded by defining expanding WorldUpdateMsgType and adding switch cases in chunkmanager.

Introduces a message queue system to send update requests from the main thread to the update thread, so that chunk updates only happen in the update thread, but the main one can still request. Currently only used for block picking, can be expanded by defining expanding WorldUpdateMsgType and adding switch cases in chunkmanager.
EmaMaker added 3 commits 2023-10-04 14:51:42 +02:00
93bc0e7066 renderer: do not send empty meshes to the gpu only at creation
I feel never sending empty meshes to the GPU is the cause of the bug causing floating quads near
chunk borders when a block is placed and then destroyed.
When destroying a block in a chunk, if nearby empty chunk meshes are not updated, the old mesh is
kept, which includes a quad at the border
afdd622ec2 refactor message system between main and update threads
restores blockpicking with new multithread system
EmaMaker added 1 commit 2023-10-04 14:52:11 +02:00
EmaMaker added 1 commit 2023-10-04 14:57:35 +02:00
EmaMaker merged commit 1b4cef8958 into main 2023-10-04 14:58:11 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: EmaMaker/voxel-engine#14
There is no content yet.