Method CreateOrKeepBiggerComputeBuffer
CreateOrKeepBiggerComputeBuffer<T>(ref ComputeBuffer, int, string)
If the buffer does not have a size big enough to contain the count requested or is not currently allocated, release and allocate a new one.
Declaration
public static void CreateOrKeepBiggerComputeBuffer<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 |