Project-Pandora-Game / pandora

https://project-pandora.com
Other
11 stars 2 forks source link

[FIX] Properly cleanup mesh geometry on changes and mesh destruction #856

Closed Jomshir98 closed 2 weeks ago

Jomshir98 commented 2 weeks ago

References

None

About The Pull Request

Aims to remove memory leaks (at least the most major one currently) that happen whenever graphics updates. Also adds code to cleanup on tab unload (because browsers somehow fail to do that) and slightly refactors some bits to improve performance.

Changelog

Platform changes:
- Taught Pandora how to properly cleanup old graphics data, so Pandora should no longer use more and more memory each time graphics change
- Improved performance by reusing existing buffers whenever possible, instead of replacing them with new ones

Checklist