Click or drag to resize
Ab4d.SharpEngine logo

VulkanDeviceCreateStagingBufferT(Int32, Boolean, QueueFlags, String) Method

Creates a GpuBuffer that can be used for transferring data to the GPU (isTransferSource: true) or from the GPU (isTransferSource: false). To use staging buffer with batch update, use the StagingGpuBuffer from this device or create a new GpuStagingBuffer.

Namespace: Ab4d.SharpEngine.Vulkan
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public GpuBuffer CreateStagingBuffer<T>(
	int dataItemsCount,
	bool isTransferSource,
	QueueFlags queueFamilies = QueueFlags.Graphics,
	string? name = "StagingBuffer"
)
where T : struct, new()

Parameters

dataItemsCount  Int32
number of items of type T that will be stored in the buffer
isTransferSource  Boolean
true when transferring data to the GPU (BufferUsageFlags: TransferSrc), false when transferring data from the GPU (BufferUsageFlags: TransferDst)
queueFamilies  QueueFlags  (Optional)
queueFamilies (Graphics by default)
name  String  (Optional)
name ("StagingBuffer" by default)

Type Parameters

T

Return Value

GpuBuffer
staging GpuBuffer
See Also