diff options
Diffstat (limited to 'servers/rendering/renderer_canvas_render.h')
-rw-r--r-- | servers/rendering/renderer_canvas_render.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/servers/rendering/renderer_canvas_render.h b/servers/rendering/renderer_canvas_render.h index f08986b021..0e9ef616cb 100644 --- a/servers/rendering/renderer_canvas_render.h +++ b/servers/rendering/renderer_canvas_render.h @@ -246,10 +246,16 @@ public: RID mesh; Transform2D transform; Color modulate; + RID mesh_instance; RID texture; CommandMesh() { type = TYPE_MESH; } + ~CommandMesh() { + if (mesh_instance.is_valid()) { + RendererStorage::base_singleton->free(mesh_instance); + } + } }; struct CommandMultiMesh : public Command { @@ -262,7 +268,6 @@ public: struct CommandParticles : public Command { RID particles; - RID texture; CommandParticles() { type = TYPE_PARTICLES; } |