Skip to content

Lwjgl3SnapshotBackend

final class Lwjgl3SnapshotBackend
Implements: ISnapshotBackend
Package: dev.joid.backend.lwjgl3.snapshot · Module: backend-lwjgl3 · Source: Lwjgl3SnapshotBackend.java
Backends: LWJGL 3

The snapshot backend of LWJGL 3, which renders in a hidden GLFW window with the OpenGL profile of the test run.

The system property joid.snapshot.profile picks a SnapshotProfile; it ships in the dev and demo jars of the backend.

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

ReturnsSignatureSummary
voidcreate(int width, int height)Opens a hidden window of that size, in GLFW window coordinates, with the context of the profile, registers the backend without audio and without vsync, and checks that the context matches the profile.
voiddestroy()Destroys the window and gives the registries back the bridges they had before create.
voidpresent()Swaps the buffers of the window.
SnapshotImagecapture(int width, int height)Returns the pixels of the back buffer.
StringgetRenderer()Returns the renderer string of the driver.
SnapshotProfilegetProfile()Returns the profile of the run.
GlRenderBridgegetBridge()Returns the OpenGL render bridge.
GlfwSnapshotWindowgetWindow()Returns the hidden window.

Lwjgl3SnapshotBackend()

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

void create(int width, int height)

Opens a hidden window of that size, in GLFW window coordinates, with the context of the profile, registers the backend without audio and without vsync, and checks that the context matches the profile.

void destroy()

Destroys the window and gives the registries back the bridges they had before create.

void present()

Swaps the buffers of the window.

SnapshotImage capture(int width, int height)

Returns the pixels of the back buffer.

String getRenderer()

Returns the renderer string of the driver.

SnapshotProfile getProfile()

Returns the profile of the run.

GlRenderBridge getBridge()

Returns the OpenGL render bridge.

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