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
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
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
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
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
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
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
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
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
[SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "byte", Justification = "Reviewed")]
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)
Declaration
public readonly bool Equals(D3D11BufferDesc other)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11BufferDesc | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceFrom<T>(D3D11BindOptions)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(D3D11BindOptions bindOptions) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| 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>(D3D11BindOptions, D3D11Usage)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(D3D11BindOptions bindOptions, D3D11Usage usage) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| 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. |
From<T>(ReadOnlySpan<T>, D3D11BindOptions)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(ReadOnlySpan<T> data, D3D11BindOptions bindOptions) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<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>(ReadOnlySpan<T>, D3D11BindOptions, D3D11Usage)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(ReadOnlySpan<T> data, D3D11BindOptions bindOptions, D3D11Usage usage) where T : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<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. |
From<T>(T[], D3D11BindOptions)
Creates a D3D11BufferDesc struct from a struct.
Declaration
public static D3D11BufferDesc From<T>(T[] data, D3D11BindOptions bindOptions) where T : unmanaged
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 : unmanaged
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()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceNativeReadFrom(nint)
Declaration
public static D3D11BufferDesc NativeReadFrom(nint buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer |
Returns
| Type | Description |
|---|---|
| D3D11BufferDesc |
NativeReadFrom(nint, Span<D3D11BufferDesc>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D3D11BufferDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| Span<D3D11BufferDesc> | objects |
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
| Type | Description |
|---|---|
| int |
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| int | count |
Returns
| Type | Description |
|---|---|
| int |
NativeWriteTo(nint, in D3D11BufferDesc)
Declaration
public static void NativeWriteTo(nint buffer, in D3D11BufferDesc obj)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| D3D11BufferDesc | obj |
NativeWriteTo(nint, ReadOnlySpan<D3D11BufferDesc>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D3D11BufferDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| ReadOnlySpan<D3D11BufferDesc> | objects |
Operators
| Edit this page View Sourceoperator ==(D3D11BufferDesc, D3D11BufferDesc)
Declaration
public static bool operator ==(D3D11BufferDesc left, D3D11BufferDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11BufferDesc | left | |
| D3D11BufferDesc | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(D3D11BufferDesc, D3D11BufferDesc)
Declaration
public static bool operator !=(D3D11BufferDesc left, D3D11BufferDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11BufferDesc | left | |
| D3D11BufferDesc | right |
Returns
| Type | Description |
|---|---|
| bool |