diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/meshoptimizer/register_types.cpp | 6 | ||||
-rw-r--r-- | modules/raycast/raycast_occlusion_cull.cpp | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/modules/meshoptimizer/register_types.cpp b/modules/meshoptimizer/register_types.cpp index 57a1b697be..597c12ed23 100644 --- a/modules/meshoptimizer/register_types.cpp +++ b/modules/meshoptimizer/register_types.cpp @@ -38,6 +38,9 @@ void register_meshoptimizer_types() { SurfaceTool::simplify_with_attrib_func = meshopt_simplifyWithAttributes; SurfaceTool::simplify_scale_func = meshopt_simplifyScale; SurfaceTool::simplify_sloppy_func = meshopt_simplifySloppy; + SurfaceTool::generate_remap_func = meshopt_generateVertexRemap; + SurfaceTool::remap_vertex_func = meshopt_remapVertexBuffer; + SurfaceTool::remap_index_func = meshopt_remapIndexBuffer; } void unregister_meshoptimizer_types() { @@ -45,4 +48,7 @@ void unregister_meshoptimizer_types() { SurfaceTool::simplify_func = nullptr; SurfaceTool::simplify_scale_func = nullptr; SurfaceTool::simplify_sloppy_func = nullptr; + SurfaceTool::generate_remap_func = nullptr; + SurfaceTool::remap_vertex_func = nullptr; + SurfaceTool::remap_index_func = nullptr; } diff --git a/modules/raycast/raycast_occlusion_cull.cpp b/modules/raycast/raycast_occlusion_cull.cpp index dd5eef8b2b..2e0d17fb28 100644 --- a/modules/raycast/raycast_occlusion_cull.cpp +++ b/modules/raycast/raycast_occlusion_cull.cpp @@ -270,13 +270,14 @@ void RaycastOcclusionCull::scenario_set_instance(RID p_scenario, RID p_instance, OccluderInstance &instance = scenario.instances[p_instance]; + bool changed = false; + if (instance.removed) { instance.removed = false; scenario.removed_instances.erase(p_instance); + changed = true; // It was removed and re-added, we might have missed some changes } - bool changed = false; - if (instance.occluder != p_occluder) { Occluder *old_occluder = occluder_owner.get_or_null(instance.occluder); if (old_occluder) { |