1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

ability to run 2D physics in a thread

also, 2D physics is now thread safe too.
see physics_2d/thread_model
This commit is contained in:
Juan Linietsky
2015-05-26 01:05:08 -03:00
parent 3826b66a6e
commit 9df77d2765
24 changed files with 1220 additions and 573 deletions

View File

@@ -187,8 +187,8 @@ VisualServerWrapMT::VisualServerWrapMT(VisualServer* p_contained,bool p_create_t
draw_pending=0;
draw_thread_up=false;
alloc_mutex=Mutex::create();
texture_pool_max_size=GLOBAL_DEF("render/thread_textures_prealloc",20);
mesh_pool_max_size=GLOBAL_DEF("render/thread_meshes_prealloc",20);
texture_pool_max_size=GLOBAL_DEF("render/thread_textures_prealloc",5);
mesh_pool_max_size=GLOBAL_DEF("core/rid_pool_prealloc",20);
if (!p_create_thread) {
server_thread=Thread::get_caller_ID();
} else {