GlfwSnapshotWindow
final class GlfwSnapshotWindow
Package: dev.joid.base.lwjgl3.glfw.snapshot · Module: base-lwjgl3-glfw · Source: GlfwSnapshotWindow.java
Backends: LWJGL 3 Vulkan
A hidden, undecorated GLFW window of a fixed size, on which the snapshot backends render.
Description
Section titled “Description”It ships in the dev and demo jars of the backends; the published joid-base-lwjgl3-glfw jar does not hold it.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
GlfwSnapshotWindow | create(int width, int height, Runnable hints) factory | Initializes GLFW, runs hints to set the window hints of the backend, then creates a hidden window of that size in GLFW window coordinates; on a high-density macOS screen, its framebuffer is larger. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | destroy() | Destroys the window. |
long | getWindow() | Returns the GLFW handle of the window. |
Creation details
Section titled “Creation details”create
Section titled “create”GlfwSnapshotWindow create(int width, int height, Runnable hints) factory
Throws:
IllegalStateException: GLFW cannot be initialized, check that the system has a display (DISPLAY or WAYLAND_DISPLAY on Linux)IllegalStateException: GLFW cannot create the …x… snapshot window, check that the graphics driver supports the graphics API the window asks for (its OpenGL version or Vulkan)
Initializes GLFW, runs hints to set the window hints of the backend, then creates a hidden window of that size in GLFW window coordinates; on a high-density macOS screen, its framebuffer is larger.
Throws an IllegalStateException when GLFW cannot start, often for lack of a display, or when the driver refuses the window.
Method details
Section titled “Method details”destroy
Section titled “destroy”void destroy()
Destroys the window.
getWindow
Section titled “getWindow”long getWindow()
Returns the GLFW handle of the 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
