From a49e3bb449b88bfa9eded62a86fa92ab70d588c8 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 14 Nov 2021 22:46:42 +0100 Subject: [PATCH] Document low performance when using `SurfaceTool.append_from()` in thread (cherry picked from commit f39375d315dc67e53ecdeb5964ffad59959c888f) --- doc/classes/SurfaceTool.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index f04dd3a3741..78834d4a5fc 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -113,6 +113,7 @@ Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform]. + [b]Note:[/b] Using [method append_from] on a [Thread] is much slower as the GPU must communicate data back to the CPU, while also causing the main thread to stall (as OpenGL is not thread-safe). Consider requesting a copy of the mesh, converting it to an [ArrayMesh] and adding vertices manually instead.