Header menu logo Nu

BufferWrapper Type

Wraps a vulkan buffer and its metadata. OPTIMIZATION: this is a struct to avoid reduce GC presence.

Record fields

Record Field Description

Mapping_

Full Usage: Mapping_

Field type: voidptr
Field type: voidptr

Size_

Full Usage: Size_

Field type: int
Field type: int

UploadEnabled_

Full Usage: UploadEnabled_

Field type: bool
Field type: bool

VkBuffer_

Full Usage: VkBuffer_

Field type: VkBuffer
Modifiers: mutable
Field type: VkBuffer

VmaAllocation_

Full Usage: VmaAllocation_

Field type: VmaAllocation
Field type: VmaAllocation

Instance members

Instance member Description

this.Size

Full Usage: this.Size

Returns: int

The size of the underlying buffer.

Returns: int

this.VkBuffer

Full Usage: this.VkBuffer

Returns: VkBuffer

The underlying vulkan buffer.

Returns: VkBuffer

Static members

Static member Description

BufferWrapper.create bufferType bufferSize context

Full Usage: BufferWrapper.create bufferType bufferSize context

Parameters:
Returns: BufferWrapper

Create buffer wrapper.

bufferType : BufferType
bufferSize : int
context : VulkanContext
Returns: BufferWrapper

BufferWrapper.createPlus (uploadEnabled, bufferUsage, bufferInfo, context)

Full Usage: BufferWrapper.createPlus (uploadEnabled, bufferUsage, bufferInfo, context)

Parameters:
Returns: BufferWrapper

Create buffer wrapper.

uploadEnabled : bool
bufferUsage : VmaMemoryUsage
bufferInfo : byref<VkBufferCreateInfo>
context : VulkanContext
Returns: BufferWrapper

BufferWrapper.destroy (bufferWrapper, context)

Full Usage: BufferWrapper.destroy (bufferWrapper, context)

Parameters:

Destroy buffer and allocation.

bufferWrapper : byref<BufferWrapper>
context : VulkanContext

BufferWrapper.flush (offset, alignment, size, count, bufferWrapper, context)

Full Usage: BufferWrapper.flush (offset, alignment, size, count, bufferWrapper, context)

Parameters:

Flush data to buffer if upload is enabled.

offset : int
alignment : int
size : int
count : int
bufferWrapper : inref<BufferWrapper>
context : VulkanContext

BufferWrapper.write (offset, alignment, size, count, data, bufferWrapper, arg7)

Full Usage: BufferWrapper.write (offset, alignment, size, count, data, bufferWrapper, arg7)

Parameters:

Write data to buffer if upload is enabled.

offset : int
alignment : int
size : int
count : int
data : nativeint
bufferWrapper : inref<BufferWrapper>
arg6 : VulkanContext

Type something to start searching.