1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Small docs syntax fixes

This commit is contained in:
Max Hilbrunner
2023-05-18 14:20:53 +02:00
parent b40b35fb39
commit a521b85976
2 changed files with 3 additions and 1 deletions

View File

@@ -7,12 +7,14 @@
A mesh type optimized for creating geometry manually, similar to OpenGL 1.x immediate mode. A mesh type optimized for creating geometry manually, similar to OpenGL 1.x immediate mode.
Here's a sample on how to generate a triangular face: Here's a sample on how to generate a triangular face:
[codeblocks] [codeblocks]
[gdscript]
var mesh = ImmediateMesh.new() var mesh = ImmediateMesh.new()
mesh.surface_begin(Mesh.PRIMITIVE_TRIANGLES) mesh.surface_begin(Mesh.PRIMITIVE_TRIANGLES)
mesh.surface_add_vertex(Vector3.LEFT) mesh.surface_add_vertex(Vector3.LEFT)
mesh.surface_add_vertex(Vector3.FORWARD) mesh.surface_add_vertex(Vector3.FORWARD)
mesh.surface_add_vertex(Vector3.ZERO) mesh.surface_add_vertex(Vector3.ZERO)
mesh.surface_end() mesh.surface_end()
[/gdscript]
[/codeblocks] [/codeblocks]
[b]Note:[/b] Generating complex geometries with [ImmediateMesh] is highly inefficient. Instead, it is designed to generate simple geometry that changes often. [b]Note:[/b] Generating complex geometries with [ImmediateMesh] is highly inefficient. Instead, it is designed to generate simple geometry that changes often.
</description> </description>