 |
VulkanDeviceCreatePersistentlyMappedBufferT(Int32, 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 size of the buffer is defined by the type of data (T) and the dataItemsCount parameter.
Namespace: Ab4d.SharpEngine.VulkanAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
Syntaxpublic GpuBuffer CreatePersistentlyMappedBuffer<T>(
int dataItemsCount,
BufferUsageFlags usage,
bool canUseDeviceLocalHostVisibleMemory = true,
string? name = null
)
where T : struct, new()
Parameters
- dataItemsCount Int32
- number of items of type T that specifies the size of the created buffer
- 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