Struct BufferDescription
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
sizeInBytesintSize of the Buffer in bytes.
bufferFlagsBufferFlagsBuffer flags describing the type of Buffer.
usageGraphicsResourceUsageThe usage for the Buffer, which determines who can read/write data.
structureByteStrideintIf 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
SizeInBytes
Size of the Buffer in bytes.
public int SizeInBytes
Field Value
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
Usage
Usage for the Buffer, which determines who can read / write data.
public GraphicsResourceUsage Usage
Field Value
Methods
Equals(BufferDescription)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(BufferDescription other)
Parameters
otherBufferDescriptionAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
leftBufferDescriptionrightBufferDescription
Returns
operator !=(BufferDescription, BufferDescription)
public static bool operator !=(BufferDescription left, BufferDescription right)
Parameters
leftBufferDescriptionrightBufferDescription