Table of Contents

Class Buffer.StructuredAppend

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

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 GraphicsDevice

The GraphicsDevice.

value DataPointer

The value to initialize the StructuredAppend buffer.

elementSize int

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

The GraphicsDevice.

count int

The number of element in this buffer.

elementSize int

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

The GraphicsDevice.

count int

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

The 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