Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Streaming
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Public/Streaming/StreamableRenderResourceState.h |
Include | #include "Streaming/StreamableRenderResourceState.h" |
Syntax
struct FStreamableRenderResourceState
Remarks
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.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
union FStreamableRenderResourceState::@2490 | @2491 | |
![]() |
uint8 | AssetLODBias | The asset LOD index of the resource LOD 0. |
![]() |
uint8: 1 | bHasPendingInitHint | Whether the render resources have pending InitRHI(). |
![]() |
uint8: 1 | bHasPendingLODTransitionHint | Whether there is currently a visual LOD transition, following a streaming operation. |
![]() |
uint8: 1 | bSupportsStreaming | Whether the resource LODs can be streamed or not. |
![]() |
uint64 | Data | |
![]() |
uint8 | LODBiasModifier | An additional LOD bias modifier set during asset loading based on the current RHI feature level or other settings |
![]() |
uint8 | MaxNumLODs | The maximum number of LODs the resource can possibly have. Might be less than the asset LOD count. |
![]() |
uint8 | NumNonOptionalLODs | The number of LODs (streaming or not) that are guarantied to be installed, for example in PAKs. |
![]() |
uint8 | NumNonStreamingLODs | The number of always loaded LODs, which can not be streamed out. |
![]() |
uint8 | NumRequestedLODs | The expected number of LODs after the current streaming request completes. |
![]() |
uint8 | NumResidentLODs | The current number of LODs the resource has. Between NumNonStreamingLODs and MaxNumLODs. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
|||
![]() |
FStreamableRenderResourceState
(
const FStreamableRenderResourceState& Other |
Manually implement copy operations, because MSVC produces bad codegen for bitfields in unions (as of the 14.35.32217 toolchain) |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Clear () |
|
![]() ![]() |
bool | IsValid () |
Return whether this has any information to be relied on. |
![]() ![]() |
bool | Validate that everything is valid and makes sense for a streaming requests. | |
![]() ![]() |
int32 | LODCountToAssetFirstLODIdx
(
int32 InLODCount |
Considering the given render resource LOD count, return the corresponding first LOD index within the asset LOD array. |
![]() ![]() |
int32 | LODCountToFirstLODIdx
(
int32 InLODCount |
Considering the given render resource LOD count, return the corresponding first LOD index within the render resource LOD array. |
![]() ![]() |
int32 | Return the first requested LOD index within the render resource LOD array. | |
![]() ![]() |
int32 | Return the first resident LOD index within the render resource LOD array. | |
![]() |
bool | StreamIn
(
int32 InLODCount |
Validate that everything is valid and makes sense for a streaming requests. |
![]() |
bool | StreamOut
(
int32 InLODCount |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
void | operator=
(
const FStreamableRenderResourceState& Other |
Constants
Name | Description |
---|---|
MAX_LOD_COUNT | The maximum number of streaming LODs the streaming supports. |