Open 3D Engine Atom Gem API Reference 25.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RHI::DrawPacket Class Referencefinal

#include <DrawPacket.h>

Inherits AZStd::intrusive_base.

Public Types

using DrawItemVisitor = AZStd::function< void(DrawListTag, DrawItemProperties)>
 

Public Member Functions

 AZ_DISABLE_COPY_MOVE (DrawPacket)
 
DrawListMask GetDrawListMask () const
 Returns the mask representing all the draw lists affected by the packet.
 
size_t GetDrawItemCount () const
 Returns the number of draw items stored in the packet.
 
s32 GetDrawListIndex (DrawListTag drawListTag) const
 Returns the index associated with the given DrawListTag.
 
DrawItemGetDrawItem (size_t index)
 Returns the DeviceDrawItem at the given index.
 
const DrawItemGetDrawItem (size_t index) const
 
DrawItemGetDrawItem (DrawListTag drawListTag)
 Returns the DeviceDrawItem associated with the given DrawListTag.
 
const DrawItemGetDrawItem (DrawListTag drawListTag) const
 
DrawItemProperties GetDrawItemProperties (size_t index) const
 Returns the draw item and its properties associated with the provided index.
 
DrawListTag GetDrawListTag (size_t index) const
 Returns the draw list tag associated with the provided index, used to filter the draw item into an appropriate pass.
 
DrawFilterMask GetDrawFilterMask (size_t index) const
 
void SetRootConstant (uint32_t offset, const AZStd::span< u8 > &data)
 Update the root constant at the specified interval. The same root constants are shared by all draw items in the draw packet.
 
void SetInstanceCount (uint32_t instanceCount)
 Set the instance count in all draw items.
 
const DeviceDrawPacketGetDeviceDrawPacket (int deviceIndex) const
 

Friends

class DrawPacketBuilder
 

Detailed Description

DrawPacket is a multi-device class that holds a map of device-specific DrawPackets as well as a vector of MultiDeviceDrawItems, corresponding SortKeys, DrawListTags and DrawListMasks. A DrawPacket is only intened to be contructed via the DrawPacketBuilder. Individual device-specific DrawPackets are allocated as packed data structures, referenced via RHI::Ptrs in a map, indexed by the device-index.

Member Function Documentation

◆ AZ_DISABLE_COPY_MOVE()

AZ::RHI::DrawPacket::AZ_DISABLE_COPY_MOVE ( DrawPacket  )

Draw packets cannot be move constructed or copied, as they contain an additional memory payload. Use DeviceDrawPacketBuilder::Clone to copy a draw packet.

◆ GetDrawFilterMask()

DrawFilterMask AZ::RHI::DrawPacket::GetDrawFilterMask ( size_t  index) const

Returns the draw filter mask associated with the provided index, used to filter the draw item into an appropriate render pipeline.


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