Commit Graph

294 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
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
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
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 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 95bf6826a0
Merge pull request #880 from CesiumGS/no_stb_image_implementation
Fix STB library conflicts
2024-05-24 15:47:11 +10: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 66860989a4 Various glTF fixes, mostly meshopt related. 2024-05-06 13:53:37 +10: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 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 eeeb304926 Various glTF helper functions. 2024-04-10 15:14:11 +10:00
Kevin Ring 8c05f96f6e Various fixed to correctness of glTF generation. 2024-04-08 15:40:56 +10:00
Kevin Ring 57a9ed3e2c Move QuantizedMeshLoader to CesiumLegacyTerrain. 2024-04-04 22:15:11 +11: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 6c4f31053a Add validation statements, other tweaks 2024-02-13 13:08:30 -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
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 eb0805545e Merge remote-tracking branch 'origin/raster-overlay-refactoring' into bake-overlays-to-gltf 2023-11-29 09:32:36 +11: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 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
Janine Liu c7f01d437c Warn about EXT_feature_metadata 2023-08-30 15:28:06 -04:00
Brian Langevin f442bb4268
Merge branch 'main' into unknown-properties 2023-08-24 11:17:47 -06: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
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 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
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 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
Janine Liu 8509878a0c
Merge branch 'main' into texture-support 2023-03-23 10:57:07 -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 2079d796a4 use turbojpg for jpg decoding 2023-02-20 21:16:49 -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
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
Nithin Pranesh 0be3d30444 mipmap generation on native side 2022-05-19 14:14:01 -04:00
Nithin Pranesh 30089bcbfa fix comments, remove redundant namespace qualifiers 2022-02-14 10:42:27 -05:00
Nithin Pranesh 7a088d5165 enum -> enum class 2022-02-12 14:22:32 -05:00
Nithin Pranesh eee9351c87 use extra enum for uncompressed images rather than std::nullopt 2022-02-11 17:18:55 -05:00
Nithin Pranesh 1bd26d1e1b add some tracing 2022-02-10 15:46:16 -05:00
Nithin Pranesh 21e83e0367 add mipmap capability to image api, pass through mipmaps from ktx2 images 2022-02-07 22:53:49 -05:00
Nithin Pranesh f7c0c21208 added api for clients to report supported compressed formats
added logic to autoselect ideal compressed format based on the reported supported formats
2022-02-03 21:40:31 -05:00
Nithin Pranesh f2332d7d95 only use first mip from ktx2 textures (for now) 2022-02-02 22:20:21 -05:00
Nithin Pranesh e0b6344933 Merge branch 'main' into ktx2-nithin 2022-02-01 12:19:55 -05:00
Nithin Pranesh c07417e0ef Merge branch 'main' into asset-accessor-verb 2022-01-24 10:02:52 -05:00
Kevin Ring 518b7cbaf0 Rename IAssetAccessor methods, allow use of any verb. 2022-01-20 11:00:29 +11:00
Sean Lilley 924845a0b5 Revert padding change in GltfReader 2021-12-27 13:44:57 -05:00
Sean Lilley f14c6709e1 Misc generator improvements 2021-12-27 13:31:29 -05:00
Nithin Pranesh 1906b68bc6 fix ext_feature_metadata schema url + regenerate 2021-12-19 18:34:30 -05:00