diff options
Diffstat (limited to 'servers/visual')
-rw-r--r-- | servers/visual/rasterizer_dummy.cpp | 3 | ||||
-rw-r--r-- | servers/visual/rasterizer_dummy.h | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 8 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.h | 1 |
5 files changed, 14 insertions, 0 deletions
diff --git a/servers/visual/rasterizer_dummy.cpp b/servers/visual/rasterizer_dummy.cpp index e32f47b3d8..c05438aef3 100644 --- a/servers/visual/rasterizer_dummy.cpp +++ b/servers/visual/rasterizer_dummy.cpp @@ -1948,6 +1948,9 @@ bool RasterizerDummy::has_feature(VS::Features p_feature) const { } +void RasterizerDummy::restore_framebuffer() { + +} RasterizerDummy::RasterizerDummy() { diff --git a/servers/visual/rasterizer_dummy.h b/servers/visual/rasterizer_dummy.h index cc3c1724a4..9249ad6256 100644 --- a/servers/visual/rasterizer_dummy.h +++ b/servers/visual/rasterizer_dummy.h @@ -779,6 +779,7 @@ public: virtual bool has_feature(VS::Features p_feature) const; + virtual void restore_framebuffer(); RasterizerDummy(); virtual ~RasterizerDummy(); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 155d10d85a..fbea60c3a6 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -454,6 +454,14 @@ AABB VisualServerRaster::mesh_get_custom_aabb(RID p_mesh) const { return rasterizer->mesh_get_custom_aabb(p_mesh); } +void VisualServerRaster::mesh_clear(RID p_mesh) { + + ERR_FAIL_COND(!rasterizer->is_mesh(p_mesh)); + while(rasterizer->mesh_get_surface_count(p_mesh)) { + rasterizer->mesh_remove_surface(p_mesh,0); + } +} + /* MULTIMESH */ diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 73298d58cd..3d8331984a 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -765,6 +765,7 @@ public: virtual void mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb); virtual AABB mesh_get_custom_aabb(RID p_mesh) const; + virtual void mesh_clear(RID p_mesh); /* MULTIMESH API */ diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index db03d82829..af88c9bdc9 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -199,6 +199,7 @@ public: FUNC2(mesh_remove_surface,RID,int); FUNC1RC(int,mesh_get_surface_count,RID); + FUNC1(mesh_clear,RID); FUNC2(mesh_set_custom_aabb,RID,const AABB&); |