glTF-SDK icon indicating copy to clipboard operation
glTF-SDK copied to clipboard

Update GenerateSchemaJsonHeader.ps1 to fix linker issues when including SchemaJson.h in multiple translation units

Open chriche-ms opened this issue 6 years ago • 0 comments

The generated header SchemaJson.h has some issues:

  1. Class SchemaJson should be a namespace
  2. 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.
  3. Bracing style is not consistent with the rest of the codebase
  4. GLTF_SCHEMA_MAP should be defined in a separate .cpp file.
  5. Schema URIs shouldn't be hardcoded literals, instead move the relevant variables from Schema.h into the generated header.

chriche-ms avatar Jan 21 '19 21:01 chriche-ms