 |
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.VulkanAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic 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
GpuBufferstaging GpuBuffer
See Also