VulkanSnapshotBackend
final class VulkanSnapshotBackend
Implements: ISnapshotBackend
Package: dev.joid.backend.vulkan.snapshot · Module: backend-vulkan · Source: VulkanSnapshotBackend.java
Backends: Vulkan
The snapshot backend of Vulkan, which renders through a SnapshotVulkanHost into an offscreen image.
Description
Section titled “Description”A hidden GLFW window without client API gives the window and input bridges; it ships in the dev and demo jars of the backend.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| VulkanSnapshotBackend() | Creates the snapshot backend; the window and the surface are created when a run starts. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | create(int width, int height) | Opens the hidden window, creates the host and registers the backend without audio, then begins the first frame. |
void | destroy() | Ends the frame, destroys the backend, the host and the window, and gives the registries back the bridges they had before create. |
void | present() | Ends the frame of the host and begins the next one. |
SnapshotImage | capture(int width, int height) | Copies the bottom rows of the target image of that size into a buffer, ends the frame and returns the pixels. |
String | getRenderer() | Returns the name of the device. |
VulkanBackend | getBackend() | Returns the Vulkan backend. |
SnapshotVulkanHost | getHost() | Returns the Vulkan host. |
GlfwSnapshotWindow | getWindow() | Returns the hidden window. |
Creation details
Section titled “Creation details”VulkanSnapshotBackend
Section titled “VulkanSnapshotBackend”VulkanSnapshotBackend()
Creates the snapshot backend; the window and the surface are created when a run starts.
Method details
Section titled “Method details”create
Section titled “create”void create(int width, int height)
Opens the hidden window, creates the host and registers the backend without audio, then begins the first frame.
destroy
Section titled “destroy”void destroy()
Ends the frame, destroys the backend, the host and the window, and gives the registries back the bridges they had before create.
present
Section titled “present”void present()
Ends the frame of the host and begins the next one.
capture
Section titled “capture”SnapshotImage capture(int width, int height)
Copies the bottom rows of the target image of that size into a buffer, ends the frame and returns the pixels.
getRenderer
Section titled “getRenderer”String getRenderer()
Returns the name of the device.
getBackend
Section titled “getBackend”VulkanBackend getBackend()
Returns the Vulkan backend.
getHost
Section titled “getHost”SnapshotVulkanHost getHost()
Returns the Vulkan host.
getWindow
Section titled “getWindow”GlfwSnapshotWindow getWindow()
Returns the hidden window.
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
