| 423 | } |
| 424 | |
| 425 | void RenderingServerDefault::draw(bool p_present, double frame_step) { |
| 426 | 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()."); |
| 427 | // Needs to be done before changes is reset to 0, to not force the editor to redraw. |
| 428 | RS::get_singleton()->emit_signal(SNAME("frame_pre_draw")); |
| 429 | changes = 0; |
| 430 | if (create_thread) { |
| 431 | command_queue.push(this, &RenderingServerDefault::_draw, p_present, frame_step); |
| 432 | } else { |
| 433 | _draw(p_present, frame_step); |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | void RenderingServerDefault::tick() { |
| 438 | RSG::canvas->tick(); |
no test coverage detected