You've already forked godot
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:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user