#include <StreamingImagePool.h>
Inherits AZ::Data::InstanceData.
Public Member Functions | |
AZ_INSTANCE_DATA (StreamingImagePool, "{2F87FE52-4D20-49CA-9418-E544FB450B81}") | |
AZ_CLASS_ALLOCATOR (StreamingImagePool, AZ::SystemAllocator) | |
RHI::StreamingImagePool * | GetRHIPool () |
const RHI::StreamingImagePool * | GetRHIPool () const |
uint32_t | GetImageCount () const |
Get the number of streaming images in this pool. | |
uint32_t | GetStreamableImageCount () const |
Get the number of streamable images in this pool. | |
bool | SetMemoryBudget (size_t newBudgetInBytes) |
size_t | GetMemoryBudget () const |
Returns the streaming pool's heap memory budget on device. | |
bool | IsMemoryLow () const |
Return whether the available memory is low. | |
void | SetMipBias (int16_t mipBias) |
int16_t | GetMipBias () const |
Static Public Member Functions | |
static Data::Instance< StreamingImagePool > | FindOrCreate (const Data::Asset< StreamingImagePoolAsset > &streamingImagePoolAsset) |
Friends | |
class | StreamingImage |
class | ImageSystem |
A pool of streaming images and a context for controlling streaming operations on those images.
StreamingImagePool contains both an RHI pool and a streaming controller. Streaming images associate directly to a single pool, which is used as the allocation and streaming context. The relationship is many-to-one.
Users won't need to interact directly with pools. If a streaming image is instantiated which references the pool (by asset id), the pool is automatically brought up to accommodate the request. Likewise, if a pool is no longer referenced by a streaming image, it is shut down.
|
static |
Instantiates or returns an existing runtime streaming image pool using its paired asset.
streamingImagePoolAsset | The asset used to instantiate an instance of the streaming image pool. |
bool AZ::RPI::StreamingImagePool::SetMemoryBudget | ( | size_t | newBudgetInBytes | ) |
Set the streaming pool's heap memory budget on device Return true if the pool was set to new memory budget successfully
void AZ::RPI::StreamingImagePool::SetMipBias | ( | int16_t | mipBias | ) |
Set mipmap bias to streaming images's streaming target For example, if the streaming image's streaming target is 0, and mipmap bias is 1, then the actual streaming target is 0+1 The mipBias can be a negative value. The streaming target will be clamped to [0, imageLowestMip]