Diligent Engine
Loading...
Searching...
No Matches
Diligent::RadientMeshPrimitiveDesc Struct Reference

#include <RadientAssets.h>

Public Attributes

const Char * Name = nullptr
Uint32 GeometryIndex = 0
Uint32 FirstElement = 0
Uint32 ElementCount = 0
IRadientMaterialAssetpMaterial = nullptr

Detailed Description

Immutable description of one mesh primitive's draw range and default material.

GeometryIndex selects the shared geometry that supplies vertex and index data. The referenced geometry's IndexType determines whether FirstElement and ElementCount count indices or vertices.

Member Data Documentation

◆ ElementCount

Uint32 Diligent::RadientMeshPrimitiveDesc::ElementCount = 0

Number of indices when the geometry is indexed, or vertices when its IndexType is NONE. FirstElement + ElementCount does not exceed the geometry's IndexCount for indexed geometry, or VertexCount for non-indexed geometry.

◆ FirstElement

Uint32 Diligent::RadientMeshPrimitiveDesc::FirstElement = 0

Zero-based first index when the geometry is indexed, or first vertex when its IndexType is NONE. Relative to the referenced geometry's data, without any GPU pool or allocation offset; measured in elements, not bytes.

◆ GeometryIndex

Uint32 Diligent::RadientMeshPrimitiveDesc::GeometryIndex = 0

Zero-based index into RadientMeshAssetDesc::pGeometries. Less than the mesh description's GeometryCount for every primitive in a loaded mesh.

◆ Name

const Char* Diligent::RadientMeshPrimitiveDesc::Name = nullptr

Optional null-terminated primitive name, or nullptr when no name is set. The mesh owns the string, which remains valid while the mesh is retained.

◆ pMaterial

IRadientMaterialAsset* Diligent::RadientMeshPrimitiveDesc::pMaterial = nullptr

Default material assigned to this primitive, or nullptr when none is set. Does not include material overrides applied to scene instances. The mesh retains the material; this pointer remains valid while the mesh is retained.