VideoCommon: add functionality to prepare for a custom mesh asset to be used by graphics mods #12562
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the loading logic for a mesh asset. The actual library implementation to load the mesh will be added in a subsequent PR to keep things smaller.
The idea is that meshes will be imported from a GLTF file (using a new external tinygltf) and will be stored in a Dolphin binary file that mimics the mesh data needed by Dolphin (as well as a json file, which contains metadata that is modifiable by the editor, currently a mapping between GLTF material name and Dolphin material asset).
Each part of the model file is loaded into a "chunk" which contains all the data needed to render that sub-mesh (the transform used for orientation, the material name on the original GLTF file, and the actual vertex data used to render) and the renderer just loops over all the chunks to draw the model
This logic is pulled from #12280 where there is an import menu, along with logic to render that mesh (coming later).