diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-11-18 09:23:46 -0600 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-11-18 09:23:46 -0600 |
commit | 0a50cef7513522ea44d482df7a4d67c21f4b6c11 (patch) | |
tree | 674dc259239a02b5bf855ab2383aa971836d1a76 /servers/rendering/renderer_rd | |
parent | 7a5b1ed7365cfd1fa5d0f55e4e2e51ca3bcad7a6 (diff) | |
parent | 6e9d31f602c2c31e047db9173e728fe17706185c (diff) | |
download | redot-engine-0a50cef7513522ea44d482df7a4d67c21f4b6c11.tar.gz |
Merge pull request #98788 from Bonkahe/master
Add `multimesh_get_buffer_rd_rid` method to `RenderingServer`.
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp | 6 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index 0d468ad1e3..7537e70235 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -1997,6 +1997,12 @@ void MeshStorage::_multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_ } } +RID MeshStorage::_multimesh_get_buffer_rd_rid(RID p_multimesh) const { + MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh); + ERR_FAIL_NULL_V(multimesh, RID()); + return multimesh->buffer; +} + Vector<float> MeshStorage::_multimesh_get_buffer(RID p_multimesh) const { MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh); ERR_FAIL_NULL_V(multimesh, Vector<float>()); diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h index c14c2945bd..11962b05f4 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h @@ -651,6 +651,7 @@ public: virtual Color _multimesh_instance_get_custom_data(RID p_multimesh, int p_index) const override; virtual void _multimesh_set_buffer(RID p_multimesh, const Vector<float> &p_buffer) override; + virtual RID _multimesh_get_buffer_rd_rid(RID p_multimesh) const override; virtual Vector<float> _multimesh_get_buffer(RID p_multimesh) const override; virtual void _multimesh_set_visible_instances(RID p_multimesh, int p_visible) override; |