Skip to content

Commit

Permalink
Merge pull request #50014 from reduz/remove-immediate
Browse files Browse the repository at this point in the history
Deprecate ImmediateGeometry
  • Loading branch information
akien-mga authored Jun 30, 2021
2 parents a02620f + 85cf99f commit 270f9d4
Show file tree
Hide file tree
Showing 32 changed files with 1,084 additions and 836 deletions.
30 changes: 26 additions & 4 deletions doc/classes/ArrayMesh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
[/csharp]
[/codeblocks]
The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown.
See also [ImmediateGeometry3D], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
See also [ImmediateMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
Expand Down Expand Up @@ -202,7 +202,31 @@
Sets a name for a given surface.
</description>
</method>
<method name="surface_update_region">
<method name="surface_update_attribute_region">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<argument index="1" name="offset" type="int">
</argument>
<argument index="2" name="data" type="PackedByteArray">
</argument>
<description>
</description>
</method>
<method name="surface_update_skin_region">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
</argument>
<argument index="1" name="offset" type="int">
</argument>
<argument index="2" name="data" type="PackedByteArray">
</argument>
<description>
</description>
</method>
<method name="surface_update_vertex_region">
<return type="void">
</return>
<argument index="0" name="surf_idx" type="int">
Expand All @@ -212,8 +236,6 @@
<argument index="2" name="data" type="PackedByteArray">
</argument>
<description>
Updates a specified region of mesh arrays on the GPU.
[b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments.
</description>
</method>
</methods>
Expand Down
113 changes: 0 additions & 113 deletions doc/classes/ImmediateGeometry3D.xml

This file was deleted.

103 changes: 103 additions & 0 deletions doc/classes/ImmediateMesh.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImmediateMesh" inherits="Mesh" version="4.0">
<brief_description>
Mesh optimized for creating geometry manually.
</brief_description>
<description>
Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode.
</description>
<tutorials>
</tutorials>
<methods>
<method name="clear_surfaces">
<return type="void">
</return>
<description>
Clear all surfaces.
</description>
</method>
<method name="surface_add_vertex">
<return type="void">
</return>
<argument index="0" name="vertex" type="Vector3">
</argument>
<description>
Add a 3D vertex using the current attributes previously set.
</description>
</method>
<method name="surface_add_vertex_2d">
<return type="void">
</return>
<argument index="0" name="vertex" type="Vector2">
</argument>
<description>
Add a 2D vertex using the current attributes previously set.
</description>
</method>
<method name="surface_begin">
<return type="void">
</return>
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
<argument index="1" name="material" type="Material" default="null">
</argument>
<description>
Begin a new surface.
</description>
</method>
<method name="surface_end">
<return type="void">
</return>
<description>
End and commit current surface. Note that surface being created will not be visible until this function is called.
</description>
</method>
<method name="surface_set_color">
<return type="void">
</return>
<argument index="0" name="color" type="Color">
</argument>
<description>
Set the color attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_normal">
<return type="void">
</return>
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
Set the normal attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_tangent">
<return type="void">
</return>
<argument index="0" name="tangent" type="Plane">
</argument>
<description>
Set the tangent attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_uv">
<return type="void">
</return>
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
Set the UV attribute that will be pushed with the next vertex.
</description>
</method>
<method name="surface_set_uv2">
<return type="void">
</return>
<argument index="0" name="uv2" type="Vector2">
</argument>
<description>
Set the UV2 attribute that will be pushed with the next vertex.
</description>
</method>
</methods>
<constants>
</constants>
</class>
2 changes: 1 addition & 1 deletion doc/classes/MeshDataTool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
AddChild(mi);
[/csharp]
[/codeblocks]
See also [ArrayMesh], [ImmediateGeometry3D] and [SurfaceTool] for procedural geometry generation.
See also [ArrayMesh], [ImmediateMesh] and [SurfaceTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
Expand Down
Loading

0 comments on commit 270f9d4

Please sign in to comment.