|
|
|
|
@ -61,12 +61,15 @@ namespace AZ
|
|
|
|
|
virtual Data::Instance<RPI::Model> GetModel(const MeshHandle& meshHandle) const = 0;
|
|
|
|
|
//! Gets the underlying RPI::ModelAsset for a meshHandle.
|
|
|
|
|
virtual Data::Asset<RPI::ModelAsset> GetModelAsset(const MeshHandle& meshHandle) const = 0;
|
|
|
|
|
//! Gets the ObjectSrg for a meshHandle.
|
|
|
|
|
//! Updating the ObjectSrg should be followed by a call to QueueObjectSrgForCompile,
|
|
|
|
|
//! instead of compiling the srg directly. This way, if the srg has already been queued for compile,
|
|
|
|
|
//! it will not be queued twice in the same frame. The ObjectSrg should not be updated during
|
|
|
|
|
|
|
|
|
|
//! Gets the ObjectSrgs for a meshHandle.
|
|
|
|
|
//! Updating the ObjectSrgs should be followed by a call to QueueObjectSrgForCompile,
|
|
|
|
|
//! instead of compiling the srgs directly. This way, if the srgs have already been queued for compile,
|
|
|
|
|
//! they will not be queued twice in the same frame. The ObjectSrgs should not be updated during
|
|
|
|
|
//! Simulate, or it will create a race between updating the data and the call to Compile
|
|
|
|
|
virtual AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>>& GetObjectSrgs(const MeshHandle& meshHandle) const = 0;
|
|
|
|
|
//! Cases where there may be multiple ObjectSrgs: if a model has multiple submeshes and those submeshes use different
|
|
|
|
|
//! materials with different object SRGs.
|
|
|
|
|
virtual const AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>>& GetObjectSrgs(const MeshHandle& meshHandle) const = 0;
|
|
|
|
|
//! Queues the object srg for compile.
|
|
|
|
|
virtual void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const = 0;
|
|
|
|
|
//! Sets the MaterialAssignmentMap for a meshHandle, using just a single material for the DefaultMaterialAssignmentId.
|
|
|
|
|
|