diff options
| author | Juan Linietsky | 2017-06-07 18:18:55 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-06-07 18:20:04 -0300 |
| commit | 5bf810b5db953d3f58acdd2d05d5410897f41d63 (patch) | |
| tree | 15497d5b43527c997abb5c50bcba2675704431dc /scene/resources/surface_tool.cpp | |
| parent | 5f5d629c8ad654fddbf17850c6fad2999d10daf7 (diff) | |
| download | godot-5bf810b5db953d3f58acdd2d05d5410897f41d63.tar.gz godot-5bf810b5db953d3f58acdd2d05d5410897f41d63.tar.zst godot-5bf810b5db953d3f58acdd2d05d5410897f41d63.zip | |
-Added proper access to depth texture from shader
-Split Mesh into Mesh (abstrat class) and ArrayMesh, to allow to proper mesh primitives, as well as streamable meshes in the future.
Diffstat (limited to 'scene/resources/surface_tool.cpp')
| -rw-r--r-- | scene/resources/surface_tool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 4c36d79a7..60fb97c79 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -224,13 +224,13 @@ void SurfaceTool::add_index(int p_index) { index_array.push_back(p_index); } -Ref<Mesh> SurfaceTool::commit(const Ref<Mesh> &p_existing) { +Ref<ArrayMesh> SurfaceTool::commit(const Ref<ArrayMesh> &p_existing) { - Ref<Mesh> mesh; + Ref<ArrayMesh> mesh; if (p_existing.is_valid()) mesh = p_existing; else - mesh = Ref<Mesh>(memnew(Mesh)); + mesh.instance(); int varr_len = vertex_array.size(); |
