Skip to content

Commit

Permalink
More updates for changes in Native.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Oct 4, 2024
1 parent ddff9db commit edd8226
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
12 changes: 6 additions & 6 deletions Source/CesiumRuntime/Private/Cesium3DTileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2045,18 +2045,18 @@ void ACesium3DTileset::updateLastViewUpdateResultState(
}

if (this->LogAssetStats && this->_pTileset) {
const CesiumGltf::SharedAssetDepot<CesiumGltf::ImageCesium>* imageDepot =
this->_pTileset->getSharedAssetDepot().getImageDepot();
const CesiumGltf::SharedAssetDepot<CesiumGltf::ImageCesium>& imageDepot =
this->_pTileset->getSharedAssetSystem().image();
float averageAge;
size_t deletionCount;
imageDepot->getDeletionStats(averageAge, deletionCount);
imageDepot.getDeletionStats(averageAge, deletionCount);
UE_LOG(
LogCesium,
Display,
TEXT(
"Images depot: %d distinct assets, %d total usages, %d assets pending deletion, %f average age"),
imageDepot->getDistinctCount(),
imageDepot->getUsageCount(),
imageDepot.getDistinctCount(),
imageDepot.getUsageCount(),
deletionCount,
averageAge);
}
Expand Down Expand Up @@ -2235,7 +2235,7 @@ void ACesium3DTileset::Tick(float DeltaTime) {
this->UpdateLoadStatus();

if (this->_pTileset) {
this->_pTileset->getSharedAssetDepot().deletionTick();
this->_pTileset->getSharedAssetSystem().deletionTick();
}
}

Expand Down
4 changes: 2 additions & 2 deletions Source/CesiumRuntime/Private/Tests/Cesium3DTileset.spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static void setupForSharedImages(SceneGenerationContext& context) {
void tilesetPass(
SceneGenerationContext& context,
TestPass::TestingParameter parameter) {
CesiumGltf::SharedAssetDepots& assetDepot =
context.tilesets[0]->GetTileset()->getSharedAssetDepot();
CesiumGltf::SharedAssetSystem& assetSystem =
context.tilesets[0]->GetTileset()->getSharedAssetSystem();
assert(assetDepot.getImagesCount() == 2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void FCesiumFeatureIdTextureSpec::Define() {
It("constructs valid instance for texture with nonexistent texcoord attribute",
[this]() {
Image& image = model.images.emplace_back();
image.pCesium.emplace();
image.pCesium->width = image.pCesium->height = 1;
image.pCesium->channels = 1;
image.pCesium->pixelData.push_back(std::byte(42));
Expand Down Expand Up @@ -175,6 +176,7 @@ void FCesiumFeatureIdTextureSpec::Define() {
It("constructs valid instance for texture with invalid texcoord accessor",
[this]() {
Image& image = model.images.emplace_back();
image.pCesium.emplace();
image.pCesium->width = image.pCesium->height = 1;
image.pCesium->channels = 1;
image.pCesium->pixelData.push_back(std::byte(42));
Expand Down

0 comments on commit edd8226

Please sign in to comment.