Skip to content

Commit

Permalink
Merge pull request #894 from CesiumGS/update-ue5
Browse files Browse the repository at this point in the history
Update ue5-main
  • Loading branch information
nithinp7 authored Jul 1, 2022
2 parents 62b4de2 + 0c726d4 commit 0b18a3a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,15 @@ void UScreenCreditsWidget::HandleImageRequest(
texture->SRGB = true;
texture->UpdateResource();
_textures.Add(texture);
_creditImages[id] = new FSlateImageBrush(
texture,
FVector2D(texture->PlatformData->SizeX, texture->PlatformData->SizeY));
#if ENGINE_MAJOR_VERSION >= 5
FTexturePlatformData* pPlatformData = texture->GetPlatformData();
int32 SizeX = pPlatformData->SizeX;
int32 SizeY = pPlatformData->SizeY;
#else
int32 SizeX = texture->PlatformData->SizeX;
int32 SizeY = texture->PlatformData->SizeY;
#endif
_creditImages[id] = new FSlateImageBrush(texture, FVector2D(SizeX, SizeY));
// Only update credits after all of the images are done loading.
--_numImagesLoading;
if (_numImagesLoading == 0) {
Expand All @@ -243,11 +249,15 @@ std::string UScreenCreditsWidget::LoadImage(const std::string& url) {
texture->SRGB = true;
texture->UpdateResource();
_textures.Add(texture);
_creditImages.Add(new FSlateImageBrush(
texture,
FVector2D(
texture->PlatformData->SizeX,
texture->PlatformData->SizeY)));
#if ENGINE_MAJOR_VERSION >= 5
FTexturePlatformData* pPlatformData = texture->GetPlatformData();
int32 SizeX = pPlatformData->SizeX;
int32 SizeY = pPlatformData->SizeY;
#else
int32 SizeX = texture->PlatformData->SizeX;
int32 SizeY = texture->PlatformData->SizeY;
#endif
_creditImages.Add(new FSlateImageBrush(texture, FVector2D(SizeX, SizeY)));
}
} else {
++_numImagesLoading;
Expand Down
2 changes: 1 addition & 1 deletion extern/cesium-native
Submodule cesium-native updated 1 files
+1 −4 .travis.yml

0 comments on commit 0b18a3a

Please sign in to comment.