Skip to content

Commit

Permalink
UE 4.26 fixes
Browse files Browse the repository at this point in the history
- StaticConstructObject using construction object
- FTexture2DResource -> FTextureResource
  • Loading branch information
getnamo committed Dec 14, 2020
1 parent 94e04b3 commit c87f441
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BLUI.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"FileVersion": 3,
"FriendlyName": "BLUI",
"Version": 3,
"VersionName": "4.0.1",
"VersionName": "4.1.0",
"Description": "Chromium Embedded Framework (CEF) powered HTML UI and HUD for Unreal Engine 4",
"Category": "UI",
"CreatedBy": "Aaron M. Shea, Getnamo, & Contributors",
Expand Down
3 changes: 2 additions & 1 deletion Source/Blu/Private/BluBluprintFunctionLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ UBluEye* UBluBlueprintFunctionLibrary::NewBluEye(UObject* WorldContextObject)
{

UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
UBluEye* Eye = Cast<UBluEye>(StaticConstructObject_Internal(UBluEye::StaticClass()));
FStaticConstructObjectParameters Params(UBluEye::StaticClass());
UBluEye* Eye = Cast<UBluEye>(StaticConstructObject_Internal(Params));

return Eye;

Expand Down
6 changes: 3 additions & 3 deletions Source/Blu/Private/BluEye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ void UBluEye::TextureUpdate(const void *buffer, FUpdateTextureRegion2D *updateRe
return;
}

FUpdateTextureRegionsData * RegionData = new FUpdateTextureRegionsData;
RegionData->Texture2DResource = (FTexture2DResource*)Texture->Resource;
FUpdateTextureRegionsData* RegionData = new FUpdateTextureRegionsData;
RegionData->Texture2DResource = (FTextureResource*)Texture->Resource;
RegionData->NumRegions = regionCount;
RegionData->SrcBpp = 4;
RegionData->SrcPitch = Settings.Width * 4;
Expand All @@ -175,7 +175,7 @@ void UBluEye::TextureUpdate(const void *buffer, FUpdateTextureRegion2D *updateRe
{
for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++)
{
RHIUpdateTexture2D(RegionData->Texture2DResource->GetTexture2DRHI(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData()
(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData()
+ RegionData->Regions[RegionIndex].SrcY * RegionData->SrcPitch
+ RegionData->Regions[RegionIndex].SrcX * RegionData->SrcBpp);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Blu/Public/BluTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct FBluTextureParams

struct FUpdateTextureRegionsData
{
FTexture2DResource* Texture2DResource;
FTextureResource* Texture2DResource;
uint32 NumRegions;
FUpdateTextureRegion2D* Regions;
uint32 SrcPitch;
Expand Down

0 comments on commit c87f441

Please sign in to comment.