Skip to content

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.

ReturnsSignatureSummary
voidcreate(int width, int height) abstractCreates a hidden surface of that size in pixels and registers your backend on it, without audio.
voiddestroy() abstractReleases the surface and gives the registries back the bridges they had before create.
voidpresent() abstractEnds the frame on the surface: a buffer swap or a submission.
SnapshotImagecapture(int width, int height) abstractReturns the pixels of the last frame, before present(): the area of that size at the bottom-left corner of the surface.
StringgetRenderer() abstractReturns the name of the GPU and of the driver; the references are stored per renderer.

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.


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