ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name (#1133)
* ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name - Change the CreateCommonBuffer function to not require an unique name by default. - Remove the code for generating unique buffer names. - Add buffer name to BufferAsset so it can be used for device object name instead of using asset file name. - Change RPI::Buffer to use BufferName_AssetUuid as attachment id.
This commit is contained in:
@@ -595,7 +595,7 @@ namespace AZ
|
||||
// Create a buffer and populate it with the transforms
|
||||
RPI::CommonBufferDescriptor descriptor;
|
||||
descriptor.m_bufferData = boneTransforms.data();
|
||||
descriptor.m_bufferName = AZStd::string::format("BoneTransformBuffer_%s_%s", actorInstance->GetActor()->GetName(), Uuid::CreateRandom().ToString<AZStd::string>().c_str());
|
||||
descriptor.m_bufferName = AZStd::string::format("BoneTransformBuffer_%s", actorInstance->GetActor()->GetName());
|
||||
descriptor.m_byteCount = boneTransforms.size() * sizeof(float);
|
||||
descriptor.m_elementSize = floatsPerBone * sizeof(float);
|
||||
descriptor.m_poolType = RPI::CommonBufferPoolType::ReadOnly;
|
||||
|
||||
Reference in New Issue
Block a user