Table of Contents

Class BufferData

Namespace
Stride.Graphics.Data
Assembly
Stride.Graphics.dll

Content of a GPU buffer (vertex buffer, index buffer, etc...).

[DataContract]
[ContentSerializer(typeof(DataContentSerializerWithReuse<BufferData>))]
public class BufferData
Inheritance
BufferData
Extension Methods

Constructors

BufferData()

public BufferData()

BufferData(BufferFlags, byte[])

public BufferData(BufferFlags bufferFlags, byte[] content)

Parameters

bufferFlags BufferFlags
content byte[]

Properties

BufferFlags

Buffer flags describing the type of buffer.

public BufferFlags BufferFlags { get; set; }

Property Value

BufferFlags

Content

Gets or sets the buffer content.

public byte[] Content { get; set; }

Property Value

byte[]

The buffer content.

StructureByteStride

The size of the structure (in bytes) when it represents a structured/typed buffer.

public int StructureByteStride { get; set; }

Property Value

int

Usage

Usage of this buffer.

public GraphicsResourceUsage Usage { get; set; }

Property Value

GraphicsResourceUsage

Methods

New<T>(BufferFlags, T[])

Creates a new instance of BufferData from a typed buffer.

public static BufferData New<T>(BufferFlags bufferFlags, T[] content) where T : struct

Parameters

bufferFlags BufferFlags

The flags indicating the type of buffer

content T[]

An array of data

Returns

BufferData

A buffer data.

Type Parameters

T

Type of the element to store in the buffer data.