#include <ClearAttachments.h>
Inherits AZ::RHI::DeviceObject.
Classes | |
struct | ClearData |
Information about clearing a render attachment. More... | |
Public Member Functions | |
AZ_CLASS_ALLOCATOR (ClearAttachments, AZ::SystemAllocator) | |
RHI::ResultCode | Init (RHI::Device &device) |
Initialize the object. | |
void | Shutdown () override |
Shutdown the object. | |
RHI::ResultCode | Clear (CommandList &cmdList, MTLRenderPassDescriptor *renderpassDesc, const AZStd::vector< ClearData > &clearAttachmentsData) |
![]() | |
AZ_RTTI (DeviceObject, "{17D34F71-944C-4AF5-9823-627474C4C0A6}", Object) | |
bool | IsInitialized () const |
Returns whether the device object is initialized. | |
Device & | GetDevice () const |
![]() | |
AZ_RTTI (Object, "{E43378F1-2331-4173-94B8-990ED20E6003}") | |
void | SetName (const Name &name) |
Sets the name of the object. | |
const Name & | GetName () const |
Returns the name set on the object by SetName. | |
uint32_t | use_count () |
Returns the current use count of the object. | |
Additional Inherited Members | |
![]() | |
void | Init (Device &device) |
The derived class should call this method to assign the device. | |
void | Shutdown () override |
Clears the current bound device to null. | |
![]() | |
void | add_ref () const |
void | release () const |
![]() | |
AZStd::atomic_int | m_useCount = 0 |
Utility class for clearing render attachments in the middle of a renderpass using a full screen triangle. Metal only supports clearing using a Load action but for subpasses we need to be able to clear an attachment at the beginning of a subpass.
RHI::ResultCode AZ::Metal::ClearAttachments::Clear | ( | CommandList & | cmdList, |
MTLRenderPassDescriptor * | renderpassDesc, | ||
const AZStd::vector< ClearData > & | clearAttachmentsData | ||
) |
Clears a group of attachments (color or depth/stencil) from the renderpass. It uses a full screen triangle to do the clearing.
|
overridevirtual |
Shutdown the object.
Reimplemented from AZ::RHI::Object.