Navigation
API > API/Runtime > API/Runtime/Engine
Define the streaming capabilities of a UStreamableRenderAsset render resources. The properties defines the current render states, coherent on the gamethread for UStreamableRenderAsset::CachedSSRState. If used within render resources, like in FStreamableTextureResource::State, then it is coherent on the renderthread.
Is it only expected to be valid, if the render resource are created, with InitRHI command sent, in order to simplify logic. Also, { bSupportsStreaming, NumNonStreamingLODs, NumNonOptionalLODs, MaxNumLODs, AssetLODBias } are expected to be constant throughout the resource lifetime.
An important concept within this structure is that the resource first LOD is not required to be the first asset LOD, the offset being defined by AssetLODBias. This allows the streaming logic to ignore invalid, non relevant entries, or too many entries in the asset.
| Name | FStreamableRenderResourceState |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Streaming/StreamableRenderResourceState.h |
| Include Path | #include "Streaming/StreamableRenderResourceState.h" |
Syntax
struct FStreamableRenderResourceState
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Streaming/StreamableRenderResourceState.h | |||
FStreamableRenderResourceState
(
const FStreamableRenderResourceState& Other |
Manually implement copy operations, because MSVC produces bad codegen for bitfields in unions (as of the 14.35.32217 toolchain) | Streaming/StreamableRenderResourceState.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MAX_LOD_COUNT | const uint32 | The maximum number of streaming LODs the streaming supports. | Streaming/StreamableRenderResourceState.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetLODBias | uint8 | The asset LOD index of the resource LOD 0. | Streaming/StreamableRenderResourceState.h | |
| bHasPendingInitHint | uint8 | Whether the render resources have pending InitRHI(). | Streaming/StreamableRenderResourceState.h | |
| bHasPendingLODTransitionHint | uint8 | Whether there is currently a visual LOD transition, following a streaming operation. | Streaming/StreamableRenderResourceState.h | |
| bSupportsStreaming | uint8 | Whether the resource LODs can be streamed or not. | Streaming/StreamableRenderResourceState.h | |
| bSupportsVirtualStreaming | uint8 | Whether the resource uses virtual texture streaming. | Streaming/StreamableRenderResourceState.h | |
| Data | uint64 | Streaming/StreamableRenderResourceState.h | ||
| FStreamableRenderResourceState | union FStreamableRenderResourceState | Streaming/StreamableRenderResourceState.h | ||
| LODBiasModifier | uint8 | An additional LOD bias modifier set during asset loading based on the current RHI feature level or other settings | Streaming/StreamableRenderResourceState.h | |
| MaxNumLODs | uint8 | The maximum number of LODs the resource can possibly have. Might be less than the asset LOD count. | Streaming/StreamableRenderResourceState.h | |
| NumNonOptionalLODs | uint8 | The number of LODs (streaming or not) that are guarantied to be installed, for example in PAKs. | Streaming/StreamableRenderResourceState.h | |
| NumNonStreamingLODs | uint8 | The number of always loaded LODs, which can not be streamed out. | Streaming/StreamableRenderResourceState.h | |
| NumRequestedLODs | uint8 | The expected number of LODs after the current streaming request completes. | Streaming/StreamableRenderResourceState.h | |
| NumResidentLODs | uint8 | The current number of LODs the resource has. Between NumNonStreamingLODs and MaxNumLODs. | Streaming/StreamableRenderResourceState.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Clear() |
Streaming/StreamableRenderResourceState.h | ||
bool IsValid() |
Return whether this has any information to be relied on. | Streaming/StreamableRenderResourceState.h | |
bool IsValidForStreamingRequest() |
Validate that everything is valid and makes sense for a streaming requests. | Streaming/StreamableRenderResourceState.h | |
int32 LODCountToAssetFirstLODIdx
(
int32 InLODCount |
Considering the given render resource LOD count, return the corresponding first LOD index within the asset LOD array. | Streaming/StreamableRenderResourceState.h | |
int32 LODCountToFirstLODIdx
(
int32 InLODCount |
Considering the given render resource LOD count, return the corresponding first LOD index within the render resource LOD array. | Streaming/StreamableRenderResourceState.h | |
int32 RequestedFirstLODIdx() |
Return the first requested LOD index within the render resource LOD array. | Streaming/StreamableRenderResourceState.h | |
int32 ResidentFirstLODIdx() |
Return the first resident LOD index within the render resource LOD array. | Streaming/StreamableRenderResourceState.h | |
bool StreamIn
(
int32 InLODCount |
Validate that everything is valid and makes sense for a streaming requests. | Streaming/StreamableRenderResourceState.h | |
bool StreamOut
(
int32 InLODCount |
Streaming/StreamableRenderResourceState.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void operator=
(
const FStreamableRenderResourceState& Other |
Streaming/StreamableRenderResourceState.h |