ezEngine Release 26.9
Loading...
Searching...
No Matches
ezExtractedRenderData Class Reference

#include <ExtractedRenderData.h>

Public Member Functions

Initial setup
EZ_ALWAYS_INLINE void SetCamera (const ezCamera &camera)
 
EZ_ALWAYS_INLINE const ezCameraGetCamera () const
 
EZ_ALWAYS_INLINE void SetViewData (const ezViewData &viewData)
 
EZ_ALWAYS_INLINE const ezViewDataGetViewData () const
 
EZ_ALWAYS_INLINE void SetWorldHandle (const ezWorldHandle &hWorld)
 
EZ_ALWAYS_INLINE const ezWorldHandleGetWorldHandle () const
 
EZ_ALWAYS_INLINE void SetWorldTime (ezTime time)
 
EZ_ALWAYS_INLINE ezTime GetWorldTime () const
 
EZ_ALWAYS_INLINE void SetWorldDebugContext (const ezDebugRendererContext &debugContext)
 
EZ_ALWAYS_INLINE const ezDebugRendererContextGetWorldDebugContext () const
 
EZ_ALWAYS_INLINE void SetViewDebugContext (const ezDebugRendererContext &debugContext)
 
EZ_ALWAYS_INLINE const ezDebugRendererContextGetViewDebugContext () const
 
Add extracted data
EZ_ALWAYS_INLINE void AddRenderData (const ezRenderData *pRenderData, ezRenderData::Category category)
 Adds render data for a specific rendering category.
 
EZ_ALWAYS_INLINE void AddFrameData (const ezRenderData *pFrameData)
 Adds frame-level data that is not tied to a specific render category.
 
EZ_ALWAYS_INLINE void AddViewDependency (ezGALTextureHandle hTexture, ezBitflags< ezGALResourceState > requiredState, ezBitflags< ezGALShaderStageFlags > stage=ezGALShaderStageFlags::Auto)
 
EZ_ALWAYS_INLINE void AddViewDependency (ezGALBufferHandle hBuffer, ezBitflags< ezGALResourceState > requiredState, ezBitflags< ezGALShaderStageFlags > stage=ezGALShaderStageFlags::Auto)
 
EZ_ALWAYS_INLINE void AddDependency (const ezTextureDependency &dependency)
 
EZ_ALWAYS_INLINE void AddDependency (const ezBufferDependency &dependency)
 
void AddSamplerBinding (ezTempHashedString sSlotName, ezGALSamplerStateHandle hSampler)
 Adds a sampler that is added to the EZ_GAL_BIND_GROUP_FRAME during rendering.
 
EZ_ALWAYS_INLINE void AddSamplerBinding (const ezSamplerBinding &binding)
 
void AddBufferBinding (ezTempHashedString sSlotName, ezGALBufferHandle hBuffer, ezGALBufferRange bufferRange={}, ezEnum< ezGALResourceFormat > overrideTexelBufferFormat=ezGALResourceFormat::Invalid)
 Adds a buffer that is added to the EZ_GAL_BIND_GROUP_FRAME during rendering.
 
EZ_ALWAYS_INLINE void AddBufferBinding (const ezBufferBinding &binding)
 
void AddTextureBinding (ezTempHashedString sSlotName, ezGALTextureHandle hTexture, ezGALTextureRange textureRange={}, ezEnum< ezGALResourceFormat > overrideViewFormat=ezGALResourceFormat::Invalid, ezEnum< ezGALTextureType > overrideViewType=ezGALTextureType::Invalid)
 Adds a texture that is added to the EZ_GAL_BIND_GROUP_FRAME during rendering.
 
EZ_ALWAYS_INLINE void AddTextureBinding (const ezTextureBinding &binding)
 
void AddTextureBinding (ezTempHashedString sSlotName, const ezTexture2DResourceHandle &hTexture, ezResourceAcquireMode acquireMode=ezResourceAcquireMode::AllowLoadingFallback, ezGALTextureRange textureRange={}, ezEnum< ezGALResourceFormat > overrideViewFormat=ezGALResourceFormat::Invalid, ezEnum< ezGALTextureType > overrideViewType=ezGALTextureType::Invalid)
 
void AddTextureBinding (ezTempHashedString sSlotName, const ezTexture3DResourceHandle &hTexture, ezResourceAcquireMode acquireMode=ezResourceAcquireMode::AllowLoadingFallback, ezGALTextureRange textureRange={}, ezEnum< ezGALResourceFormat > overrideViewFormat=ezGALResourceFormat::Invalid, ezEnum< ezGALTextureType > overrideViewType=ezGALTextureType::Invalid)
 
void AddTextureBinding (ezTempHashedString sSlotName, const ezTextureCubeResourceHandle &hTexture, ezResourceAcquireMode acquireMode=ezResourceAcquireMode::AllowLoadingFallback, ezGALTextureRange textureRange={}, ezEnum< ezGALResourceFormat > overrideViewFormat=ezGALResourceFormat::Invalid, ezEnum< ezGALTextureType > overrideViewType=ezGALTextureType::Invalid)
 
Read extracted data
EZ_ALWAYS_INLINE ezArrayPtr< const ezTextureDependencyGetTextureViewDependencies () const
 
EZ_ALWAYS_INLINE ezArrayPtr< const ezBufferDependencyGetBufferViewDependencies () const
 
EZ_ALWAYS_INLINE ezArrayPtr< const ezSamplerBindingGetSamplerBindings () const
 
EZ_ALWAYS_INLINE ezArrayPtr< const ezBufferBindingGetBufferBindings () const
 
EZ_ALWAYS_INLINE ezArrayPtr< const ezTextureBindingGetTextureBindings () const
 
ezArrayPtr< const ezTextureDependencyGetTextureDependenciesWithCategory (ezRenderData::Category category) const
 Returns the texture barrier dependencies recorded for a specific category.
 
ezArrayPtr< const ezBufferDependencyGetBufferDependenciesWithCategory (ezRenderData::Category category) const
 Returns the buffer barrier dependencies recorded for a specific category.
 
ezRenderDataBatchList GetRenderDataBatchesWithCategory (ezRenderData::Category category) const
 Returns all render data batches for a specific category.
 
ezArrayPtr< const ezRenderDataBatch::SortableRenderData > GetRawRenderDataWithCategory (ezRenderData::Category category) const
 Returns raw unsorted render data for a specific category.
 
template<typename T >
EZ_ALWAYS_INLINE const T * GetFrameData () const
 
Administration
void SortAndBatch ()
 Sorts and batches all render data by category and sorting key for efficient rendering.
 
void Clear ()
 

Detailed Description

Contains all render data extracted from a view for one frame.

During the extraction phase, render components add their render data to this container, organized by category (opaque, transparent, etc.). The data is then sorted and batched for efficient rendering. Also stores camera data, view data, world time, and debug contexts.

Member Function Documentation

◆ AddBufferBinding()

void ezExtractedRenderData::AddBufferBinding ( ezTempHashedString  sSlotName,
ezGALBufferHandle  hBuffer,
ezGALBufferRange  bufferRange = {},
ezEnum< ezGALResourceFormat overrideTexelBufferFormat = ezGALResourceFormat::Invalid 
)

Adds a buffer that is added to the EZ_GAL_BIND_GROUP_FRAME during rendering.

See also
ezBindGroupBuilder

◆ AddDependency() [1/2]

void ezExtractedRenderData::AddDependency ( const ezBufferDependency dependency)

Adds a buffer barrier dependency that applies when its category is rendered. The category is taken from the dependency itself. Should not be called in user code, call ezMsgExtractRenderData::AddDependency instead during extraction of object or call AddViewDependency.

◆ AddDependency() [2/2]

void ezExtractedRenderData::AddDependency ( const ezTextureDependency dependency)

Adds a texture barrier dependency that applies when its category is rendered. The category is taken from the dependency itself. Should not be called in user code, call ezMsgExtractRenderData::AddDependency instead during extraction of object or call AddViewDependency.

◆ AddSamplerBinding()

void ezExtractedRenderData::AddSamplerBinding ( ezTempHashedString  sSlotName,
ezGALSamplerStateHandle  hSampler 
)

Adds a sampler that is added to the EZ_GAL_BIND_GROUP_FRAME during rendering.

See also
ezBindGroupBuilder

◆ AddTextureBinding()

void ezExtractedRenderData::AddTextureBinding ( ezTempHashedString  sSlotName,
ezGALTextureHandle  hTexture,
ezGALTextureRange  textureRange = {},
ezEnum< ezGALResourceFormat overrideViewFormat = ezGALResourceFormat::Invalid,
ezEnum< ezGALTextureType overrideViewType = ezGALTextureType::Invalid 
)

Adds a texture that is added to the EZ_GAL_BIND_GROUP_FRAME during rendering.

See also
ezBindGroupBuilder

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