[]
        
(Showing Draft Content)

C1.Util.DX.Direct3D11.Buffer.Create

Create Method

Create(Device, BufferDescription)

Initializes a new instance of the Buffer class.

Declaration
public static Buffer Create(Device device, BufferDescription description)
Public Shared Function Create(device As Device, description As BufferDescription) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

BufferDescription description

The description of the buffer.

Returns
Type Description
Buffer

Create(Device, DataStream, BufferDescription)

Initializes a new instance of the Buffer class.

Declaration
public static Buffer Create(Device device, DataStream data, BufferDescription description)
Public Shared Function Create(device As Device, data As DataStream, description As BufferDescription) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

DataStream data

Initial data used to initialize the buffer.

BufferDescription description

The description of the buffer.

Returns
Type Description
Buffer

Create(Device, IntPtr, BufferDescription)

Initializes a new instance of the Buffer class.

Declaration
public static Buffer Create(Device device, IntPtr dataPointer, BufferDescription description)
Public Shared Function Create(device As Device, dataPointer As IntPtr, description As BufferDescription) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

IntPtr dataPointer

The data pointer.

BufferDescription description

The description of the buffer.

Returns
Type Description
Buffer

Create(Device, int, ResourceUsage, BindFlags, CpuAccessFlags, ResourceMiscFlags, int)

Initializes a new instance of the Buffer class.

Declaration
public static Buffer Create(Device device, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)
Public Shared Function Create(device As Device, sizeInBytes As Integer, usage As ResourceUsage, bindFlags As BindFlags, accessFlags As CpuAccessFlags, miscFlags As ResourceMiscFlags, structureByteStride As Integer) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

int sizeInBytes

The size, in bytes, of the buffer.

ResourceUsage usage

The usage pattern for the buffer.

BindFlags bindFlags

Flags specifying how the buffer will be bound to the pipeline.

CpuAccessFlags accessFlags

Flags specifying how the buffer will be accessible from the CPU.

ResourceMiscFlags miscFlags

Miscellaneous resource options.

int structureByteStride

The size (in bytes) of the structure element for structured buffers.

Returns
Type Description
Buffer

Create(Device, DataStream, int, ResourceUsage, BindFlags, CpuAccessFlags, ResourceMiscFlags, int)

Initializes a new instance of the Buffer class.

Declaration
public static Buffer Create(Device device, DataStream data, int sizeInBytes, ResourceUsage usage, BindFlags bindFlags, CpuAccessFlags accessFlags, ResourceMiscFlags miscFlags, int structureByteStride)
Public Shared Function Create(device As Device, data As DataStream, sizeInBytes As Integer, usage As ResourceUsage, bindFlags As BindFlags, accessFlags As CpuAccessFlags, miscFlags As ResourceMiscFlags, structureByteStride As Integer) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

DataStream data

Initial data used to initialize the buffer.

int sizeInBytes

The size, in bytes, of the buffer.

ResourceUsage usage

The usage pattern for the buffer.

BindFlags bindFlags

Flags specifying how the buffer will be bound to the pipeline.

CpuAccessFlags accessFlags

Flags specifying how the buffer will be accessible from the CPU.

ResourceMiscFlags miscFlags

Miscellaneous resource options.

int structureByteStride

The size (in bytes) of the structure element for structured buffers.

Returns
Type Description
Buffer

Create<T>(Device, BindFlags, ref T, int, ResourceUsage, CpuAccessFlags, ResourceMiscFlags, int)

Creates a new instance of the Buffer class.

Declaration
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
Public Shared Function Create(Of T As Structure)(device As Device, bindFlags As BindFlags, ByRef data As T, Optional sizeInBytes As Integer = 0, Optional usage As ResourceUsage = ResourceUsage.Default, Optional accessFlags As CpuAccessFlags = CpuAccessFlags.None, Optional miscFlags As ResourceMiscFlags = ResourceMiscFlags.None, Optional structureByteStride As Integer = 0) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

BindFlags bindFlags

Flags specifying how the buffer will be bound to the pipeline.

T data

Initial data used to initialize the buffer.

int sizeInBytes

The size, in bytes, of the buffer. If 0 is specified, sizeof(T) is used.

ResourceUsage usage

The usage pattern for the buffer.

CpuAccessFlags accessFlags

Flags specifying how the buffer will be accessible from the CPU.

ResourceMiscFlags miscFlags

Miscellaneous resource options.

int structureByteStride

The size (in bytes) of the structure element for structured buffers.

Returns
Type Description
Buffer

An initialized buffer

Type Parameters
Name Description
T

Type of the data to upload

Create<T>(Device, BindFlags, T[], int, ResourceUsage, CpuAccessFlags, ResourceMiscFlags, int)

Creates a new instance of the Buffer class.

Declaration
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
Public Shared Function Create(Of T As Structure)(device As Device, bindFlags As BindFlags, data As T(), Optional sizeInBytes As Integer = 0, Optional usage As ResourceUsage = ResourceUsage.Default, Optional accessFlags As CpuAccessFlags = CpuAccessFlags.None, Optional miscFlags As ResourceMiscFlags = ResourceMiscFlags.None, Optional structureByteStride As Integer = 0) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

BindFlags bindFlags

Flags specifying how the buffer will be bound to the pipeline.

T[] data

Initial data used to initialize the buffer.

int sizeInBytes

The size, in bytes, of the buffer. If 0 is specified, sizeof(T) * data.Length is used.

ResourceUsage usage

The usage pattern for the buffer.

CpuAccessFlags accessFlags

Flags specifying how the buffer will be accessible from the CPU.

ResourceMiscFlags miscFlags

Miscellaneous resource options.

int structureByteStride

The size (in bytes) of the structure element for structured buffers.

Returns
Type Description
Buffer

An initialized buffer

Type Parameters
Name Description
T

Type of the data to upload

Create<T>(Device, ref T, BufferDescription)

Creates a new instance of the Buffer class.

Declaration
public static Buffer Create<T>(Device device, ref T data, BufferDescription description) where T : struct
Public Shared Function Create(Of T As Structure)(device As Device, ByRef data As T, description As BufferDescription) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

T data

Initial data used to initialize the buffer.

BufferDescription description

The description.

Returns
Type Description
Buffer

An initialized buffer

Type Parameters
Name Description
T

Type of the data to upload

Create<T>(Device, T[], BufferDescription)

Creates a new instance of the Buffer class.

Declaration
public static Buffer Create<T>(Device device, T[] data, BufferDescription description) where T : struct
Public Shared Function Create(Of T As Structure)(device As Device, data As T(), description As BufferDescription) As Buffer
Parameters
Type Name Description
Device device

The device with which to associate the buffer.

T[] data

Initial data used to initialize the buffer.

BufferDescription description

The description.

Returns
Type Description
Buffer

An initialized buffer

Type Parameters
Name Description
T

Type of the data to upload