mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 10:23:28 +00:00
Add thread guard for force_draw and update relared doc
force_draw must be called from main thread
This commit is contained in:
parent
e5bacbc471
commit
b88b84ce18
2 changed files with 2 additions and 1 deletions
|
|
@ -379,6 +379,7 @@ void RenderingServerDefault::sync() {
|
|||
}
|
||||
|
||||
void RenderingServerDefault::draw(bool p_swap_buffers, double frame_step) {
|
||||
ERR_FAIL_COND_MSG(!Thread::is_main_thread(), "Manually triggering the draw function from the RenderingServer can only be done on the main thread. Call this function from the main thread or use call_deferred().");
|
||||
if (create_thread) {
|
||||
command_queue.push(this, &RenderingServerDefault::_thread_draw, p_swap_buffers, frame_step);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue