Unload meshes from the CPU automatically#8132
Conversation
|
Example |
|
Given that certain assets have to be kept in RAM anyway (shaders for recompilation when specializing, dynamic meshes that are mutated from the CPU side), asset itself might need to have an ability to be "unloaded" when consumed by internal system.
If Also assets are usually managed separately (load/unload on new scene), so handle will never be removed (since it's kept inside some "resource"), And when removed, you might as well unload GPU data as well. |
|
I'm going to close this for now and come back to this after the asset rework happens. |
Objective
Solution
RenderAsset.transfer_meshes_to_gpuwill take any entity with aHandle<Mesh>component, upload the mesh to the GPU and attach a GpuMesh, and then remove the handle.GpuMeshdirectly.TODO
Changelog
Migration Guide