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.
Description
Section titled “Description”The system property joid.snapshot.profile picks a SnapshotProfile; it ships in the dev and demo jars of the backend.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| Lwjgl3SnapshotBackend() | 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 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. |
Creation details
Section titled “Creation details”Lwjgl3SnapshotBackend
Section titled “Lwjgl3SnapshotBackend”Lwjgl3SnapshotBackend()
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 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.
destroy
Section titled “destroy”void destroy()
Destroys the window and gives the registries back the bridges they had before create.
present
Section titled “present”void present()
Swaps the buffers of the window.
capture
Section titled “capture”SnapshotImage capture(int width, int height)
Returns the pixels of the back buffer.
getRenderer
Section titled “getRenderer”String getRenderer()
Returns the renderer string of the driver.
getProfile
Section titled “getProfile”SnapshotProfile getProfile()
Returns the profile of the run.
getBridge
Section titled “getBridge”GlRenderBridge getBridge()
Returns the OpenGL render bridge.
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
