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
sizeInBytesuintThe desired capacity, in bytes.
usageBufferUsageIndicates how the DeviceBuffer will be used.
BufferDescription(uint, BufferUsage, uint)
Constructs a new BufferDescription.
public BufferDescription(uint sizeInBytes, BufferUsage usage, uint structureByteStride)
Parameters
sizeInBytesuintThe desired capacity, in bytes.
usageBufferUsageIndicates how the DeviceBuffer will be used.
structureByteStrideuintFor 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
sizeInBytesuintThe desired capacity, in bytes.
usageBufferUsageIndicates how the DeviceBuffer will be used.
structureByteStrideuintFor 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.
rawBufferboolIndicates 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
SizeInBytes
The desired capacity, in bytes, of the DeviceBuffer.
public uint SizeInBytes
Field Value
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
Usage
Indicates how the DeviceBuffer will be used.
public BufferUsage Usage
Field Value
Methods
Equals(BufferDescription)
Element-wise equality.
public bool Equals(BufferDescription other)
Parameters
otherBufferDescriptionThe 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.