Method CreateOrResizeComputeBuffer
CreateOrResizeComputeBuffer<T>(ref ComputeBuffer, int, string)
If the buffer does not have the exact count requested or is not currently allocated, release and allocate a new one.
Declaration
public static void CreateOrResizeComputeBuffer<T>(ref ComputeBuffer buffer, int count, string name = null) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
ComputeBuffer | buffer | Compute buffer to possibly reallocate |
int | count | Number of elements of type T in the buffer |
string | name | Optional name of the compute buffer used in debuggers |
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the buffer |