Skip to content

Commit

Permalink
Merge pull request #97 from miketgv/master
Browse files Browse the repository at this point in the history
UE5.4-5.5 Posible Fix
  • Loading branch information
getnamo authored Nov 23, 2024
2 parents c1b1e11 + 90cdee3 commit 3eea412
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions Source/Blu/Private/BluEye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,16 @@ void UBluEye::TextureUpdate(const void *Buffer, FUpdateTextureRegion2D *UpdateRe
FPlatformMemory::Memcpy(RegionData->SrcData.GetData(), Buffer, RegionData->SrcData.Num());

ENQUEUE_RENDER_COMMAND(UpdateBLUICommand)(
[RegionData](FRHICommandList& CommandList)
{
for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++)
[RegionData](FRHICommandList& CommandList)
{
//NB: FORCEINLINE void RHIUpdateTexture2D(FRHITexture2D* Texture, uint32 MipIndex, const struct FUpdateTextureRegion2D& UpdateRegion, uint32 SourcePitch, const uint8* SourceData)
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);
}

FMemory::Free(RegionData->Regions);
delete RegionData;
});
for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; RegionIndex++)
{
RHIUpdateTexture2D(RegionData->Texture2DResource->TextureRHI->GetTexture2D(), 0, RegionData->Regions[RegionIndex], RegionData->SrcPitch, RegionData->SrcData.GetData());
}

FMemory::Free(RegionData->Regions);
delete RegionData;
});
}
else
{
Expand Down

0 comments on commit 3eea412

Please sign in to comment.