XII Release 0.1.0
Loading...
Searching...
No Matches
xiiMeshRenderData Class Reference

#include <MeshComponent.h>

Inheritance diagram for xiiMeshRenderData:
[legend]

Public Types

enum class  RangeMode : xiiUInt8 { PrimitiveRange , MeshSection , WholeMesh }

Public Attributes

RangeMode m_RangeMode = RangeMode::PrimitiveRange
xiiMeshResourceHandle m_hMesh
 The mesh resource to render, containing the mesh buffer and materials.
xiiMeshBufferResourceHandle m_hMeshBuffer
 The mesh buffer resource containing the GPU buffers for this mesh, used for rendering and culling.
xiiDynamicArray< xiiMaterialResourceHandle > m_hMaterials
 The material resources for this mesh, used for rendering.
xiiUInt32 m_uiUniqueID = 0U
 A unique identifier for this mesh render data, used for caching and sorting.
xiiUInt32 m_uiLODIndex = 0U
 The LOD index to render, used to select the appropriate LOD from the mesh resource.
xiiUInt32 m_uiFirstMeshlet = 0U
 The index of the first meshlet to render, used for meshlet-based rendering.
xiiUInt32 m_uiMeshletCount = 0U
 The number of meshlets to render, used for meshlet-based rendering.
xiiUInt32 m_uiFirstPrimitive = 0U
 The index of the first primitive to render, used for indexed rendering.
xiiUInt32 m_uiPrimitiveCount = 0U
 The number of primitives to render, used for indexed rendering.
xiiUInt32 m_uiSectionIndex = xiiInvalidIndex
 The section index to render, used to select a specific section of the mesh for rendering.
xiiUInt32 m_uiInstanceCount = 1U
 The number of instances to render, used for instanced rendering.
xiiUInt64 m_uiInstanceTopologyRevision = 0
 Runtime identity epoch; index shifts must not reuse an earlier GPU identity.
xiiUInt32 m_uiVisibilityMask = 0xFFFFFFFFU
float m_fLodBias = 0.0f
 Projected-coverage octaves for automatic GPU LOD selection; +1 doubles coverage and favors finer LODs.
xiiBitflags< xiiMeshRenderDataFlags > m_Flags = xiiMeshRenderDataFlags::Default
 Flags specifying various properties of the mesh render data, used to determine how the mesh should be rendered.
xiiDynamicArray< xiiMat4 > m_InstanceTransforms
 Array of instance transforms for instanced rendering, used to provide per-instance transformation data to the GPU.
xiiDynamicArray< xiiMat4 > m_SkinningMatrices
 Array of skinning matrices for skinned rendering, used to provide per-vertex transformation data to the GPU.
xiiDynamicArray< float > m_MorphWeights
 Array of morph weights for morph target rendering, used to interpolate between different mesh shapes.
xiiSharedPtr< xiiGALBuffer > m_pInstanceDataBuffer
 GPU buffer for instance data, used for instanced rendering to provide per-instance data to the GPU.
xiiSharedPtr< xiiGALBuffer > m_pSkinningMatricesBuffer
 GPU buffer for skinning matrices, used for skinned rendering to provide per-vertex transformation data to the GPU.
xiiSharedPtr< xiiGALBuffer > m_pMorphWeightsBuffer
 GPU buffer for morph weights, used for morph target rendering to provide morph weight data to the GPU.
xiiSharedPtr< xiiGALBuffer > m_pDrawCommandBuffer
 GPU buffer for indirect draw commands, used for indirect rendering to provide draw command data to the GPU.
Public Attributes inherited from xiiRenderData
xiiTransform m_GlobalTransform = xiiTransform::MakeIdentity()
xiiBoundingBoxSphere m_GlobalBounds = xiiBoundingBoxSphere::MakeZero()
xiiGameObjectHandle m_hOwnerObject
xiiComponentHandle m_hOwnerComponent
xiiUInt64 m_uiSortingKey = 0

Additional Inherited Members

Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTI * GetDynamicRTTI () const
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
Static Public Member Functions inherited from xiiNoBase
static const xiiRTTI * GetStaticRTTI ()

Detailed Description

Renderer-facing packet for mesh draws.

The packet is deliberately meshlet/indirect friendly. Render passes can bind the mesh buffer resources directly, select sections/LODs on GPU, upload instance/skin/morph streams, and emit mesh shader or indexed fallback draws from the same data.

Member Enumeration Documentation

◆ RangeMode

enum class xiiMeshRenderData::RangeMode : xiiUInt8
strong

Meaning of the packet's range for residency-aware consumers. Indexed consumers continue to use the extracted CPU LOD range. Custom packets default to an exact primitive range, which must be meaningful in every LOD they allow. Component packets identify authored mesh sections so native scenes can select each LOD's own ranges/materials without assuming matching layouts.


The documentation for this class was generated from the following file:
  • /home/runner/work/XII/XII/Source/Engine/GraphicsCore/Meshes/MeshComponent.h