Skip to content

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.

It ships in the dev and demo jars of the backends; the published joid-base-lwjgl3-glfw jar does not hold it.

ReturnsSignatureSummary
GlfwSnapshotWindowcreate(int width, int height, Runnable hints) factoryInitializes 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.

ReturnsSignatureSummary
voiddestroy()Destroys the window.
longgetWindow()Returns the GLFW handle of the window.

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.

void destroy()

Destroys the window.

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

Report a problem with this page