[]
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, BufferDescription description)
Public Shared Function Create(device As Device, description As BufferDescription) As Buffer
| Type | Name | Description |
|---|---|---|
| Device | device | The device with which to associate the buffer. |
| BufferDescription | description | The description of the buffer. |
| Type | Description |
|---|---|
| Buffer |
Initializes a new instance of the Buffer class.
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
| 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. |
| Type | Description |
|---|---|
| Buffer |
Initializes a new instance of the Buffer class.
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
| 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. |
| Type | Description |
|---|---|
| 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)
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
| 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. |
| Type | Description |
|---|---|
| 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)
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
| 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. |
| Type | Description |
|---|---|
| Buffer |
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
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
| 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. |
| Type | Description |
|---|---|
| Buffer | An initialized buffer |
| Name | Description |
|---|---|
| T | Type 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
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
| 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. |
| Type | Description |
|---|---|
| Buffer | An initialized buffer |
| Name | Description |
|---|---|
| T | Type 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
Public Shared Function Create(Of T As Structure)(device As Device, ByRef data As T, description As BufferDescription) As Buffer
| 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. |
| Type | Description |
|---|---|
| Buffer | An initialized buffer |
| Name | Description |
|---|---|
| T | Type of the data to upload |
Creates a new instance of the Buffer class.
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
| 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. |
| Type | Description |
|---|---|
| Buffer | An initialized buffer |
| Name | Description |
|---|---|
| T | Type of the data to upload |