#include <StreamingImageAssetCreator.h>
Inherits AZ::RPI::AssetCreator< StreamingImageAsset >.
Public Member Functions | |
void | Begin (const Data::AssetId &assetId) |
void | SetImageDescriptor (const RHI::ImageDescriptor &imageDescriptor) |
Assigns the default image descriptor. | |
void | SetImageViewDescriptor (const RHI::ImageViewDescriptor &imageViewDescriptor) |
Assigns the default image view descriptor. | |
void | AddMipChainAsset (ImageMipChainAsset &mipChainAsset) |
void | SetPoolAssetId (const Data::AssetId &poolAssetId) |
void | SetFlags (StreamingImageFlags flag) |
Set streaming image asset's flags. | |
void | SetAverageColor (Color avgColor) |
Set the average color of the image. | |
void | AddTag (AZ::Name tag) |
bool | End (Data::Asset< StreamingImageAsset > &result) |
Public Member Functions inherited from AZ::RPI::AssetCreator< StreamingImageAsset > | |
void | SetElevateWarnings (bool elevated) |
When true, treat all subsequent warnings as errors. Any warnings already reported will not be elevated. | |
bool | GetElevateWarnings () const |
int | GetErrorCount () const |
int | GetWarningCount () const |
bool | IsFailed () const |
void | ReportError (const char *format, Args... args) |
void | ReportWarning (const char *format, Args... args) |
Additional Inherited Members | |
Protected Member Functions inherited from AZ::RPI::AssetCreator< StreamingImageAsset > | |
AZ_DISABLE_COPY_MOVE (AssetCreator) | |
void | BeginCommon (const Data::AssetId &assetId) |
bool | EndCommon (Data::Asset< StreamingImageAsset > &result) |
bool | ValidateIsReady () |
bool | ValidateNotNull (void *pointer, const char *name) |
Reports errors when a pointer is null. | |
bool | ValidateNotNull (const AZ::Data::Asset< AZ::Data::AssetData > &pointer, const char *name) |
bool | ValidateNotNull (const AZStd::intrusive_ptr< T > &pointer, const char *name) |
Protected Attributes inherited from AZ::RPI::AssetCreator< StreamingImageAsset > | |
Data::Asset< StreamingImageAsset > | m_asset |
This is the asset that subclass creators will build. | |
Constructs an instance of an StreamingImageAsset. (Note this class generally follows the builder design pattern, but is called a "creator" rather than a "builder" to avoid confusion with the AssetBuilderSDK).
void AZ::RPI::StreamingImageAssetCreator::AddMipChainAsset | ( | ImageMipChainAsset & | mipChainAsset | ) |
Adds a mip chain asset to the image. Mip chains stack, starting from the most detailed to the least.
mipChainAsset | the mip chain data to add. |
void AZ::RPI::StreamingImageAssetCreator::Begin | ( | const Data::AssetId & | assetId | ) |
Begins construction of a new streaming image asset instance. Resets the builder to a fresh state. assetId the unique id to use when creating the asset.
bool AZ::RPI::StreamingImageAssetCreator::End | ( | Data::Asset< StreamingImageAsset > & | result | ) |
Finalizes and assigns ownership of the asset to result, if successful. Otherwise false is returned and result is left untouched.
void AZ::RPI::StreamingImageAssetCreator::SetPoolAssetId | ( | const Data::AssetId & | poolAssetId | ) |
Assigns asset id of the streaming image pool, which the runtime streaming image will allocate from. Note: the pool asset id won't be serialized but it's useful when creating streaming image from data in memory