glTF-SDK
glTF-SDK copied to clipboard
Update GenerateSchemaJsonHeader.ps1 to fix linker issues when including SchemaJson.h in multiple translation units
The generated header SchemaJson.h has some issues:
- Class SchemaJson should be a namespace
- Schema strings (e.g. accessor_schema_json) don't follow the correct naming convention, and should either be defined in a separate .cpp or made constexpr const char[] to avoid linker issues.
- Bracing style is not consistent with the rest of the codebase
- GLTF_SCHEMA_MAP should be defined in a separate .cpp file.
- Schema URIs shouldn't be hardcoded literals, instead move the relevant variables from Schema.h into the generated header.