mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Implement thread ownership change for RenderingDevice
This commit is contained in:
parent
44fa552343
commit
d5d509bbd6
3 changed files with 8 additions and 0 deletions
|
@ -370,6 +370,8 @@ Size2i RenderingServerDefault::get_maximum_viewport_size() const {
|
|||
void RenderingServerDefault::_assign_mt_ids(WorkerThreadPool::TaskID p_pump_task_id) {
|
||||
server_thread = Thread::get_caller_id();
|
||||
server_task_id = p_pump_task_id;
|
||||
// This is needed because the main RD is created on the main thread.
|
||||
RenderingDevice::get_singleton()->make_current();
|
||||
}
|
||||
|
||||
void RenderingServerDefault::_thread_exit() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue