[WIP] Zero-copy importer plugin APIs #240
Depends on #371.
The end goal for this:
Better for checking accidents, as picking a wrong primitive / index type can lead to *serious* rendering issues. Similarly to a change done to (Compressed)PixelFormat in 2019.10.
Otherwise they take up too much space.
With API analogous to the (relatively) new AnimationData -- with one buffer containing all index data and one buffer containing all vertex data, both meant to be uploaded as-is to the GPU. This will eventually replace MeshData2D and MeshData3D, backwards compatibility and wiring up to other APIs will be done in follow-up commits.
Deprecating of the old ones comes later.
Follows the change done in 954798a.
This was designed mainly to avoid one extra allocation in the MeshData -> MeshData2D/3D backwards compatibility conversion constructors, but I think it could have uses outside of there as well -- sometimes you just don't want to branch around all possible underlying types when working on vertex data.
So users aren't force to specify everything on their own. It makes the test code a bit less painful. But just a bit.
Easier to write. Need to take extra care with default deleters.
For backwards compatibility these will delegate to the new MeshData interfaces for 3D (and nothing for 2D, because so far there were no 2D scene importers).
There's a ton of parameters and it's just unreadable without.
TODO: normal generation (needs interleave() to operate on MeshData directly, and a way to make room for the normal data there)
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.