Table of Contents

Class Buffer.Raw

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

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 GraphicsDevice

The GraphicsDevice.

value DataPointer

The value to initialize the Raw buffer.

additionalBindings BufferFlags

The additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

size int

The size in bytes.

additionalBindings BufferFlags

The additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

additionalBindings BufferFlags

The additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

value T

The value to initialize the Raw buffer.

additionalBindings BufferFlags

The additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)

usage GraphicsResourceUsage

The 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 GraphicsDevice

The GraphicsDevice.

value T[]

The value to initialize the Raw buffer.

additionalBindings BufferFlags

The additional bindings (for example, to create a combined raw/index buffer, pass IndexBuffer)

usage GraphicsResourceUsage

The usage of this resource.

Returns

Buffer<T>

A Raw buffer

Type Parameters

T

Type of the Raw buffer to get the sizeof from