Skip to content

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.

A hidden GLFW window without client API gives the window and input bridges; it ships in the dev and demo jars of the backend.

ReturnsSignatureSummary
VulkanSnapshotBackend()Creates the snapshot backend; the window and the surface are created when a run starts.

ReturnsSignatureSummary
voidcreate(int width, int height)Opens the hidden window, creates the host and registers the backend without audio, then begins the first frame.
voiddestroy()Ends the frame, destroys the backend, the host and the window, and gives the registries back the bridges they had before create.
voidpresent()Ends the frame of the host and begins the next one.
SnapshotImagecapture(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.
StringgetRenderer()Returns the name of the device.
VulkanBackendgetBackend()Returns the Vulkan backend.
SnapshotVulkanHostgetHost()Returns the Vulkan host.
GlfwSnapshotWindowgetWindow()Returns the hidden window.

VulkanSnapshotBackend()

Creates the snapshot backend; the window and the surface are created when a run starts.

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.


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

Report a problem with this page