 |
VulkanDeviceCreatePersistentlyMappedBufferT(T, BufferUsageFlags, Boolean, String) Method |
CreatePersistentlyMappedBuffer creates a GpuBuffer in a host visibile memory that is persistently mapped.
This means that the buffer can be written to directly from the CPU without the need to map and unmap the memory.
The buffer is initially filled with the specified data.
Namespace: Ab4d.SharpEngine.VulkanAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntaxpublic GpuBuffer CreatePersistentlyMappedBuffer<T>(
T[] data,
BufferUsageFlags usage,
bool canUseDeviceLocalHostVisibleMemory = true,
string? name = null
)
where T : struct, new()
Parameters
- data T
- data array
- usage BufferUsageFlags
- usage of the buffer, for example VertexBuffer or IndexBuffer
- canUseDeviceLocalHostVisibleMemory Boolean (Optional)
- when true (by default) then HostVisible memory that is also DeviceLocal is used when available by the GPU
- name String (Optional)
- optional name of the buffer
Type Parameters
- T
- type of data
Return Value
GpuBufferCreated GpuBuffer
See Also