Class Buffer.Raw
Raw buffer helper methods.
public static class Buffer.Raw
- Inheritance
-
Buffer.Raw
Remarks
Example in HLSL: ByteAddressBuffer or RWByteAddressBuffer for raw buffers supporting unordered access.
Methods
New(GraphicsDevice, DataPointer, BufferFlags, GraphicsResourceUsage)
Creates a new Raw buffer with Default uasge by default.
public static Buffer New(GraphicsDevice device, DataPointer value, BufferFlags additionalBindings = BufferFlags.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
DataPointerThe value to initialize the Raw buffer.
additionalBindings
BufferFlagsThe additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer
A Raw buffer
New(GraphicsDevice, int, BufferFlags, GraphicsResourceUsage)
Creates a new Raw buffer Default uasge.
public static Buffer New(GraphicsDevice device, int size, BufferFlags additionalBindings = BufferFlags.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
Parameters
device
GraphicsDeviceThe GraphicsDevice.
size
intThe size in bytes.
additionalBindings
BufferFlagsThe additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)
usage
GraphicsResourceUsageThe usage.
Returns
- Buffer
A Raw buffer
New<T>(GraphicsDevice, BufferFlags, GraphicsResourceUsage)
Creates a new Raw buffer with Default uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, BufferFlags additionalBindings = BufferFlags.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
additionalBindings
BufferFlagsThe additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)
usage
GraphicsResourceUsageThe usage.
Returns
- Buffer<T>
A Raw buffer
Type Parameters
T
Type of the Raw buffer to get the sizeof from
New<T>(GraphicsDevice, ref T, BufferFlags, GraphicsResourceUsage)
Creates a new Raw buffer with Default uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, ref T value, BufferFlags additionalBindings = BufferFlags.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
TThe value to initialize the Raw buffer.
additionalBindings
BufferFlagsThe additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A Raw buffer
Type Parameters
T
Type of the Raw buffer to get the sizeof from
New<T>(GraphicsDevice, T[], BufferFlags, GraphicsResourceUsage)
Creates a new Raw buffer with Default uasge by default.
public static Buffer<T> New<T>(GraphicsDevice device, T[] value, BufferFlags additionalBindings = BufferFlags.None, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged
Parameters
device
GraphicsDeviceThe GraphicsDevice.
value
T[]The value to initialize the Raw buffer.
additionalBindings
BufferFlagsThe additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)
usage
GraphicsResourceUsageThe usage of this resource.
Returns
- Buffer<T>
A Raw buffer
Type Parameters
T
Type of the Raw buffer to get the sizeof from