Enum Class PresentMode

java.lang.Object
java.lang.Enum<PresentMode>
dev.engine.graphics.PresentMode
All Implemented Interfaces:
Serializable, Comparable<PresentMode>, Constable

public enum PresentMode extends Enum<PresentMode>
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)
  • Enum Constant Details

  • Method Details

    • values

      public static PresentMode[] 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

      public static PresentMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null