Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use the Assets plugin for handling RenderMesh creation #1413

Open
RiscadoA opened this issue Dec 16, 2024 · 0 comments
Open

Use the Assets plugin for handling RenderMesh creation #1413

RiscadoA opened this issue Dec 16, 2024 · 0 comments
Labels
A-Engine B-Assets B-Rendering B-Voxels P-Urgent This issue is a big priority, and it would be good to close it ASAP

Comments

@RiscadoA
Copy link
Member

Problem

Currently, the render mesh plugin is a bit (very) cursed because it performs reference counting and garbage collecting on the created render meshes. This is the kind of task that the assets plugin was created to solve. We shouldn't duplicate its logic.

Solution

We could make the render meshes assets.
E.g., RenderMesh would be an asset, loaded by a RenderMeshBridge, associated to the .mesh format, or something like that.
The .mesh.meta would specify the original source which produces this mesh, which would be used to generate the mesh, instead of loading it from a .mesh file - i.e., the .mesh file doesn't exist in this case, only the .meta.

We should make sure that it is still easy to procedurally generate grids and create render meshes from them. I think that with this change it would be very weird, we might need to add some method to Assets to create a new asset with a given .meta and call the corresponding bridge, or something like that 🤔

@RiscadoA RiscadoA added A-Engine B-Assets B-Rendering B-Voxels P-Urgent This issue is a big priority, and it would be good to close it ASAP labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Engine B-Assets B-Rendering B-Voxels P-Urgent This issue is a big priority, and it would be good to close it ASAP
Projects
None yet
Development

No branches or pull requests

1 participant