Skip to content

Commit 84baf0b

Browse files
committed
Cleaner construction and missing RHI command fix
1 parent c87f441 commit 84baf0b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Source/Blu/Private/BluBluprintFunctionLibrary.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ UBluEye* UBluBlueprintFunctionLibrary::NewBluEye(UObject* WorldContextObject)
1212
{
1313

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

1817
return Eye;
1918

Source/Blu/Private/BluEye.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void UBluEye::TextureUpdate(const void *buffer, FUpdateTextureRegion2D *updateRe
175175
{
176176
for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++)
177177
{
178-
(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData()
178+
RHIUpdateTexture2D(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData()
179179
+ RegionData->Regions[RegionIndex].SrcY * RegionData->SrcPitch
180180
+ RegionData->Regions[RegionIndex].SrcX * RegionData->SrcBpp);
181181
}

0 commit comments

Comments
 (0)