Home -> RawVertexAttribute -> QueueDataUpdate

Description

The QueueDataUpdate method schedules an update to raw vertex data in the buffer this attribute is assigned to. The update uses the raw attribute layout supplied at construction time and may target an offset within the bound buffer data.

Unlike initial data, the provided CPU memory may be modified or deallocated immediately after this method returns. The renderer copies or stages the data needed for the scheduled transfer.

ImportantImportant

Queued updates are scheduled GPU work. When an ITransferBatch is supplied, completion and visibility follow that batch.

Usage

SuccessToken QueueDataUpdate(const uint8_t* data, size_t entryCount, size_t initialVertexNo, size_t entryStrideInBytes, ITransferBatch* transferBatch = nullptr);

Argument list

data [const uint8_t*]
The source bytes to copy into the attribute buffer.
entryCount [size_t]
The number of vertex entries to update.
initialVertexNo [size_t]
The first vertex entry to update.
entryStrideInBytes [size_t]
The byte stride between consecutive source entries.
transferBatch [ITransferBatch*]
An optional transfer batch to schedule the update into. If null, the renderer schedules the update independently.

Return value

[SuccessToken]
True if the operation succeeded, false otherwise. An assertion will be raised in debug builds if the result is not tested.

See also