Class Buffer.StructuredAppend
StructuredAppend buffer helper methods.
public static class Buffer.StructuredAppend
- Inheritance
-
Buffer.StructuredAppend
Remarks
Example in HLSL: AppendStructuredBuffer<float4> or ConsumeStructuredBuffer<float4>.
Methods
New(GraphicsDevice, DataPointer, int)
Creates a new StructuredAppend buffer Default usage.
public static Buffer New(GraphicsDevice device, DataPointer value, int elementSize)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
DataPointerThe value to initialize the StructuredAppend buffer.
elementSize
intSize of the element.
Returns
- Buffer
A StructuredAppend buffer
New(GraphicsDevice, int, int)
Creates a new StructuredAppend buffer accessible as a ShaderResourceView and as a UnorderedAccessView.
public static Buffer New(GraphicsDevice device, int count, int elementSize)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
count
intThe number of element in this buffer.
elementSize
intSize of the struct.
Returns
- Buffer
A StructuredAppend buffer
New<T>(GraphicsDevice, int)
Creates a new StructuredAppend buffer accessible as a ShaderResourceView and optionally as a UnorderedAccessView.
public static Buffer<T> New<T>(GraphicsDevice device, int count) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
count
intThe number of element in this buffer.
Returns
- Buffer<T>
A Structured buffer
Type Parameters
T
Type of the element in the structured buffer
New<T>(GraphicsDevice, T[])
Creates a new StructuredAppend buffer Default usage.
public static Buffer<T> New<T>(GraphicsDevice device, T[] value) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
T[]The value to initialize the StructuredAppend buffer.
Returns
- Buffer<T>
A StructuredAppend buffer
Type Parameters
T
Type of the StructuredAppend buffer to get the sizeof from