[]
ID3D11Buffer
[Guid("48570b85-d1ee-4fcd-a250-eb350722b037")]
public class Buffer : Resource, IDisposable, IUnknown
Initializes a new instance of the Buffer class.
public Buffer(IntPtr nativePtr)
nativePtr System.IntPtrThe native pointer.
GetDescription
public BufferDescription Description { get; }
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, DataStream data, BufferDescription description)
device DeviceThe device with which to associate the buffer.
data DataStreamInitial data used to initialize the buffer.
description BufferDescriptionThe description of the buffer.
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, DataStream data, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)
device DeviceThe device with which to associate the buffer.
data DataStreamInitial data used to initialize the buffer.
sizeInBytes intThe size, in bytes, of the buffer.
usage ResourceUsageThe usage pattern for the buffer.
bindFlags BindFlagsFlags specifying how the buffer will be bound to the pipeline.
accessFlags CpuAccessFlagsFlags specifying how the buffer will be accessible from the CPU.
miscFlags ResourceMiscFlagsMiscellaneous resource options.
structureByteStride intThe size (in bytes) of the structure element for structured buffers.
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, BufferDescription description)
device DeviceThe device with which to associate the buffer.
description BufferDescriptionThe description of the buffer.
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)
device DeviceThe device with which to associate the buffer.
sizeInBytes intThe size, in bytes, of the buffer.
usage ResourceUsageThe usage pattern for the buffer.
bindFlags BindFlagsFlags specifying how the buffer will be bound to the pipeline.
accessFlags CpuAccessFlagsFlags specifying how the buffer will be accessible from the CPU.
miscFlags ResourceMiscFlagsMiscellaneous resource options.
structureByteStride intThe size (in bytes) of the structure element for structured buffers.
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, IntPtr dataPointer, BufferDescription description)
device DeviceThe device with which to associate the buffer.
dataPointer System.IntPtrThe data pointer.
description BufferDescriptionThe description of the buffer.
Creates a new instance of the Buffer class.
public static Buffer Create<T>(Device device, T[] data, BufferDescription description) where T : struct
device DeviceThe device with which to associate the buffer.
data T[]Initial data used to initialize the buffer.
description BufferDescriptionThe description.
An initialized buffer
TType of the data to upload
Creates a new instance of the Buffer class.
public static Buffer Create<T>(Device device, ref T data, BufferDescription description) where T : struct
device DeviceThe device with which to associate the buffer.
data TInitial data used to initialize the buffer.
description BufferDescriptionThe description.
An initialized buffer
TType of the data to upload
Creates a new instance of the Buffer class.
public static Buffer Create<T>(Device device, BindFlags bindFlags, T[] data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceMiscFlags miscFlags = ResourceMiscFlags.None, int structureByteStride = 0) where T : struct
device DeviceThe device with which to associate the buffer.
bindFlags BindFlagsFlags specifying how the buffer will be bound to the pipeline.
data T[]Initial data used to initialize the buffer.
sizeInBytes intThe size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.
usage ResourceUsageThe usage pattern for the buffer.
accessFlags CpuAccessFlagsFlags specifying how the buffer will be accessible from the CPU.
miscFlags ResourceMiscFlagsMiscellaneous resource options.
structureByteStride intThe size (in bytes) of the structure element for structured buffers.
An initialized buffer
TType of the data to upload
Creates a new instance of the Buffer class.
public static Buffer Create<T>(Device device, BindFlags bindFlags, ref T data, int sizeInBytes = 0, ResourceUsage usage = ResourceUsage.Default, CpuAccessFlags accessFlags = CpuAccessFlags.None, ResourceMiscFlags miscFlags = ResourceMiscFlags.None, int structureByteStride = 0) where T : struct
device DeviceThe device with which to associate the buffer.
bindFlags BindFlagsFlags specifying how the buffer will be bound to the pipeline.
data TInitial data used to initialize the buffer.
sizeInBytes intThe size, in bytes, of the buffer. If 0 is specified, sizeof(T) is used.
usage ResourceUsageThe usage pattern for the buffer.
accessFlags CpuAccessFlagsFlags specifying how the buffer will be accessible from the CPU.
miscFlags ResourceMiscFlagsMiscellaneous resource options.
structureByteStride intThe size (in bytes) of the structure element for structured buffers.
An initialized buffer
TType of the data to upload
void ID3D11Buffer::GetDesc([Out] D3D11_BUFFER_DESC* pDesc)
public void GetDescription(out BufferDescription descRef)
descRef BufferDescriptionPerforms an explicit conversion from System.IntPtr to Buffer.
public static explicit operator Buffer(IntPtr nativePointer)
nativePointer System.IntPtr