VulkanBuffer
final class VulkanBuffer
Package: dev.joid.backend.vulkan.render.buffer · Module: backend-vulkan · Source: VulkanBuffer.java
Backends: Vulkan
A Vulkan buffer in host-visible, coherent memory, mapped for its whole life.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| VulkanBuffer(VulkanContext context, long size, int usage) | Creates and maps a buffer of that size in bytes, for that usage. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | destroy() | Unmaps the memory and destroys the buffer and its memory. |
long | getSize() | Returns the size of the buffer, in bytes. |
long | getBuffer() | Returns the Vulkan buffer handle. |
long | getMemory() | Returns the Vulkan memory handle. |
long | getAddress() | Returns the address of the mapped memory. |
VulkanContext | getContext() | Returns the device context. |
Creation details
Section titled “Creation details”VulkanBuffer
Section titled “VulkanBuffer”VulkanBuffer(VulkanContext context, long size, int usage)
Creates and maps a buffer of that size in bytes, for that usage.
Method details
Section titled “Method details”destroy
Section titled “destroy”void destroy()
Unmaps the memory and destroys the buffer and its memory.
getSize
Section titled “getSize”long getSize()
Returns the size of the buffer, in bytes.
getBuffer
Section titled “getBuffer”long getBuffer()
Returns the Vulkan buffer handle.
getMemory
Section titled “getMemory”long getMemory()
Returns the Vulkan memory handle.
getAddress
Section titled “getAddress”long getAddress()
Returns the address of the mapped memory.
getContext
Section titled “getContext”VulkanContext getContext()
Returns the device context.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
