Method SetBufferData
SetBufferData<T>(CommandBuffer, StructuredBuffer<T>, List<T>)
Adds a command to set the GPU buffer with values from a list.
Declaration
public static void SetBufferData<T>(this CommandBuffer cmd, StructuredBuffer<T> buffer, List<T> data) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | cmd | The command buffer. |
| StructuredBuffer<T> | buffer | The destination buffer. |
| List<T> | data | The list of values to fill the buffer with. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of elements in the GPU buffer. |
Remarks
This will call Resize(int, ResizeOptions) with the number of elements in data. Previous contents of the underlying buffer are ignored.