Struct BufferDescription
Describes a DeviceBuffer, used in the creation of DeviceBuffer objects by a ResourceFactory.
Implements
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct BufferDescription : IEquatable<BufferDescription>
Constructors
BufferDescription(UInt32, BufferUsage)
Constructs a new BufferDescription describing a non-dynamic DeviceBuffer.
Declaration
public BufferDescription(uint sizeInBytes, BufferUsage usage)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | sizeInBytes | The desired capacity, in bytes. |
BufferUsage | usage | Indicates how the DeviceBuffer will be used. |
BufferDescription(UInt32, BufferUsage, UInt32)
Constructs a new BufferDescription.
Declaration
public BufferDescription(uint sizeInBytes, BufferUsage usage, uint structureByteStride)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | sizeInBytes | The desired capacity, in bytes. |
BufferUsage | usage | Indicates how the DeviceBuffer will be used. |
System.UInt32 | 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. |
BufferDescription(UInt32, BufferUsage, UInt32, Boolean)
Constructs a new BufferDescription.
Declaration
public BufferDescription(uint sizeInBytes, BufferUsage usage, uint structureByteStride, bool rawBuffer)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | sizeInBytes | The desired capacity, in bytes. |
BufferUsage | usage | Indicates how the DeviceBuffer will be used. |
System.UInt32 | 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. |
System.Boolean | 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. |
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.
Declaration
public bool RawBuffer
Field Value
Type | Description |
---|---|
System.Boolean |
SizeInBytes
The desired capacity, in bytes, of the DeviceBuffer.
Declaration
public uint SizeInBytes
Field Value
Type | Description |
---|---|
System.UInt32 |
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.
Declaration
public uint StructureByteStride
Field Value
Type | Description |
---|---|
System.UInt32 |
Usage
Indicates how the DeviceBuffer will be used.
Declaration
public BufferUsage Usage
Field Value
Type | Description |
---|---|
BufferUsage |
Methods
Equals(BufferDescription)
Element-wise equality.
Declaration
public bool Equals(BufferDescription other)
Parameters
Type | Name | Description |
---|---|---|
BufferDescription | other | The instance to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if all elements are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that is the hash code for this instance. |