Skip to content

Commit 32e5fdf

Browse files
authored
Merge branch 'main' into vector-random-fix
2 parents 2b48e0a + ca90e8f commit 32e5fdf

7 files changed

Lines changed: 50 additions & 20 deletions

File tree

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@
1515
- Added `element_type` to `IntrusivePointer`, allowing it to be used with `std::pointer_types`.
1616
- Added implicit conversion of `IntrusivePointer<T>` to `T*`.
1717
- All properties and extensions from `tileset.json`, except `"root"`, are now parsed into `TilesetMetadata` when a tileset is loaded by `Cesium3DTilesSelection::Tileset`.
18+
- Added `accessorView` to `PropertyAttributePropertyView` to retrieve the underlying `AccessorView`.
1819

1920
##### Fixes :wrench:
2021

2122
- Fixed a bug in `Tileset::updateViewGroupOffline` that would cause it to get stuck in an endless loop when invoked with no frustums.
2223
- Fixed `ColorMode::Random` in `VectorStyle` producing different results each time a raster overlay tile was rendered.
24+
- Fixed a bug in `IonRasterOverlay` that would cause unnecessary extra use of Bing Maps sessions when manually reloading the raster overlay after an expired token was automatically refreshed.
25+
- Fixed a bug that could lead to a crash when using raster overlays with tilesets that use "external tilesets", such as Google Photorealistic 3D Tiles.
2326

2427
### v0.50.0 - 2025-08-01
2528

Cesium3DTilesSelection/src/RasterOverlayCollection.cpp

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,26 @@ void RasterOverlayCollection::add(
102102
// Add a placeholder for this overlay to existing geometry tiles.
103103
for (Tile& tile : this->_loadedTiles) {
104104
// The tile rectangle and geometric error don't matter for a placeholder.
105-
// - When a tile is transitioned from Unloaded to Loading, raster overlay
106-
// tiles will be mapped to the tile automatically by TilesetContentManager,
107-
// so we don't need to map the raster tiles to this unloaded or unloading
108-
// tile now.
105+
// - When a tile is transitioned from Unloaded (or FailedTemporarily) to
106+
// ContentLoading, raster overlay tiles will be mapped to the tile
107+
// automatically by TilesetContentManager, so we don't need to map the
108+
// raster tiles to this unloaded or unloading tile now.
109109
// - When a tile is already failed to load, there is no need to map the
110110
// raster tiles to the tile as it is not rendered any way
111111
TileLoadState tileState = tile.getState();
112-
if (tileState != TileLoadState::Unloaded &&
113-
tileState != TileLoadState::Unloading &&
114-
tileState != TileLoadState::Failed) {
115-
tile.getMappedRasterTiles().emplace_back(
116-
pPlaceholder->getTile(Rectangle(), glm::dvec2(0.0)),
117-
-1);
112+
if (tileState == TileLoadState::ContentLoading ||
113+
tileState == TileLoadState::ContentLoaded ||
114+
tileState == TileLoadState::Done) {
115+
// Only tiles with renderable content should have raster overlays
116+
// attached. In the ContentLoading state, we won't know yet whether the
117+
// content is renderable, so assume that it is for now and
118+
// `setTileContent` will clear them out if necessary.
119+
if (tile.getContent().isRenderContent() ||
120+
tileState == TileLoadState::ContentLoading) {
121+
tile.getMappedRasterTiles().emplace_back(
122+
pPlaceholder->getTile(Rectangle(), glm::dvec2(0.0)),
123+
-1);
124+
}
118125
}
119126
}
120127

Cesium3DTilesSelection/src/TilesetContentManager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,13 @@ UnloadTileContentResult TilesetContentManager::unloadTileContent(Tile& tile) {
12311231
return UnloadTileContentResult::Remove;
12321232
}
12331233

1234+
// Detach raster tiles first so that the renderer's tile free
1235+
// process doesn't need to worry about them.
1236+
for (RasterMappedTo3DTile& mapped : tile.getMappedRasterTiles()) {
1237+
mapped.detachFromTile(*this->_externals.pPrepareRendererResources, tile);
1238+
}
1239+
tile.getMappedRasterTiles().clear();
1240+
12341241
if (content.isExternalContent()) {
12351242
// We can unload an external content tile with one reference, because this
12361243
// represents the external content itself. Any more than that indicates
@@ -1247,13 +1254,6 @@ UnloadTileContentResult TilesetContentManager::unloadTileContent(Tile& tile) {
12471254
return UnloadTileContentResult::RemoveAndClearChildren;
12481255
}
12491256

1250-
// Detach raster tiles first so that the renderer's tile free
1251-
// process doesn't need to worry about them.
1252-
for (RasterMappedTo3DTile& mapped : tile.getMappedRasterTiles()) {
1253-
mapped.detachFromTile(*this->_externals.pPrepareRendererResources, tile);
1254-
}
1255-
tile.getMappedRasterTiles().clear();
1256-
12571257
// Unload the renderer resources and clear any raster overlay tiles. We can do
12581258
// this even if the tile can't be fully unloaded because this tile's geometry
12591259
// is being using by an async upsample operation (checked below).

CesiumGltf/include/CesiumGltf/PropertyAttributePropertyView.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ class PropertyAttributePropertyView<ElementType, false>
251251
*/
252252
int64_t size() const noexcept { return _size; }
253253

254+
/**
255+
* @brief Gets the underlying \ref AccessorView from the
256+
* PropertyAttributePropertyView.
257+
*/
258+
const AccessorView<ElementType>& accessorView() const { return _accessor; }
259+
254260
private:
255261
AccessorView<ElementType> _accessor;
256262
int64_t _size;
@@ -431,6 +437,12 @@ class PropertyAttributePropertyView<ElementType, true>
431437
*/
432438
int64_t size() const noexcept { return _size; }
433439

440+
/**
441+
* @brief Gets the underlying \ref AccessorView from the
442+
* PropertyAttributePropertyView.
443+
*/
444+
const AccessorView<ElementType>& accessorView() const { return _accessor; }
445+
434446
private:
435447
AccessorView<ElementType> _accessor;
436448
int64_t _size;

CesiumRasterOverlays/src/IonRasterOverlay.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ IonRasterOverlay::createTileProvider(
135135
auto cacheIt = endpointCache.find(url);
136136
if (cacheIt != endpointCache.end()) {
137137
cacheIt->second.accessToken = update.token;
138+
139+
// For Bing Maps endpoints, the access token is stored in the key
140+
// field instead.
141+
cacheIt->second.key = update.token;
138142
}
139143

140144
if (pHolder->pProvider) {

cmake/detect-vcpkg-triplet.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ elseif(APPLE)
3939
endif()
4040
endif()
4141
elseif(LINUX)
42-
# Assuming x64 here isn't necessarily correct, but it's the only platform we officially support.
43-
set(DETECTED_VCPKG_TRIPLET "x64-linux")
42+
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
43+
set(DETECTED_VCPKG_TRIPLET "arm64-linux")
44+
else()
45+
set(DETECTED_VCPKG_TRIPLET "x64-linux")
46+
endif()
4447
else()
4548
set(DETECTED_VCPKG_TRIPLET_ERROR "Cannot guess an appropriate value for VCPKG_TRIPLET because the operating system is unknown. Please set it manually.")
4649
endif()

cmake/macros/configure_cesium_library.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ function(configure_cesium_library targetName)
1313

1414
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
1515
# Disable dangling-reference warning due to amount of false positives: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642
16-
target_compile_options(${targetName} PRIVATE -Wno-dangling-reference)
16+
# Also disable stringop-overflow warning which causes false positives when building with aarch64-linux-gnu-g++-13
17+
target_compile_options(${targetName} PRIVATE -Wno-dangling-reference -Wno-stringop-overflow)
1718
endif()
1819

1920
if (CESIUM_GLM_STRICT_ENABLED)

0 commit comments

Comments
 (0)