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

#include <RadientAssets.h>

Public Attributes

IRadientDataBlob * pIndexBuffer = nullptr
Uint32 IndexCount = 0
RADIENT_INDEX_TYPE IndexType = RADIENT_INDEX_TYPE_NONE

Detailed Description

CPU indices supplied to CreateMesh or CreateMeshIndexData.

Both calls retain the blob and acquire shared read access before returning, without copying the input buffer. The caller can then release its blob reference. End write access before the call; an active writer returns RADIENT_STATUS_INVALID_OPERATION. Read access ends when index processing finishes, independently of GPU upload completion. Reference blobs retain their usual external-storage lifetime requirements. The renderer selects the stored index encoding; the source encoding does not dictate GPU storage.

Member Data Documentation

◆ IndexCount

Uint32 Diligent::RadientMeshIndexData::IndexCount = 0

Number of source index elements. Must be nonzero. These indices are local to the vertex domain of each geometry that uses this index data.

◆ IndexType

RADIENT_INDEX_TYPE Diligent::RadientMeshIndexData::IndexType = RADIENT_INDEX_TYPE_NONE

Encoding of the source indices: UINT8, UINT16, or UINT32. The default NONE is invalid for index-data creation.

◆ pIndexBuffer

IRadientDataBlob* Diligent::RadientMeshIndexData::pIndexBuffer = nullptr

Blob containing IndexCount tightly packed indices, starting at its first byte. Must be non-null and contain at least IndexCount times the source element size bytes. Additional bytes are ignored. Both read-only and mutable blobs are accepted. Size and data are checked under read access. Insufficient or unaddressable storage returns RADIENT_STATUS_INVALID_ARGUMENT.