Skip to content

Commit ba7e242

Browse files
committed
Merge branch 'main' into tile-sse
2 parents d94cc1b + 44d5ea7 commit ba7e242

File tree

21 files changed

+1940
-604
lines changed

21 files changed

+1940
-604
lines changed

CHANGES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# Change Log
22

3+
### v0.57.0 - 2026-02-02
4+
5+
##### Additions :tada:
6+
7+
- Added an overload for `AsyncSystem::all` that supports multiple futures that resolve to different types. Futures that resolve to `void` are currently unsupported by this overload.
8+
9+
##### Fixes :wrench:
10+
11+
- Fixed a bug in `Tileset::loadMetadata` that did not account for cases where the root tile could be `nullptr`, e.g., after attempting to load a tileset from an invalid URL.
12+
- Fixed a bug that could cause an assertion failure or crash when destroying a `Cesium3DTilesSelection::Tileset` very soon after creating it using the constructor taking a custom `TilesetContentLoader` or `TilesetContentLoaderFactory`.
13+
314
### v0.56.0 - 2026-01-05
415

516
##### Breaking Changes :mega:
617

7-
- `CesiumIonClient::Connection::authorize` now returns a `CesiumUtility::Result<Connection>`. This removes the previous behavior of throwing an exception when authorization failed.
18+
- `CesiumIonClient::Connection::authorize` now returns a `CesiumUtility::Result<Connection>`. This removes the previous behavior of throwing an exception when authorization failed.
819
- `SharedAssetDepot` will no longer cache asset loads that fail with an exception / `Future` rejection, allowing them to be retried. Other types of load failures are cached as before.
920

1021
##### Additions :tada:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ endif()
194194
include("cmake/defaults.cmake")
195195

196196
project(cesium-native
197-
VERSION 0.56.0
197+
VERSION 0.57.0
198198
LANGUAGES CXX C
199199
)
200200

Cesium3DTilesSelection/include/Cesium3DTilesSelection/Tileset.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,11 @@ class CESIUM3DTILESSELECTION_API Tileset final {
119119

120120
/**
121121
* @brief A future that resolves when the details of the root tile of this
122-
* tileset are available. The root tile's content (e.g., 3D model), however,
123-
* will not necessarily be loaded yet.
122+
* tileset are available. The root tile may still be nullptr if the tileset
123+
* failed to load (e.g., from an invalid URL).
124+
*
125+
* Moreover, the root tile's content (e.g., 3D model) will not necessarily
126+
* have been loaded yet when this future resolves.
124127
*/
125128
CesiumAsync::SharedFuture<void>& getRootTileAvailableEvent();
126129

Cesium3DTilesSelection/src/Tileset.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Tileset::Tileset(
7272
_distances(),
7373
_childOcclusionProxies(),
7474
_pTilesetContentManager{
75-
new TilesetContentManager(
75+
TilesetContentManager::createFromLoader(
7676
_externals,
7777
_options,
7878
std::move(pCustomLoader),
@@ -91,7 +91,10 @@ Tileset::Tileset(
9191
_distances(),
9292
_childOcclusionProxies(),
9393
_pTilesetContentManager{
94-
new TilesetContentManager(this->_externals, this->_options, url),
94+
TilesetContentManager::createFromUrl(
95+
this->_externals,
96+
this->_options,
97+
url),
9598
},
9699
_heightRequests(),
97100
_defaultViewGroup() {}
@@ -107,7 +110,7 @@ Tileset::Tileset(
107110
_options(options),
108111
_distances(),
109112
_childOcclusionProxies(),
110-
_pTilesetContentManager{new TilesetContentManager(
113+
_pTilesetContentManager{TilesetContentManager::createFromCesiumIon(
111114
this->_externals,
112115
this->_options,
113116
ionAssetID,
@@ -125,7 +128,7 @@ Tileset::Tileset(
125128
_options(options),
126129
_distances(),
127130
_childOcclusionProxies(),
128-
_pTilesetContentManager{new TilesetContentManager(
131+
_pTilesetContentManager{TilesetContentManager::createFromLoaderFactory(
129132
_externals,
130133
_options,
131134
std::move(loaderFactory))} {}
@@ -529,11 +532,11 @@ CesiumAsync::Future<const TilesetMetadata*> Tileset::loadMetadata() {
529532
asyncSystem =
530533
this->getAsyncSystem()]() -> Future<const TilesetMetadata*> {
531534
Tile* pRoot = pManager->getRootTile();
532-
CESIUM_ASSERT(pRoot);
533535

534536
TileExternalContent* pExternal =
535-
pRoot->getContent().getExternalContent();
537+
pRoot ? pRoot->getContent().getExternalContent() : nullptr;
536538
if (!pExternal) {
539+
// Something went wrong while loading the root tile, so exit early.
537540
return asyncSystem.createResolvedFuture<const TilesetMetadata*>(
538541
nullptr);
539542
}

0 commit comments

Comments
 (0)