diff --git a/Source/CesiumRuntime/Private/CesiumGltfTextures.cpp b/Source/CesiumRuntime/Private/CesiumGltfTextures.cpp index bc52d55bf..2d94da1a4 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfTextures.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfTextures.cpp @@ -237,7 +237,7 @@ SharedFuture createTextureInLoadThread( const ExtensionImageAssetUnreal& extension = ExtensionImageAssetUnreal::getOrCreate( asyncSystem, - *pImage->pCesium, + *pImage->pAsset, sRGB, needsMips, std::nullopt); diff --git a/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp b/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp index 3e2ccb908..abb0b99d5 100644 --- a/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp +++ b/Source/CesiumRuntime/Private/CesiumTextureUtility.cpp @@ -304,10 +304,7 @@ TUniquePtr loadTextureFromModelAnyThreadPart( model.getSafe(model.samplers, texture.sampler); TUniquePtr result = - loadTextureFromImageAndSamplerAnyThreadPart( - *image.pCesium, - sampler, - sRGB); + loadTextureFromImageAndSamplerAnyThreadPart(*image.pAsset, sampler, sRGB); if (result) { extension.pTexture = result->pTexture; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp index 36da73f40..21712ae9b 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp @@ -136,10 +136,10 @@ 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)); + image.pAsset.emplace(); + image.pAsset->width = image.pAsset->height = 1; + image.pAsset->channels = 1; + image.pAsset->pixelData.push_back(std::byte(42)); Sampler& sampler = model.samplers.emplace_back(); sampler.wrapS = Sampler::WrapS::CLAMP_TO_EDGE; @@ -176,10 +176,10 @@ 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)); + image.pAsset.emplace(); + image.pAsset->width = image.pAsset->height = 1; + image.pAsset->channels = 1; + image.pAsset->pixelData.push_back(std::byte(42)); Sampler& sampler = model.samplers.emplace_back(); sampler.wrapS = Sampler::WrapS::CLAMP_TO_EDGE; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.cpp b/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.cpp index db6ded13f..93107ac13 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.cpp @@ -70,13 +70,13 @@ CesiumGltf::FeatureId& AddFeatureIDsAsTextureToModel( const int32_t samplerWrapS, const int32_t samplerWrapT) { CesiumGltf::Image& image = model.images.emplace_back(); - image.pCesium.emplace(); - image.pCesium->bytesPerChannel = 1; - image.pCesium->channels = 1; - image.pCesium->width = imageWidth; - image.pCesium->height = imageHeight; + image.pAsset.emplace(); + image.pAsset->bytesPerChannel = 1; + image.pAsset->channels = 1; + image.pAsset->width = imageWidth; + image.pAsset->height = imageHeight; - std::vector& data = image.pCesium->pixelData; + std::vector& data = image.pAsset->pixelData; data.resize(imageWidth * imageHeight); std::memcpy(data.data(), featureIDs.data(), data.size()); diff --git a/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.h b/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.h index 270b01992..a166f8d8c 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.h +++ b/Source/CesiumRuntime/Private/Tests/CesiumGltfSpecUtility.h @@ -200,16 +200,16 @@ CesiumGltf::PropertyTextureProperty& AddPropertyTexturePropertyToModel( classProperty.componentType = componentType; CesiumGltf::Image& image = model.images.emplace_back(); - image.pCesium.emplace(); - image.pCesium->width = 2; - image.pCesium->height = 2; - image.pCesium->channels = sizeof(T); - image.pCesium->bytesPerChannel = 1; - image.pCesium->pixelData.resize(values.size() * sizeof(T)); + image.pAsset.emplace(); + image.pAsset->width = 2; + image.pAsset->height = 2; + image.pAsset->channels = sizeof(T); + image.pAsset->bytesPerChannel = 1; + image.pAsset->pixelData.resize(values.size() * sizeof(T)); std::memcpy( - image.pCesium->pixelData.data(), + image.pAsset->pixelData.data(), values.data(), - image.pCesium->pixelData.size()); + image.pAsset->pixelData.size()); CesiumGltf::Sampler& sampler = model.samplers.emplace_back(); sampler.wrapS = CesiumGltf::Sampler::WrapS::CLAMP_TO_EDGE; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp index c5dbd9862..84eb8c808 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp @@ -199,7 +199,7 @@ void CesiumTextureUtilitySpec::RunTests() { Model model; Image& image = model.images.emplace_back(); - image.pCesium = pImageAsset; + image.pAsset = pImageAsset; Sampler& sampler = model.samplers.emplace_back(); sampler.minFilter = Sampler::MinFilter::LINEAR_MIPMAP_LINEAR; @@ -232,7 +232,7 @@ void CesiumTextureUtilitySpec::RunTests() { Model model; Image& image = model.images.emplace_back(); - image.pCesium = pImageAsset; + image.pAsset = pImageAsset; Sampler& sampler1 = model.samplers.emplace_back(); sampler1.minFilter = Sampler::MinFilter::LINEAR_MIPMAP_LINEAR; @@ -299,7 +299,7 @@ void CesiumTextureUtilitySpec::RunTests() { Model model; Image& image = model.images.emplace_back(); - image.pCesium = pImageAsset; + image.pAsset = pImageAsset; Sampler& sampler = model.samplers.emplace_back(); sampler.minFilter = Sampler::MinFilter::LINEAR_MIPMAP_LINEAR; @@ -348,7 +348,7 @@ void CesiumTextureUtilitySpec::RunTests() { Model model; Image& image = model.images.emplace_back(); - image.pCesium = pImageAsset; + image.pAsset = pImageAsset; Sampler& sampler = model.samplers.emplace_back(); sampler.minFilter = Sampler::MinFilter::LINEAR_MIPMAP_LINEAR; diff --git a/extern/cesium-native b/extern/cesium-native index f9459d130..33d494863 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit f9459d1308da630e5106a762f02f4263c9daf552 +Subproject commit 33d494863457adf5187b07639fff44ef44020640