UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Texture2DMipDataProvider_IO.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4Texture2DMipDataProvider_IO.h : Implementation of FTextureMipDataProvider using cooked file IO.
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
13
19{
20public:
21
24
25 // ********************************************************
26 // ********* FTextureMipDataProvider implementation **********
27 // ********************************************************
28
29 void Init(const FTextureUpdateContext& Context, const FTextureUpdateSyncOptions& SyncOptions) final override;
30 int32 GetMips(const FTextureUpdateContext& Context, int32 StartingMipIndex, const FTextureMipInfoArray& MipInfos, const FTextureUpdateSyncOptions& SyncOptions) final override;
31 bool PollMips(const FTextureUpdateSyncOptions& SyncOptions) final override;
32 void AbortPollMips() final override;
33 void CleanUp(const FTextureUpdateSyncOptions& SyncOptions) final override;
34 void Cancel(const FTextureUpdateSyncOptions& SyncOptions) final override;
35 ETickThread GetCancelThread() const final override;
36
37protected:
38
39 // A structured with information about which file contains which mips.
45
46 // Pending async requests created in GetMips().
48
49 // The asset name, used to log IO errors.
51 // Whether async read requests must be created with high priority (executes faster).
53 // Whether async read requests where cancelled for any reasons.
54 bool bIORequestCancelled = false;
55 // Whether async read requests were required to abort through AbortPollMips().
56 bool bIORequestAborted = false;
57
58 // A callback to be executed once all IO pending requests are completed.
60
61 // Helper to configure the AsyncFileCallBack.
62 void SetAsyncFileCallback(const FTextureUpdateSyncOptions& SyncOptions);
63
64 // Release / cancel any pending async file requests.
65 void ClearIORequests();
66};
const FIoFilenameHash INVALID_IO_FILENAME_HASH
Definition BulkData.h:69
uint32 FIoFilenameHash
Definition BulkData.h:68
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition NameTypes.h:617
Definition Texture2DMipDataProvider_IO.h:19
ETickThread GetCancelThread() const final override
Definition Texture2DMipDataProvider_IO.cpp:185
FName TextureName
Definition Texture2DMipDataProvider_IO.h:50
void ClearIORequests()
Definition Texture2DMipDataProvider_IO.cpp:220
void AbortPollMips() final override
Definition Texture2DMipDataProvider_IO.cpp:161
bool bIORequestCancelled
Definition Texture2DMipDataProvider_IO.h:54
void SetAsyncFileCallback(const FTextureUpdateSyncOptions &SyncOptions)
Definition Texture2DMipDataProvider_IO.cpp:190
~FTexture2DMipDataProvider_IO()
Definition Texture2DMipDataProvider_IO.cpp:25
bool bIORequestAborted
Definition Texture2DMipDataProvider_IO.h:56
TArray< FIORequest, TInlineAllocator< MAX_TEXTURE_MIP_COUNT > > IORequests
Definition Texture2DMipDataProvider_IO.h:47
bool bPrioritizedIORequest
Definition Texture2DMipDataProvider_IO.h:52
FBulkDataIORequestCallBack AsyncFileCallBack
Definition Texture2DMipDataProvider_IO.h:59
Definition TextureMipDataProvider.h:92
ETickThread
Definition TextureMipDataProvider.h:106
Definition UniquePtr.h:107
Definition Texture.h:1219
Definition Texture2DMipDataProvider_IO.h:41
TUniquePtr< IBulkDataIORequest > BulkDataIORequest
Definition Texture2DMipDataProvider_IO.h:43
FIoFilenameHash FilenameHash
Definition Texture2DMipDataProvider_IO.h:42
Definition TextureMipDataProvider.h:65
Definition TextureMipDataProvider.h:48