Commit Graph

503 Commits

Author SHA1 Message Date
Ashley Rogers d612b329e0 Use template for factory so it can be moved into the future 2024-09-17 14:00:18 -04:00
Ashley Rogers 96cd924630 Update based on review 2024-09-11 14:53:52 -04:00
Ashley Rogers 7e36d6c45f Refactor to use IntrusivePointer for AssetContainer 2024-08-23 14:31:08 -04:00
Ashley Rogers 0018493071 Fix GltfReader I broke in merge 2024-08-16 15:07:30 -04:00
Ashley Rogers e79b31379c Merge with main 2024-08-16 14:13:55 -04:00
Kevin Ring ac74cc3cda
Merge pull request #820 from jherico/vcpkg-2
Second attempt at migrating packages to vcpkg
2024-08-15 09:47:09 +10:00
Janine Liu 6719722dd0
Merge branch 'main' into resolve-external-images-flag 2024-08-12 10:33:34 -04:00
Sean Lilley 95b0de6516 Added resolveExternalImages flag to GltfReaderOptions 2024-08-02 20:49:42 -06:00
Sean Lilley a109c7dacb Add removeExtensionUsed and removeExtensionRequired 2024-08-02 20:15:42 -06:00
Kevin Ring 1fcdeadfd9 Merge remote-tracking branch 'origin/main' into vcpkg-swl 2024-08-02 19:45:58 +10:00
Brian L d03181a97a Revert changes to ForEachPrimitiveInSceneXXX callbacks 2024-07-24 13:17:22 -06:00
Ashley Rogers dd8e3d0775 Merge branch 'main' of github.com:CesiumGS/cesium-native into shared-assets 2024-07-23 14:03:20 -04:00
Ashley Rogers a0954e3fbc Add test for shared images 2024-07-23 14:03:06 -04:00
Kevin Ring 8b9b001b8b
Merge branch 'main' into gltf-ray-intersect 2024-07-23 13:38:37 -04:00
Janine Liu 707dd8b770 Add missing includes 2024-07-11 10:25:23 -04:00
Ashley Rogers 40806a24c7 Add ability for images to be shared between glTFs 2024-07-10 16:00:31 -04:00
Brian L 16d18a1ceb Remove duplicate implementations of ::readFile 2024-07-08 16:12:56 -06:00
Brian L ca25ad4840 Change int to int32_t when specifying an ID 2024-07-08 15:15:44 -06:00
Brian L 728668a873 Merge branch 'main' into gltf-ray-intersect 2024-07-08 09:15:30 -06:00
Kevin Ring 7c9ea84178 Merge remote-tracking branch 'origin/main' into vcpkg-swl 2024-07-02 17:39:20 +10:00
Brian L 74653140f3 Rename to CESIUM_ASSERT 2024-06-20 10:14:38 -06:00
Brian L 91300f9a61 update from main 2024-06-20 09:54:52 -06:00
Kevin Ring ca42500d54 Merge remote-tracking branch 'origin/main' into vcpkg-2 2024-06-05 14:06:47 +10:00
Brian L aa95514762 update from main 2024-05-31 12:39:37 -06:00
Kevin Ring 264333f06a
Merge pull request #889 from CesiumGS/regenerate-gltf-schemas
Regenerate glTF schemas for metadata extensions
2024-05-24 16:47:42 +10:00
Kevin Ring 95bf6826a0
Merge pull request #880 from CesiumGS/no_stb_image_implementation
Fix STB library conflicts
2024-05-24 15:47:11 +10:00
Sean Lilley 5bb68a00a7 Regenerate glTF schemas 2024-05-23 18:22:52 -04:00
Kevin Ring 8c6635cba6 Test that meshopt decode removes the corresponding extensionUsed. 2024-05-21 22:14:22 +10:00
Kevin Ring ee822566b1 Test update of buffer byteLength to match URI length (with warning). 2024-05-21 21:57:09 +10:00
Brian L ccce2f098e Let intersectRayGltfModel HitResult return primitiveId correctly 2024-05-15 13:34:58 -06:00
Brian L 5bcfe34ded Let intersectRayGltfModel HitResult return meshId correctly 2024-05-15 13:21:11 -06:00
assiduous 409f55d1f5 Gltf Reader: use STB_IMAGE_STATIC to avoid conflicts with other libs 2024-05-09 11:03:40 -07:00
Kevin Ring c740be632d Fix failing test. 2024-05-06 19:36:52 +10:00
Kevin Ring 66860989a4 Various glTF fixes, mostly meshopt related. 2024-05-06 13:53:37 +10:00
Brian L 7eaabb0ce3 Change class generator to use ASSERT 2024-05-03 14:40:24 -06:00
Brian L 47414f09fb Make our ASSERT macro. Move everything to use this. 2024-05-03 12:50:50 -06:00
Brian L 5817d88224 Only put stb resize into own our namespace (others can stay put) 2024-04-30 18:21:24 -06:00
Brian L ff60e4c2b5 Put STB in the Cesium namespace 2024-04-30 18:10:41 -06:00
Marco Hutter 66b645413f Require warning to be generated in test 2024-04-25 17:01:52 +02:00
Marco Hutter 4c6c579013
Update README.md for spec data
Co-authored-by: Sean Lilley <lilleyse@gmail.com>
2024-04-25 16:58:32 +02:00
Marco Hutter c92578f262 Add test for GLB BIN padding byte handling 2024-04-24 15:53:05 +02:00
Marco Hutter f49d3e4d98 Allow padding bytes in GLB BIN chunk 2024-04-24 15:52:30 +02:00
Sean Lilley 46c8b9e736
Merge pull request #860 from CesiumGS/build-tweaks
Improvements to the build process
2024-04-15 10:24:38 -04:00
Kevin Ring dd35563ff8 Tweaks for the tilers build.
* Use `ktx` library instead of `ktx_read`. The former includes writing
  ability, and there's no library that includes _just_ writing.
* Move STB image resize implementation code into CesiumGltfReader
  (instead of CesiumGltfContent).
2024-04-15 09:30:05 +10:00
Kevin Ring c8f64b2c17 Add tests for postprocessGltf. 2024-04-10 21:55:28 +10:00
Kevin Ring eeeb304926 Various glTF helper functions. 2024-04-10 15:14:11 +10:00
Kevin Ring 17fd4d3452 Merge remote-tracking branch 'origin/cesium-legacy-terrain' into gltf-correctness 2024-04-10 14:59:36 +10:00
Kevin Ring 79d05a5ff7 Regenerate glTF readers. 2024-04-10 13:44:08 +10:00
Kevin Ring 2ca96da9ac Merge remote-tracking branch 'origin/main' into cesium-legacy-terrain 2024-04-10 13:31:53 +10:00
Kevin Ring 8c05f96f6e Various fixed to correctness of glTF generation. 2024-04-08 15:40:56 +10:00
Kevin Ring 66ad2c9039 Add support for CESIUM_primitive_outline extension. 2024-04-08 14:46:14 +10:00
Kevin Ring 57a9ed3e2c Move QuantizedMeshLoader to CesiumLegacyTerrain. 2024-04-04 22:15:11 +11:00
Kevin Ring 5ba8b7af35 Add CesiumLegacyTerrain library for quantized-mesh parsing. 2024-04-04 22:12:57 +11:00
Bradley Austin Davis 24d783fb01 Migrate dependencies to vcpkg 2024-02-24 00:37:37 +00:00
Kevin Ring c341a72806 Revert "Merge pull request #786 from jherico/feature-vcpkg"
This reverts commit 198ed9d4b4, reversing
changes made to 09c1eb76b4.
2024-02-23 09:08:15 +11:00
Ashley Rogers 10753a931f
Merge branch 'main' into feature-vcpkg 2024-02-20 13:44:11 -05:00
Janine Liu a40303d7f1 Re-add code so template compiles 2024-02-15 13:30:46 -05:00
Janine Liu 9e72b7eb36 Don't automatically apply transform in feature ID texture, property texture property 2024-02-15 13:23:25 -05:00
Janine Liu fb602ca425 Merge branch 'khr_texture_transform-for-extensions' into texture-transform-in-views 2024-02-13 17:03:28 -05:00
Janine Liu 49b04e0816 Merge branch 'main' into texture-transform-in-views 2024-02-13 16:44:18 -05:00
Sean Lilley 70507353af Regenerate files 2024-02-13 13:54:25 -05:00
Sean Lilley 8b65c8dc44 Merge branch 'main' into khr_texture_transform-for-extensions 2024-02-13 13:47:20 -05:00
Janine Liu 6c4f31053a Add validation statements, other tweaks 2024-02-13 13:08:30 -05:00
Sean Lilley 4ac60b45ea Remove support for EXT_feature_metadata in CesiumGltf, CesiumGltfReader, and CesiumGltfWriter 2024-02-13 12:21:02 -05:00
Janine Liu cad3f95c27 Add unit tests, use KhrTextureTransform in GltfReader 2024-02-13 11:47:06 -05:00
Janine Liu 544f318806 Fix compilation errors 2024-02-13 10:50:53 -05:00
Janine Liu 9d7c2a5dea Create KhrTextureTransform class 2024-02-13 10:45:33 -05:00
Bradley Austin Davis e20c154c55 Migrating dependencies to vcpkg 2024-02-02 10:40:59 -08:00
Sean Lilley 59a950ab0e Attach KHR_texture_transform to EXT_mesh_features and EXT_structural_metadata objects 2024-02-01 15:16:46 -05:00
Kevin Ring d0eb4c31a5 Support texture transform on occlusion and normal textures. 2024-01-31 19:51:29 +11:00
Kevin Ring 260c0f307d Update for latest main, add a test. 2023-12-19 22:57:09 +11:00
Kevin Ring b1e29de6b0 Merge remote-tracking branch 'origin/main' into load-gltf-uri 2023-12-19 21:28:00 +11:00
Kevin Ring a900fa6489 Move TestImageManipulation.cpp to the right library. 2023-11-29 09:40:36 +11:00
Kevin Ring eb0805545e Merge remote-tracking branch 'origin/raster-overlay-refactoring' into bake-overlays-to-gltf 2023-11-29 09:32:36 +11:00
Sean Lilley 7aba4a6fa3 Added test 2023-11-20 11:00:31 -05:00
Kevin Ring 761630d45a Add CesiumGltfContent library. 2023-11-15 17:20:08 +11:00
Sean Lilley c20713c1d4 Fixed crash when loading glTFs with data uri images 2023-11-08 10:05:13 -05:00
Kevin Ring c7a5c70e37 Fix case of filename. 2023-09-08 22:57:38 +10:00
Kevin Ring 2002f0d313 Add missing generated file. 2023-09-08 15:41:52 +10:00
Kevin Ring 3c05ac98b1 Merge remote-tracking branch 'origin/main' into upgrade-feature-metadata 2023-09-08 15:34:49 +10:00
Kevin Ring 710c47e8b8 Merge remote-tracking branch 'origin/upgrade-feature-metadata' into final-metadata-changes 2023-09-08 12:02:39 +10:00
Kevin Ring 309c1817fa Merge remote-tracking branch 'origin/json-read-tweaks' into generated-readers 2023-08-31 09:08:54 +10:00
Kevin Ring 77a256cc0b Merge remote-tracking branch 'origin/main' into json-read-tweaks 2023-08-31 08:59:46 +10:00
Janine Liu c7f01d437c Warn about EXT_feature_metadata 2023-08-30 15:28:06 -04:00
Kevin Ring 2babed53b1 Add tests of unknown properties in glTF. 2023-08-25 15:13:05 +10:00
Brian Langevin f442bb4268
Merge branch 'main' into unknown-properties 2023-08-24 11:17:47 -06:00
Kevin Ring b1f2650f55 Add *Reader classes to CesiumGltfReader and Cesium3DTilesReader. 2023-08-23 18:52:44 +10:00
Kevin Ring 25944b78d4 Read from radidjson::Value. 2023-08-23 15:37:02 +10:00
Joseph Kaile 410312ff32 formatting 2023-08-17 15:49:31 -04:00
Joseph Kaile e4852cdf7b fully decompress ktx texture if unable to transcode 2023-08-17 15:47:31 -04:00
Kevin Ring 07d64139a2 Rename ExtensionReaderContext to JsonReaderOptions. 2023-08-16 15:31:57 +10:00
Janine Liu ecd215bddc Merge branch 'main' into upgrade-feature-metadata 2023-08-10 15:27:24 -04:00
Joseph Kaile a2cebe04f1 add test to verify compressed vertex attributes are within range 2023-07-31 17:41:45 -04:00
Kevin Ring 5c89b3c7d3 Tiny tweaks, mostly to formatting. 2023-07-31 19:08:08 +10:00
Joseph Kaile 40d22b1b14 fix doc comments 2023-07-28 12:45:18 -04:00
Joseph Kaile 6e1c17c9a5 reorg meshopt decode 2023-07-27 22:21:26 -04:00
Joseph Kaile 65090a7327 decode filter 2023-07-26 13:50:08 -04:00
Joseph Kaile d9857303e0 fix linux compile error 2023-07-26 12:32:13 -04:00
Joseph Kaile 5cc8dff015 apply pull request comments 2023-07-25 20:32:31 -04:00
Joseph Kaile 6049f72a3f apply pull request review code changes 2023-07-25 14:26:19 -04:00
Joseph Kaile 87980fdb04 fix compile warnings 2023-07-24 17:37:56 -04:00
Joseph Kaile 7965f5d50b add more error checking 2023-07-24 15:12:50 -04:00
Joseph Kaile e0642b6f6b fix linux compile errors 2023-07-24 13:36:29 -04:00
Joseph Kaile 053846489b fix rename error 2023-07-24 11:52:37 -04:00
Joseph Kaile 643b2f1831 fix testing failure and add some performance benefits 2023-07-24 11:34:16 -04:00
Joseph Kaile 030c5462b4 add testing data and test 2023-07-21 21:52:15 -04:00
Joseph Kaile 1779ca87f3 add warning messages when meshopt fails 2023-07-21 19:04:04 -04:00
Joseph Kaile 4802c6a813 use 32 bit indices when numVertices > 65535 2023-07-21 17:27:51 -04:00
Joseph Kaile 4f4901c717 address pull request comments 2023-07-21 14:43:51 -04:00
Joseph Kaile 39b5cc79f8 fix linux compile errors 2023-07-21 12:39:14 -04:00
Kevin Ring 1c36c0e09a Merge remote-tracking branch 'origin/main' into meshopt-compression 2023-07-21 14:11:10 +10:00
Joseph Kaile 35b23187d7 transform texture coordinates on cpu 2023-07-20 15:32:43 -04:00
Janine Liu b41f6da1fc
Fix typos 2023-07-19 11:22:41 -04:00
Joseph Kaile 311489838a initial commit for meshopt-compression 2023-07-18 21:22:00 -04:00
Kevin Ring a31fe8fcd8 Fix GCC/Clang compile errors. 2023-07-07 16:54:53 +10:00
Kevin Ring 72075c3a57 Fix handling of KTX2 images without mipmaps. 2023-07-07 15:39:42 +10:00
Kevin Ring 355111dcf5 Revert "Fix handling of KTX2 images without mipmaps."
This reverts commit 930760ea95.
2023-07-07 15:37:53 +10:00
Kevin Ring 930760ea95 Fix handling of KTX2 images without mipmaps. 2023-07-07 15:37:01 +10:00
Janine Liu 55ed63a945 Regenerate EXT_structural_metadata classes without prefix 2023-06-16 16:08:35 -04:00
Janine Liu f82528cc3f Formatting, changelog entry, cleanup 2023-06-16 15:43:02 -04:00
Janine Liu e0f49321c5 Prefix EXT_feature_metadata files, rename EXT_mesh_features files 2023-06-16 15:16:05 -04:00
Tim Moore b240bd875f Make clang-format enforced change 2023-05-23 18:33:18 +02:00
Tim Moore 6129026255 Generalize loadGltf() to do all postprocessing
CesiumGltfReader::loadGltf() now mimics the actions of readGltf()
and resolves external references before calling postprocess(). It's
therefore more general, not just addressing Draco compression.
2023-05-23 17:54:07 +02:00
Tim Moore 15df61d833 return result via std::move
Suggestion from clang-format
2023-05-23 16:07:21 +02:00
Tim Moore 066de1614b run clang-format on GltfReader.h 2023-05-23 16:07:21 +02:00
Tim Moore 9e63800169 Add a function to load a glTF file
The new function GltfReader::loadGltf() loads a glTF file, resolves
external data, and does draco decompression if necessary.
2023-05-23 16:07:21 +02:00
Marco Hutter 8ffbbbab46 Update class names for materials variants extension 2023-05-02 02:05:04 +02:00
Marco Hutter 18dbbfde54 Add generated classes for `KHR_materials_variants` 2023-05-01 21:45:28 +02:00
Janine Liu 8509878a0c
Merge branch 'main' into texture-support 2023-03-23 10:57:07 -04:00
Joseph Kaile d103bb813a Revert "switch to add_subdirectory"
This reverts commit d7d3048f4f.
2023-03-15 16:09:00 -04:00
Joseph Kaile d7d3048f4f switch to add_subdirectory 2023-03-14 15:44:11 -04:00
Kevin Ring d18875641d Improve support for KTX2 and WebP textures. 2023-03-14 11:28:04 +11:00
Joseph Kaile 06a193d4a9 fix cmake syntax error, address pr comments 2023-03-05 01:55:46 -05:00
Joseph Kaile bb89c16b03 fix a mac/linux compile error 2023-02-21 14:50:09 -05:00
Joseph Kaile dae5cf4b65 skip externalproject install, use build-in-source header/lib path 2023-02-21 13:40:17 -05:00
Joseph Kaile d2662a6d48 fix turbojpeg.h not found error 2023-02-21 00:27:21 -05:00
Joseph Kaile 2079d796a4 use turbojpg for jpg decoding 2023-02-20 21:16:49 -05:00
Joseph Kaile 573025e6e0 add libjpegturbo as external project and create imported target 2023-02-20 13:47:53 -05:00
Nithin Pranesh ad429153f4 gcc/clang fix? (round 2) 2022-10-11 18:19:39 -04:00
Nithin Pranesh 8aecc718bc fix gcc / clang errors (maybe) 2022-10-11 14:39:33 -04:00
Nithin Pranesh 0fb2a43324 move mipmap generation out of readImage, integrate with gltf textures + raster imagery 2022-09-05 22:33:34 -04:00
Nithin Pranesh b72007722a Merge branch 'main' into mipmaps 2022-09-05 10:06:29 -04:00
Nithin Pranesh 30a16320e7 regenerate webp extension 2022-08-31 12:34:43 -04:00
Nithin Pranesh 320ffa91d9 add webp extension 2022-08-31 12:06:11 -04:00
Nithin Pranesh 7c1f3ee45d
Merge branch 'main' into webp-support 2022-08-30 23:21:30 -04:00
Sean Lilley 5ba6cb6535 Add KHR_texture_transform extension 2022-08-28 13:32:20 -04:00
Joseph Kaile f404003e68 only decode with alpha channel 2022-08-18 15:42:34 -04:00
Joseph Kaile 1f49447a96 use decodeInto instead of decode 2022-08-18 15:25:57 -04:00
Joseph Kaile 0939ef9130 redo isWebP function 2022-08-18 13:10:29 -04:00
Joseph Kaile fe5588ddf7 addng webp parsing to gltf image reader 2022-08-17 17:52:34 -04:00