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::ResourcePoolAssetCreator Class Reference

#include <ResourcePoolAssetCreator.h>

Inherits AZ::RPI::AssetCreator< ResourcePoolAsset >.

Public Member Functions

void Begin (const Data::AssetId &assetId)
 
void SetPoolDescriptor (AZStd::unique_ptr< RHI::ResourcePoolDescriptor > poolDescriptor)
 
void SetPoolName (AZStd::string_view poolName)
 
bool End (Data::Asset< ResourcePoolAsset > &result)
 
- Public Member Functions inherited from AZ::RPI::AssetCreator< ResourcePoolAsset >
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< ResourcePoolAsset >
 AZ_DISABLE_COPY_MOVE (AssetCreator)
 
void BeginCommon (const Data::AssetId &assetId)
 
bool EndCommon (Data::Asset< ResourcePoolAsset > &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< ResourcePoolAsset >
Data::Asset< ResourcePoolAssetm_asset
 This is the asset that subclass creators will build.
 

Detailed Description

Use a ResourcePoolAssetCreator to create and configure a new ResourcePoolAsset which can either be BufferPoolAsset or ImagePoolAsset. (Note this class generally follows the builder design pattern, but is called a "creator" rather than a "builder" to avoid confusion with the AssetBuilderSDK).

Member Function Documentation

◆ Begin()

void AZ::RPI::ResourcePoolAssetCreator::Begin ( const Data::AssetId &  assetId)

Begins construction of a new ResourcePoolAsset. Resets the builder to a fresh state.

Parameters
assetIdthe unique id to use when creating the asset.

◆ End()

bool AZ::RPI::ResourcePoolAssetCreator::End ( Data::Asset< ResourcePoolAsset > &  result)

Finalizes and assigns ownership of the asset to result, if successful. Otherwise false is returned and result is left untouched.

◆ SetPoolDescriptor()

void AZ::RPI::ResourcePoolAssetCreator::SetPoolDescriptor ( AZStd::unique_ptr< RHI::ResourcePoolDescriptor poolDescriptor)

Set a pool descriptor which can be BufferPoolDescriptor or ImagePoolDescriptor

Parameters
poolDescriptorthe unique ptr provides pool descriptor. Example: when assigning a derived pool descriptor, the code will look like ResourcePoolAssetCreator assetCreator; ... AZStd::unique_ptr<RHI::BufferPoolDescriptor> bufferPoolDescriptor = AZStd::make_unique<RHI::BufferPoolDescriptor>(); ... assetCreator.SetPoolDescriptor(AZStd::move(bufferPoolDescriptor));

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