NcStudios / NcEngine

NcEngine: 3D game engine written in modern C++ and Vulkan
https://ncstudios.itch.io/
MIT License
54 stars 2 forks source link

Loading assets for primitive shapes #289

Open McCallisterRomer opened 2 years ago

McCallisterRomer commented 2 years ago

The engine uses the default plane and cube assets for debug rendering and particles. Currently these are loaded in the techniques that use them. This should be made a clearer step during engine initialization, with all asset loading happening in one place.

This should also include loading all default assets, rather than just what the engine uses. It does not make sense for a use to need to load some engine-provided assets but not others.

If this creates any redundant loading in the editor, that should be cleaned up.

This was mostly addressed in #474. Shaders didn't make the cut, and #embed is the ultimate solution, once available.

McCallisterRomer commented 2 years ago

Also Environment requires loading a mesh.

McCallisterRomer commented 1 year ago

Additionally, something like #embed would be ideal here. That way we wouldn't even have to ship the files for default assets. I don't know how soon it will be available to us (c23, possibly c++26), but its worth keeping an eye one.