Click or drag to resize
Ab4d.SharpEngine logo

VulkanDeviceCreateBufferAsyncT(T, Int32, BufferUsageFlags, Boolean, Boolean, String) Method

CreateBufferAsync method creates the GpuBuffer and uploads the specified data in the background thread.

Namespace: Ab4d.SharpEngine.Vulkan
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
public Task<GpuBuffer> CreateBufferAsync<T>(
	T[] data,
	int dataItemsCount,
	BufferUsageFlags usage,
	bool isDeviceLocal = true,
	bool canUseDeviceLocalHostVisibleMemory = true,
	string? name = null
)
where T : struct, new()

Parameters

data  T
data array
dataItemsCount  Int32
number of items from the data array to copy to buffer
usage  BufferUsageFlags
usage of the buffer, for example VertexBuffer or IndexBuffer
isDeviceLocal  Boolean  (Optional)
true (by default) when the buffer is created in device local memory
canUseDeviceLocalHostVisibleMemory  Boolean  (Optional)
when true (by default) then DeviceLocal and HostVisible memory is used when available
name  String  (Optional)
optional name of the buffer

Type Parameters

T
type of data

Return Value

TaskGpuBuffer
Created GpuBuffer
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Vulkan.VulkanDevice.CreateBufferAsync``1(``0[],System.Int32,Ab4d.Vulkan.BufferUsageFlags,System.Boolean,System.Boolean,System.String)"]

See Also