Table of Contents

Struct BufferDescription

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

Describes a DeviceBuffer, used in the creation of DeviceBuffer objects by a ResourceFactory.

public struct BufferDescription : IEquatable<BufferDescription>
Implements
Inherited Members

Constructors

BufferDescription(uint, BufferUsage)

Constructs a new BufferDescription describing a non-dynamic DeviceBuffer.

public BufferDescription(uint sizeInBytes, BufferUsage usage)

Parameters

sizeInBytes uint

The desired capacity, in bytes.

usage BufferUsage

Indicates how the DeviceBuffer will be used.

BufferDescription(uint, BufferUsage, uint)

Constructs a new BufferDescription.

public BufferDescription(uint sizeInBytes, BufferUsage usage, uint structureByteStride)

Parameters

sizeInBytes uint

The desired capacity, in bytes.

usage BufferUsage

Indicates how the DeviceBuffer will be used.

structureByteStride uint

For structured buffers, this value indicates the size in bytes of a single structure element, and must be non-zero. For all other buffer types, this value must be zero.

BufferDescription(uint, BufferUsage, uint, bool)

Constructs a new BufferDescription.

public BufferDescription(uint sizeInBytes, BufferUsage usage, uint structureByteStride, bool rawBuffer)

Parameters

sizeInBytes uint

The desired capacity, in bytes.

usage BufferUsage

Indicates how the DeviceBuffer will be used.

structureByteStride uint

For structured buffers, this value indicates the size in bytes of a single structure element, and must be non-zero. For all other buffer types, this value must be zero.

rawBuffer bool

Indicates that this is a raw buffer. This should be combined with StructuredBufferReadWrite. This affects how the buffer is bound in the D3D11 backend.

Fields

RawBuffer

Indicates that this is a raw buffer. This should be combined with StructuredBufferReadWrite. This affects how the buffer is bound in the D3D11 backend.

public bool RawBuffer

Field Value

bool

SizeInBytes

The desired capacity, in bytes, of the DeviceBuffer.

public uint SizeInBytes

Field Value

uint

StructureByteStride

For structured buffers, this value indicates the size in bytes of a single structure element, and must be non-zero. For all other buffer types, this value must be zero.

public uint StructureByteStride

Field Value

uint

Usage

Indicates how the DeviceBuffer will be used.

public BufferUsage Usage

Field Value

BufferUsage

Methods

Equals(BufferDescription)

Element-wise equality.

public bool Equals(BufferDescription other)

Parameters

other BufferDescription

The instance to compare to.

Returns

bool

True if all elements are equal; false otherswise.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.