ISnapshotBackend
interface ISnapshotBackend
Known subtypes: Lwjgl2SnapshotBackend, Lwjgl3SnapshotBackend, VulkanSnapshotBackend, IBorrowedTextureBackend, IStateGuardBackend
Package: dev.joid.test.snapshot · Module: tool-testkit · Source: ISnapshotBackend.java
A hidden surface on which a backend is registered, that the testkit draws on and captures.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | create(int width, int height) abstract | Creates a hidden surface of that size in pixels and registers your backend on it, without audio. |
void | destroy() abstract | Releases the surface and gives the registries back the bridges they had before create. |
void | present() abstract | Ends the frame on the surface: a buffer swap or a submission. |
SnapshotImage | capture(int width, int height) abstract | Returns the pixels of the last frame, before present(): the area of that size at the bottom-left corner of the surface. |
String | getRenderer() abstract | Returns the name of the GPU and of the driver; the references are stored per renderer. |
Method details
Section titled “Method details”create
Section titled “create”void create(int width, int height) abstract
Creates a hidden surface of that size in pixels and registers your backend on it, without audio.
destroy
Section titled “destroy”void destroy() abstract
Releases the surface and gives the registries back the bridges they had before create.
present
Section titled “present”void present() abstract
Ends the frame on the surface: a buffer swap or a submission.
capture
Section titled “capture”SnapshotImage capture(int width, int height) abstract
Returns the pixels of the last frame, before present(): the area of that size at the bottom-left corner of the surface.
getRenderer
Section titled “getRenderer”String getRenderer() abstract
Returns the name of the GPU and of the driver; the references are stored per renderer.
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
