[]
Initializes a new instance of the Buffer class.
public static Buffer Create(Device device, BufferDescription description)
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)
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)
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)
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)
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
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
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
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
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 |