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

#include <RadientAssets.h>

Public Attributes

RadientVertexLayoutDesc VertexLayout = {}
IRadientDataBlob *const * ppVertexBuffers = nullptr
Uint32 VertexCount = 0

Detailed Description

CPU vertex data supplied to CreateMesh or CreateMeshVertexData.

Both calls copy the layout arrays and semantic strings and retain each referenced blob under shared read access before returning. The caller can then release its descriptors and blob references. End write access before the call; an active writer returns RADIENT_STATUS_INVALID_OPERATION. Source bytes are read without an additional input-buffer copy. Read access ends when source processing finishes, independently of GPU upload completion. Reference blobs retain their usual external-storage lifetime requirements.

VertexLayout describes the supplied CPU bytes. The renderer chooses its stored layout and converts the source attributes as needed.

Member Data Documentation

◆ ppVertexBuffers

IRadientDataBlob* const* Diligent::RadientMeshVertexData::ppVertexBuffers = nullptr

Array of VertexLayout.BufferCount source blobs. Each attribute's BufferIndex selects a blob, and its ByteOffset is relative to that blob. The array and each referenced entry must be non-null. A referenced blob contains all values through the last vertex: (VertexCount - 1) times the resolved stride, plus the attribute offset and element size. Trailing padding is optional. Unreferenced entries are ignored and may be null; multiple entries may reference the same blob. Both read-only and mutable blobs are accepted. Size and data are inspected under shared read access. Insufficient or unaddressable storage returns RADIENT_STATUS_INVALID_ARGUMENT.

◆ VertexCount

Uint32 Diligent::RadientMeshVertexData::VertexCount = 0

Number of vertex records in every referenced buffer. Must be nonzero. This defines the vertex domain for indices and morph targets in each geometry that uses this data.

◆ VertexLayout

RadientVertexLayoutDesc Diligent::RadientMeshVertexData::VertexLayout = {}

Layout of the source vertex buffers. Automatic offsets and strides are resolved before reading. A three-component POSITION attribute is required. JOINTS_0 and WEIGHTS_0, when present, occur together with four components each; JOINTS_0 uses non-normalized unsigned integers or FLOAT32 components. Integer and FLOAT32 source components support conversion to the renderer's layout; FLOAT16 conversion is unsupported by the current renderer. The default empty layout is invalid for vertex-data creation.