Enum Class PresentMode
- All Implemented Interfaces:
Serializable, Comparable<PresentMode>, Constable
Presentation mode controlling vsync behavior.
FIFO— VSync on. Frames queued in order, displayed at monitor refresh rate.IMMEDIATE— VSync off. Frames presented immediately, may tear on X11.MAILBOX— Triple-buffered. Uncapped rendering, only latest frame displayed at refresh. No tearing.
Availability depends on the backend and platform:
- OpenGL: FIFO = swapInterval(1), IMMEDIATE = swapInterval(0), MAILBOX = swapInterval(-1) (adaptive, not always available)
- Vulkan: all three modes supported on X11; IMMEDIATE unavailable on Wayland (falls back to MAILBOX)
- WebGPU: IMMEDIATE unavailable on Wayland (falls back to MAILBOX)
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic PresentModeReturns the enum constant of this class with the specified name.static PresentMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIFO
-
IMMEDIATE
-
MAILBOX
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-