Merge pull request #37662 from qarmin/rasterizer_server_last
Free items before finishing rendering server
This commit is contained in:
commit
a152ef9a10
1 changed files with 11 additions and 11 deletions
|
@ -126,17 +126,6 @@ void RenderingServerWrapMT::init() {
|
||||||
|
|
||||||
void RenderingServerWrapMT::finish() {
|
void RenderingServerWrapMT::finish() {
|
||||||
|
|
||||||
if (thread) {
|
|
||||||
|
|
||||||
command_queue.push(this, &RenderingServerWrapMT::thread_exit);
|
|
||||||
Thread::wait_to_finish(thread);
|
|
||||||
memdelete(thread);
|
|
||||||
|
|
||||||
thread = nullptr;
|
|
||||||
} else {
|
|
||||||
rendering_server->finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
sky_free_cached_ids();
|
sky_free_cached_ids();
|
||||||
shader_free_cached_ids();
|
shader_free_cached_ids();
|
||||||
material_free_cached_ids();
|
material_free_cached_ids();
|
||||||
|
@ -161,6 +150,17 @@ void RenderingServerWrapMT::finish() {
|
||||||
canvas_item_free_cached_ids();
|
canvas_item_free_cached_ids();
|
||||||
canvas_light_occluder_free_cached_ids();
|
canvas_light_occluder_free_cached_ids();
|
||||||
canvas_occluder_polygon_free_cached_ids();
|
canvas_occluder_polygon_free_cached_ids();
|
||||||
|
|
||||||
|
if (thread) {
|
||||||
|
|
||||||
|
command_queue.push(this, &RenderingServerWrapMT::thread_exit);
|
||||||
|
Thread::wait_to_finish(thread);
|
||||||
|
memdelete(thread);
|
||||||
|
|
||||||
|
thread = nullptr;
|
||||||
|
} else {
|
||||||
|
rendering_server->finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingServerWrapMT::set_use_vsync_callback(bool p_enable) {
|
void RenderingServerWrapMT::set_use_vsync_callback(bool p_enable) {
|
||||||
|
|
Loading…
Reference in a new issue