Struct D3D11BufferDesc
Describes a buffer resource.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11BufferDesc : IEquatable<D3D11BufferDesc>
Constructors
| Edit this page View SourceD3D11BufferDesc(uint, D3D11BindOptions)
Initializes a new instance of the D3D11BufferDesc struct.
Declaration
public D3D11BufferDesc(uint byteWidth, D3D11BindOptions bindOptions)
Parameters
Type | Name | Description |
---|---|---|
uint | byteWidth | Size of the buffer in bytes. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
D3D11BufferDesc(uint, D3D11BindOptions, D3D11Usage)
Initializes a new instance of the D3D11BufferDesc struct.
Declaration
public D3D11BufferDesc(uint byteWidth, D3D11BindOptions bindOptions, D3D11Usage usage)
Parameters
Type | Name | Description |
---|---|---|
uint | byteWidth | Size of the buffer in bytes. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
D3D11Usage | usage | Identify how the buffer is expected to be read from and written to. |
D3D11BufferDesc(uint, D3D11BindOptions, D3D11Usage, D3D11CpuAccessOptions)
Initializes a new instance of the D3D11BufferDesc struct.
Declaration
public D3D11BufferDesc(uint byteWidth, D3D11BindOptions bindOptions, D3D11Usage usage, D3D11CpuAccessOptions cpuAccessOptions)
Parameters
Type | Name | Description |
---|---|---|
uint | byteWidth | Size of the buffer in bytes. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
D3D11Usage | usage | Identify how the buffer is expected to be read from and written to. |
D3D11CpuAccessOptions | cpuAccessOptions | CPU access flags or 0 if no CPU access is necessary. |
D3D11BufferDesc(uint, D3D11BindOptions, D3D11Usage, D3D11CpuAccessOptions, D3D11ResourceMiscOptions)
Initializes a new instance of the D3D11BufferDesc struct.
Declaration
public D3D11BufferDesc(uint byteWidth, D3D11BindOptions bindOptions, D3D11Usage usage, D3D11CpuAccessOptions cpuAccessOptions, D3D11ResourceMiscOptions miscOptions)
Parameters
Type | Name | Description |
---|---|---|
uint | byteWidth | Size of the buffer in bytes. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
D3D11Usage | usage | Identify how the buffer is expected to be read from and written to. |
D3D11CpuAccessOptions | cpuAccessOptions | CPU access flags or 0 if no CPU access is necessary. |
D3D11ResourceMiscOptions | miscOptions | Miscellaneous flags or 0 if unused. |
D3D11BufferDesc(uint, D3D11BindOptions, D3D11Usage, D3D11CpuAccessOptions, D3D11ResourceMiscOptions, uint)
Initializes a new instance of the D3D11BufferDesc struct.
Declaration
public D3D11BufferDesc(uint byteWidth, D3D11BindOptions bindOptions, D3D11Usage usage, D3D11CpuAccessOptions cpuAccessOptions, D3D11ResourceMiscOptions miscOptions, uint structureByteStride)
Parameters
Type | Name | Description |
---|---|---|
uint | byteWidth | Size of the buffer in bytes. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
D3D11Usage | usage | Identify how the buffer is expected to be read from and written to. |
D3D11CpuAccessOptions | cpuAccessOptions | CPU access flags or 0 if no CPU access is necessary. |
D3D11ResourceMiscOptions | miscOptions | Miscellaneous flags or 0 if unused. |
uint | structureByteStride | The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer. |
Properties
| Edit this page View SourceBindOptions
Gets or sets a value indicating how the buffer will be bound to the pipeline.
Declaration
public D3D11BindOptions BindOptions { get; set; }
Property Value
Type | Description |
---|---|
D3D11BindOptions |
ByteWidth
Gets or sets the size of the buffer in bytes.
Declaration
public uint ByteWidth { get; set; }
Property Value
Type | Description |
---|---|
uint |
CpuAccessOptions
Gets or sets the CPU access flags or 0 if no CPU access is necessary.
Declaration
public D3D11CpuAccessOptions CpuAccessOptions { get; set; }
Property Value
Type | Description |
---|---|
D3D11CpuAccessOptions |
MiscOptions
Gets or sets the miscellaneous flags or 0 if unused.
Declaration
public D3D11ResourceMiscOptions MiscOptions { get; set; }
Property Value
Type | Description |
---|---|
D3D11ResourceMiscOptions |
StructureByteStride
Gets or sets the size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer.
Declaration
public uint StructureByteStride { get; set; }
Property Value
Type | Description |
---|---|
uint |
Usage
Gets or sets a value indicating how the buffer is expected to be read from and written to.
Declaration
public D3D11Usage Usage { get; set; }
Property Value
Type | Description |
---|---|
D3D11Usage |
Methods
| Edit this page View SourceEquals(D3D11BufferDesc)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D3D11BufferDesc other)
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceFrom<T>(T[], D3D11BindOptions)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(T[] data, D3D11BindOptions bindOptions) where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | data | The data. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
Returns
Type | Description |
---|---|
D3D11BufferDesc | A D3D11BufferDesc struct. |
Type Parameters
Name | Description |
---|---|
T | A struct. |
From<T>(T[], D3D11BindOptions, D3D11Usage)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(T[] data, D3D11BindOptions bindOptions, D3D11Usage usage) where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | data | The data. |
D3D11BindOptions | bindOptions | Identify how the buffer will be bound to the pipeline. |
D3D11Usage | usage | Identify how the buffer is expected to be read from and written to. |
Returns
Type | Description |
---|---|
D3D11BufferDesc | A D3D11BufferDesc struct. |
Type Parameters
Name | Description |
---|---|
T | A struct. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(D3D11BufferDesc, D3D11BufferDesc)
Compares two D3D11BufferDesc objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D3D11BufferDesc left, D3D11BufferDesc right)
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | left | The left D3D11BufferDesc to compare. |
D3D11BufferDesc | right | The right D3D11BufferDesc to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D3D11BufferDesc, D3D11BufferDesc)
Compares two D3D11BufferDesc objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D3D11BufferDesc left, D3D11BufferDesc right)
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | left | The left D3D11BufferDesc to compare. |
D3D11BufferDesc | right | The right D3D11BufferDesc to compare. |
Returns
Type | Description |
---|---|
bool |