mirror of
https://github.com/Relintai/voxelman.git
synced 2025-04-13 21:00:47 +02:00
Removed the mutex from build phase.
This commit is contained in:
parent
dfee0a7786
commit
b7f3b59f54
@ -58,16 +58,10 @@ _FORCE_INLINE_ void VoxelChunkDefault::set_active_build_phase_type(const VoxelCh
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool VoxelChunkDefault::get_build_phase_done() const {
|
bool VoxelChunkDefault::get_build_phase_done() const {
|
||||||
_build_phase_done_mutex->lock();
|
return _build_phase_done;
|
||||||
bool v = _build_phase_done;
|
|
||||||
_build_phase_done_mutex->unlock();
|
|
||||||
|
|
||||||
return v;
|
|
||||||
}
|
}
|
||||||
void VoxelChunkDefault::set_build_phase_done(bool value) {
|
void VoxelChunkDefault::set_build_phase_done(bool value) {
|
||||||
_build_phase_done_mutex->lock();
|
|
||||||
_build_phase_done = value;
|
_build_phase_done = value;
|
||||||
_build_phase_done_mutex->unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoxelChunkDefault::get_lod_size() const {
|
int VoxelChunkDefault::get_lod_size() const {
|
||||||
@ -956,7 +950,6 @@ VoxelChunkDefault::VoxelChunkDefault() {
|
|||||||
_margin_end = 0;
|
_margin_end = 0;
|
||||||
|
|
||||||
_build_prioritized = false;
|
_build_prioritized = false;
|
||||||
_build_phase_done_mutex = Mutex::create();
|
|
||||||
_build_phase_done = false;
|
_build_phase_done = false;
|
||||||
_build_thread = NULL;
|
_build_thread = NULL;
|
||||||
_build_step_in_progress = false;
|
_build_step_in_progress = false;
|
||||||
@ -973,8 +966,6 @@ VoxelChunkDefault::~VoxelChunkDefault() {
|
|||||||
_abort_build = true;
|
_abort_build = true;
|
||||||
wait_and_finish_thread();
|
wait_and_finish_thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
memdelete(_build_phase_done_mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoxelChunkDefault::_setup_channels() {
|
void VoxelChunkDefault::_setup_channels() {
|
||||||
|
@ -268,7 +268,6 @@ protected:
|
|||||||
bool _bake_lights;
|
bool _bake_lights;
|
||||||
|
|
||||||
bool _build_prioritized;
|
bool _build_prioritized;
|
||||||
Mutex *_build_phase_done_mutex;
|
|
||||||
bool _build_phase_done;
|
bool _build_phase_done;
|
||||||
Thread *_build_thread;
|
Thread *_build_thread;
|
||||||
bool _build_step_in_progress;
|
bool _build_step_in_progress;
|
||||||
|
Loading…
Reference in New Issue
Block a user