Skip to content

BatchedMesh: deleteGeometry - how to re-activate? #27985

@marwie

Description

@marwie

Description

When I call deleteGeometry the instance is marked as inactive
But how can I use this already allocated space in the buffers again?

  • addGeometry will not re-use available space ad the moment
  • calling setGeometry will not activate the instance again

Solution

Keep track of freed space / search all inactive holes and try to re-use it when calling addGeometry

Alternatives

  • User code keeps track of freed space and setGeometry will also set active[index] true
  • setVisibleAt also sets active to true again
  • add setActiveAt + an API to query available space at index x (could be a generator method or some mechanism to prevent accidental mutation of internal state)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions