Skip to content

Commit

Permalink
Cleaner construction and missing RHI command fix
Browse files Browse the repository at this point in the history
  • Loading branch information
getnamo committed Dec 14, 2020
1 parent c87f441 commit 84baf0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Source/Blu/Private/BluBluprintFunctionLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ UBluEye* UBluBlueprintFunctionLibrary::NewBluEye(UObject* WorldContextObject)
{

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

return Eye;

Expand Down
2 changes: 1 addition & 1 deletion Source/Blu/Private/BluEye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void UBluEye::TextureUpdate(const void *buffer, FUpdateTextureRegion2D *updateRe
{
for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++)
{
(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData()
RHIUpdateTexture2D(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

0 comments on commit 84baf0b

Please sign in to comment.