Table of Contents

Class Buffer.Typed

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Typed buffer helper methods.

public static class Buffer.Typed
Inheritance
Buffer.Typed

Remarks

Example in HLSL: Buffer<float4>.

Methods

New(GraphicsDevice, DataPointer, PixelFormat, bool, GraphicsResourceUsage)

Creates a new Typed buffer Default uasge.

public static Buffer New(GraphicsDevice device, DataPointer value, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

value DataPointer

The value to initialize the Typed buffer.

viewFormat PixelFormat

The view format of the buffer.

isUnorderedAccess bool

if set to true this buffer supports unordered access (RW in HLSL).

usage GraphicsResourceUsage

The usage of this resource.

Returns

Buffer

A Typed buffer

New(GraphicsDevice, int, PixelFormat, bool, GraphicsResourceUsage)

Creates a new Typed buffer Default uasge.

public static Buffer New(GraphicsDevice device, int count, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

device GraphicsDevice

The GraphicsDevice.

count int

The number of data with the following viewFormat.

viewFormat PixelFormat

The view format of the buffer.

isUnorderedAccess bool

if set to true this buffer supports unordered access (RW in HLSL).

usage GraphicsResourceUsage

The usage.

Returns

Buffer

A Typed buffer

New<T>(GraphicsDevice, T[], PixelFormat, bool, GraphicsResourceUsage)

Creates a new Typed buffer Default uasge.

public static Buffer<T> New<T>(GraphicsDevice device, T[] value, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default) where T : unmanaged

Parameters

device GraphicsDevice

The GraphicsDevice.

value T[]

The value to initialize the Typed buffer.

viewFormat PixelFormat

The view format of the buffer.

isUnorderedAccess bool

if set to true this buffer supports unordered access (RW in HLSL).

usage GraphicsResourceUsage

The usage of this resource.

Returns

Buffer<T>

A Typed buffer

Type Parameters

T

Type of the Typed buffer to get the sizeof from