Table of Contents

Struct BufferDescription

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Describes a GPU Buffer.

public struct BufferDescription : IEquatable<BufferDescription>
Implements
Inherited Members
Extension Methods

Constructors

BufferDescription(int, BufferFlags, GraphicsResourceUsage, int)

Initializes a new instance of BufferDescription struct.

public BufferDescription(int sizeInBytes, BufferFlags bufferFlags, GraphicsResourceUsage usage, int structureByteStride = 0)

Parameters

sizeInBytes int

Size of the Buffer in bytes.

bufferFlags BufferFlags

Buffer flags describing the type of Buffer.

usage GraphicsResourceUsage

The usage for the Buffer, which determines who can read/write data.

structureByteStride int

If the Buffer is a Structured Buffer or a Typed Buffer, this parameter indicates the stride of each element of the Buffer (the structure). The stride is not only the size of the structure, but also any padding in between two consecutive elements.

For any other kind of Buffer, this parameter can be 0.

Fields

BufferFlags

Flags describing the type of Buffer.

public BufferFlags BufferFlags

Field Value

BufferFlags

SizeInBytes

Size of the Buffer in bytes.

public int SizeInBytes

Field Value

int

StructureByteStride

The size in bytes of the structure (each element in the Buffer) when it represents a Structured Buffer or a Typed Buffer.

public int StructureByteStride

Field Value

int

Usage

Usage for the Buffer, which determines who can read / write data.

public GraphicsResourceUsage Usage

Field Value

GraphicsResourceUsage

Methods

Equals(BufferDescription)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(BufferDescription other)

Parameters

other BufferDescription

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

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

Operators

operator ==(BufferDescription, BufferDescription)

public static bool operator ==(BufferDescription left, BufferDescription right)

Parameters

left BufferDescription
right BufferDescription

Returns

bool

operator !=(BufferDescription, BufferDescription)

public static bool operator !=(BufferDescription left, BufferDescription right)

Parameters

left BufferDescription
right BufferDescription

Returns

bool