Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cleanup: Collection of cleanup tasks #201

Open
hannojg opened this issue Jun 6, 2024 · 0 comments
Open

Cleanup: Collection of cleanup tasks #201

hannojg opened this issue Jun 6, 2024 · 0 comments
Labels

Comments

@hannojg
Copy link
Member

hannojg commented Jun 6, 2024

☑️ Cleanup useDisposableResource

The function should accept:

  • simple, non async, creation functions
  • worklet functions, which automatically get executed on the worklet thread

☑️ Cleanup: EntityWrappers should use adoptEngineRef

  • EntityWrappers should become releasable
  • When an entity gets deleted engine->destroy should be call, thus call EngineWrapper creators should create an entity using adoptEngineRef
  • Make sure this causes no weird side effects, like only locally in a function scope creating an entity, and then it gets deleted while it was still added to a scene etc

☑️ Cleanup: All functions creating custom geometry should return a VertexEntity

This is needed because otherwise we leak the vertex buffers (note: the engine implementation is so nice to clean it up for us, but its better if we are explicit about it)

  • Instead of returning EntityWrapper, return VertexEntity
  • EntityWrapper should accept optional shared pointers to vertex buffers (thus holding them)
  • On release the vertex buffers should be deleted as well

☑️ Cleanup: MaterialInstance and Material should have same methods in regards to parameters

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant