Open 3D Engine Atom Gem API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <FrameGraphAttachmentInterface.h>
Public Member Functions | |
FrameGraphAttachmentInterface (FrameGraphAttachmentDatabase &attachmentDatabase) | |
ResultCode | ImportImage (const AttachmentId &attachmentId, Ptr< Image > image) |
ResultCode | ImportSwapChain (const AttachmentId &attachmentId, Ptr< SwapChain > swapChain) |
ResultCode | ImportBuffer (const AttachmentId &attachmentId, Ptr< Buffer > buffer) |
ResultCode | CreateTransientImage (const TransientImageDescriptor &descriptor) |
Creates a transient image as an attachment. The provided attachment id is associated with the new attachment. | |
ResultCode | CreateTransientBuffer (const TransientBufferDescriptor &descriptor) |
Creates a transient buffer as an attachment. The provided attachment id is associated with the new attachment. | |
bool | IsAttachmentValid (const AttachmentId &attachmentId) const |
Returns whether the attachment id was registered via a call to Create / Import. | |
const FrameAttachment * | FindAttachment (const AttachmentId &attachmentId) const |
Returns the FrameAttachment for a given AttachmentId, or nullptr if not found. | |
ImageDescriptor | GetImageDescriptor (const AttachmentId &attachmentId) |
BufferDescriptor | GetBufferDescriptor (const AttachmentId &attachmentId) const |
This interface exposes FrameGraphAttachmentDatabase functionality to non-RHI systems (like the RPI). This is in order to reduce access to certain public functions in FrameGraphAttachmentDatabase that are intended for RHI use only.
Attachment registration for a particular AttachmentId occurs just once per frame. A registration event makes the attachment immediately visible via the AttachmentId. Any "Use" operation after this call, either on this scope or a downstream scope, may reference that attachment by AttachmentId.
Attachments fall into two categories:
(Imports): Persistent attachments owned by the user are imported into the frame scheduler each frame. The frame scheduler merely references the attachment; it does not dictate ownership.
(Transients): Transient Attachments are owned and managed by the frame scheduler. They persist only for the current frame. The user references the transient attachment by AttachmentId, and is able to access resource contents in the Compile and Execute phases of a ScopeProducer (via the respective phase contexts).
|
inline |
Resolves an attachment id to an image descriptor. This is useful when accessing image information for an attachment that was declared in a different scope.
attachmentId | The attachment id used to lookup the descriptors. |
|
inline |
Resolves an attachment id to a buffer descriptor. This is useful when accessing buffer information for an attachment that was declared in a different scope.
attachmentId | The attachment id used to lookup the descriptors. |
|
inline |
Imports a persistent buffer as an attachment.
bufferAttachment | The buffer attachment to import. |
|
inline |
Imports a persistent image as an attachment.
imageAttachment | The image attachment to import. |
|
inline |
Imports a swap chain image as an attachment.
swapChainAttachment | The swap chain attachment to import. |