classref: Sync with current master branch (f497156)

This commit is contained in:
Godot Organization
2023-10-28 03:18:59 +00:00
parent 1e2867c976
commit 07b5a8fb27
15 changed files with 105 additions and 44 deletions

View File

@@ -35,6 +35,15 @@ Here's a sample on how to generate a triangular face:
mesh.surface_add_vertex(Vector3.ZERO)
mesh.surface_end()
.. code-tab:: csharp
var mesh = new ImmediateMesh();
mesh.SurfaceBegin(Mesh.PrimitiveType.Triangles);
mesh.SurfaceAddVertex(Vector3.Left);
mesh.SurfaceAddVertex(Vector3.Forward);
mesh.SurfaceAddVertex(Vector3.Zero);
mesh.SurfaceEnd();
\ **Note:** Generating complex geometries with **ImmediateMesh** is highly inefficient. Instead, it is designed to generate simple geometry that changes often.