Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::StreamingImagePool Class Referencefinal

#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::StreamingImagePoolGetRHIPool ()
 
const RHI::StreamingImagePoolGetRHIPool () 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< StreamingImagePoolFindOrCreate (const Data::Asset< StreamingImagePoolAsset > &streamingImagePoolAsset)
 

Friends

class StreamingImage
 
class ImageSystem
 

Detailed Description

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.

Member Function Documentation

◆ FindOrCreate()

static Data::Instance< StreamingImagePool > AZ::RPI::StreamingImagePool::FindOrCreate ( const Data::Asset< StreamingImagePoolAsset > &  streamingImagePoolAsset)
static

Instantiates or returns an existing runtime streaming image pool using its paired asset.

Parameters
streamingImagePoolAssetThe asset used to instantiate an instance of the streaming image pool.

◆ SetMemoryBudget()

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

◆ SetMipBias()

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]


The documentation for this class was generated from the following file: