Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous cleanup and code generator changes (part 2) #418

Merged
merged 6 commits into from
Jan 21, 2022
Merged

Conversation

lilleyse
Copy link
Contributor

@lilleyse lilleyse commented Dec 27, 2021

Follow up to #409

@IanLilleyT and I have been battle testing the code generator with a variety of glTF and 3D Tiles extensions. The changes have been extracted out here so that future PRs will be easier to review.

  • Handle extensions that have schema files with the same name. This is to support EXT_feature_metadata and EXT_mesh_features simultaneously. The main thing here was adding more overrides to glTF.json. This technique relies on the schema titles to be unambiguous. In the future we might need a mapping from <extension name, title> to override name.
  • Allow for multiple schemas to be processed together. This is for generating classes for tileset.schema.json and subtree.schema.json which are independent schemas but belong to the same project Cesium3DTiles.
  • Support extensions of extensions
  • Better handling of schema inheritance in the generated writers
  • Support different enum variations, like those seen in EXT_meshopt_compression and KHR_lights_punctual
  • Added autogenerated extension registration to the generated writers

Other changes

  • Renamed GltfReader::readModel, ModelReaderResult, and ReadModelOptions to GltfReader::readGltf, GltfReaderResult, and GltfReaderOptions. This is for better symmetry with the GltfWriter API in Update GltfWriter to use autogenerated files #416 and the TilesetReader and TilesetWriter APIs.
  • Added TilesetWriterOptions for writing tilesets. The only option right now is prettyPrint, which defaults to false.
  • Added CESIUM_TESTS_ENABLED option to the build system
  • Renamed some test files:
    • TestReader to TestTilesetReader
    • TestReader to TestGltfReader
    • TestModelEXT_feature_metadata to TestExtensionModelExtFeatureMetadata
  • Updated async++ so that it works in C++ 20: Replaced std::result_of with std::invoke_result for c++17 or greater Amanieu/asyncplusplus#47

@kring kring merged commit f27532c into main Jan 21, 2022
@kring kring deleted the misc-generator branch January 21, 2022 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants