Skip to content

lwjgl3ify ​

44 merged pull requests.

New Features ​

  • #324 Introduced new API classes (DisplayEvents.java, DisplayWindowContext.java, GLCapabilitiesOverride.java, SwapchainInvalidatingChange.java) and enhanced Display.java and ContextCapabilities.java to support GPU-managed rendering contexts and pre/post window creation callbacks. - @mitchej123
    • Added: DisplayEvents API for window lifecycle callbacks, DisplayWindowContext API for custom rendering contexts, GLCapabilitiesOverride API for custom GL capabilities, SwapchainInvalidatingChange notification API, SDL-GPU and ES shader compilation support (shaderc, sprvutils)
  • #281 Added taskbar progress notifications via SDL3 in LoadingProgressNotify, new configuration option, and Sys.java integration for progress updates. - @eigenraven
    • Added: taskbar progress display configuration option, LoadingProgressNotify mixin for progress tracking, SDL3 taskbar progress API in Sys.java
  • #279 Added java-runtime-epsilon to the custom Prism Minecraft JSON configuration to enable automatic JDK 25 downloading. - @DioEgizio
    • Added: java-runtime-epsilon to prism launcher metadata
  • #251 Added discreteScrolling configuration option in Config.java and implemented scroll event handling logic in Mouse.java. - @nullTheCoder
    • Added: discrete scrolling configuration option
    • Fixed: inconsistent scrolling behavior

Changes ​

  • #333 version.json and the Prism net.minecraftforge.json patch now use downloads.artifact entries with sha1, size and url for Forge, akka, config, scala and other libraries. build.gradle.kts computes the SHA1 and size of the forgePatches jar and substitutes them into version.json through ReplaceTokens. - @FalsePattern
    • Added: SHA1 checksum validation for launcher libraries
  • #303 Bumped lwjgl in libs.versions.toml from a 3.4.0 snapshot to 3.4.0, switched the release download URL to repo1.maven.org in Lwjgl3JsonMaker, added lwjglVersion token replacement for patches/net.minecraft.json in the MMC zip, updated the settings convention plugin to 2.0.16 and switched enableModernJavaSyntax to jabel. - @eigenraven
  • #288 Removed the GTNHLib dependency from dependencies.gradle, the rfb-plugin properties and the modrinth/curseforge relations. Replaced fastutil maps in Keyboard with Trove maps and joml Math.clamp with MathHelper.clamp_int. Handles SDL_EVENT_KEYMAP_CHANGED by clearing and repopulating the key lookup tables, and removed the unused SDL keycode name map from Display. - @eigenraven
    • Added: key name reload on keyboard layout change
    • Removed: GTNHLib dependency
  • #202 Updated to LWJGL 3.4.0 and migrated platform abstraction layer from GLFW to SDL3. Includes new build infrastructure, helper gradle tasks, and updated JVM arguments. - @eigenraven
    • Added: SDL3 integration for platform abstraction, new build helper gradle plugin (lwjgl3ify-helper), gradle-daemon-jvm.properties, java9args.txt
    • Fixed: keyboard handling issues, Wayland platform support

Bug Fixes ​

  • #375 In Display.create, the SDL window is created with the hidden property set to true. The saved icon is applied and SDL_ShowWindow is called right after window creation, before GL context setup. - @Eldrinn-Elantey
    • Fixed: Windows taskbar showing the javaw.exe icon instead of the window icon
    • Closes #347
  • #374 Mouse.setGrabbed sets ignoreNextDelta = 1 on macOS when grabbing, to skip the first SDL3 relative motion event. Bumps lwjgl to 3.4.3 in libs.versions.toml. - @danyadev
    • Fixed: view moving in the wrong direction after regrabbing the cursor on macOS
  • #369 ContextGL.destroy now wraps the SDL context and window destruction in MainThreadExec.runOnMainThread. - @danyadev
    • Fixed: hang on macOS when the splash screen context is destroyed
  • #366 AL.create passes deviceArguments to alcOpenDevice instead of the value from ALC_DEFAULT_DEVICE_SPECIFIER. The failure exception now includes the device name, or "default" when null. - @Algent
    • Fixed: OpenAL ignoring the requested output device
  • #365 In Lwjgl3ifyEventLoop.handleKeyEvent, KeyCodes.sdlScancodeToLwjgl now receives scanCode instead of keyCode. - @Chitak985
    • Fixed: Wrong LWJGL2 scancode in input events
  • #364 RelauncherUserInterface.startSettingsIfNeeded sets runClicked = true in the hideSettingsOnLaunch branch, so Relauncher.run() no longer exits silently. - @wufe8
    • Fixed: Silent exit with hideSettingsOnLaunch enabled
  • #363 Mouse.addWheelEvent now rounds the fractional wheel accumulator with Math.round instead of truncating, and subtracts the emitted whole notches from the accumulator instead of taking modulo 1. - @kevinrudde
    • Fixed: Lost scroll notches on high-resolution mouse wheels, Hotbar jumping several slots with forceDiscreteScrolling
  • #362 Relauncher no longer uses StringEscapeUtils.escapeJava for the java @argfile. It escapes only backslash and double quote and writes the file in sun.jnu.encoding, falling back to the default charset. - @alppp
    • Fixed: Relaunch crash with non-ASCII characters in paths
  • #356 Bumped the rfb version in gradle/libs.versions.toml from 1.1.0 to 1.1.1. - @mitchej123
    • Fixed: RetroFuturaBootstrap thread safety
  • #354 Modified Downloader.java to not suppress exceptions from download failures, and added missing checksum/size metadata for lzma-0.0.1.jar in launcher metadata. - @FalsePattern
    • Fixed: Launcher crash during library download with checksum failure
    • Closes #338
  • #352 Display.java now reads window and framebuffer size through updateWindowSizeFromSdl and updateFramebufferSize, which skip non-positive sizes. This replaces the separate latestWidth and latestHeight fields. The author says the cause was a guess, and was not seen again in about 2 hours of repeated launches. - @Algent
    • Fixed: black screen on startup from a zero framebuffer size
  • #349 Added glFenceSync, glIsSync, glDeleteSync, glClientWaitSync, glWaitSync, glGetInteger64, glGetSync and glGetSynci shims to org.lwjglx.opengl.ARBSync and GL32, forwarding to the LWJGL 3 classes through GLSync.getPointer. - @RecursivePineapple
    • Added: ARBSync fence sync shims, GL32 sync shims
    • Fixed: NoSuchMethodException when calling GLSync methods
  • #346 Lwjgl3ifyEventLoop.handleKeyEvent now also enters the ASCII branch when the scancode is in SDL_SCANCODE_A..Z. It picks the Ctrl escape character from the key's letter when the layout produces a Latin letter, and from the scancode otherwise. - @slprime
    • Fixed: Ctrl+key shortcuts not working on non-Latin keyboard layouts, AltGr+V copying from clipboard
    • Closes GTNH#23315
  • #344 TextFieldHandler.endTextInput and resetTextInput now clear textBuffer with setLength(0), so buffered text is no longer carried into the next input. - @Algent
    • Fixed: Map keybind appearing as first letter in chat after closing JourneyMap, JourneyMap button pasted into chat or NEI, Waypoint name box filling with 'e'
    • Closes GTNH#23831, #342, GTNH#25195
  • #339 New MixinGuiScreenBook, registered under TEXT_FIELD_SDL_INPUT. It starts and stops text input on open and close, redirects ChatAllowedCharacters.isAllowedCharacter in keyTypedInBook to false, and appends text from SDL text events through onTextEvent. - @tiffit
    • Fixed: Double typing in Book and Quill, Sensitive keyboard input in Book and Quill on Java 17
    • Closes #326, GTNH#24910
  • #336 Lwjgl3ify.postInit now calls removeIf(Objects::isNull) on the LaunchClassLoader class and transformer exclusion sets before sorting with Comparator.naturalOrder. - @Kai-Z-JP
    • Fixed: Crash when sorting null class loader exclusions
    • Closes #236, #239
  • #330 Lwjgl3ifyEventLoop.internalPumpEvents now ignores a mouse wheel event whose device ID differs from the previous wheel event in the same pump, only when the SDL video driver is x11. Also removed unused static imports. - @Redderpears
    • Fixed: Double hotbar scrolling on Linux
    • Closes #328
  • #321 New MixinGuiTextInput on GuiEditSign and GuiScreenBook calls TextFieldHandler.beginTextInput in initGui and endTextInput in onGuiClosed. XaerosMinimapScrolling got the same two hooks for its waypoint GUIs. - @qiuxtao
    • Fixed: Chinese IME not working in signs, books and Xaero's waypoint naming
  • #301 Lwjgl3ifyCoremod.getMixins now checks FMLLaunchHandler.side().isClient() before logging the STB stitching disabled error. - @mist475
    • Fixed: STB stitching mixin warning printed on dedicated servers
  • #292 Modified Keyboard.java to distinguish between gameplay-critical keys (which use scan codes for consistency) and other keys (which now use key codes to respect layout remappings). - @sbancuz
    • Fixed: Keybind modifications not being respected with non-standard keyboard layouts
    • Closes #285
  • #290 Added an OcInputBuffer mixin, applied when OpenComputers is present, that redirects Keyboard.getEventKey in InputBuffer$class.handleKeyboardInput to a new getEventKeyNonScancode. KeyEvent now stores keyNonScancode, filled from sdlKeycodeToLwjgl. OpenComputers 1.12.9-GTNH was added as a compileOnly dependency. - @eigenraven
    • Added: OpenComputers keyboard input mixin
    • Fixed: Key input in OpenComputers monitors
  • #289 build.gradle.kts now applies the manifest attributes to jar, shadowJar, forgePatchesJar and apiJar, adding Implementation-Title and Implementation-Version alongside Multi-Release. Added a commented OpenComputers line in dependencies.gradle. - @eigenraven
    • Fixed: CurseForge publishing of the api jar
  • #287 Updated Keyboard.java to convert scancodes to keycodes before retrieving display names, ensuring correct key labels for international keyboards. - @eigenraven
    • Fixed: incorrect key display names on non-QWERTY keyboards
  • #283 Removed the LoadingProgressNotify mixin and its Mixins entry. ForgePatchTransformer now patches ProgressManager$ProgressBar.step to call a new redirects.ProgressBar class, which only touches ClientProxy on the client. ClientProxy.onProgressUpdate now returns early when WINDOW_LOADING_PROGRESS is off. - @eigenraven
    • Removed: LoadingProgressNotify mixin
    • Fixed: Crash on launch in lwjgl3ify 3.0.1
    • Closes #282
  • #257 Updated KeyCodes.java to properly map SDL3 keycodes for left Alt, right Alt, and right Super/Meta keys. - @DialecticalMaterialist
    • Fixed: SDL3 Alt and Super key handling regression
  • #244 Re-enabled GLFW_COCOA_RETINA_FRAMEBUFFER, reverting PR #231's workaround that forced a low-resolution framebuffer on macOS, and fixed Mouse.setCursorPosition() so display scaling is applied only once. - @danyadev
    • Removed: Display.java GLFW retina framebuffer disabling
    • Fixed: mouse position shift on retina displays, rendering quality degradation on high-DPI systems
    • Closes #215

Performance ​

  • #351 Added a package-private constructor to Lwjgl3AwareException that calls super(null, null, false, false), disabling suppression and stack trace writing. - @Oondanomala
  • #331 LwjglRedirectTransformer and UnfinalizeObjectHoldersTransformer now use RFB's BytePatternMatcher and class header metadata in shouldTransformClass. RetroFuturaBootstrap was bumped from 1.0.16 to 1.0.17. - @danyadev
  • #314 Updated multiple transformer classes (ExtensibleEnumTransformer, ForgePatchTransformer, LwjglRedirectTransformer, UnfinalizeObjectHoldersTransformer) to match the new RFB transform signature. - @danyadev

Internal / Refactor ​

  • #228 Mixins enum now implements IMixins and uses MixinBuilder, and TargetedMod was reworked. Lwjgl3ifyCoremod calls IMixins.getEarlyMixins. Deleted Lwjgl3ifyLateMixins and mixins.lwjgl3ify.late.json, and removed the SHA-256 fastcraft.a hash check. Also bumped the settings convention plugin and dev dependencies. - @Alexdoru
    • Removed: late mixin loader, fastcraft hash check

Documentation ​

  • #267 Rewrote the LiteLoader compatibility section of README.MD. - @PLASMAchicken
    • Fixed: missing LiteLoader install instructions
    • Closes GTNH#22750
  • #245 Added a note to README.MD. - @wlhlm

Chores ​

  • #358 forgePatchesJar in build.gradle.kts now sets Implementation-Version to the libs.asm version in a manifest section for org/objectweb/asm/. - @ah-OOG-ah
    • Added: ASM version entry in the forgePatches manifest
  • #334 OcInputBuffer mixin now targets li.cil.oc.client.gui.traits.InputBuffer$class by string name via targets instead of a class reference, with UnusedMixin suppressed, to avoid an IDEA/MCDev plugin crash. - @ah-OOG-ah
    • Fixed: IDEA plugin errors when analyzing OcInputBuffer
  • #306 launcher-metadata/version.json javaVersion changed from java-runtime-delta (21) to java-runtime-epsilon (25). - @glowredman
  • #249 Bumped the dev-environment dependency versions in dependencies.gradle (NotEnoughItems, GT5-Unofficial, AE2, Chisel and others), the gradle wrapper, and gradle.properties comments and options for run directories. - @RecursivePineapple

Contributors ​

Everyone who authored, reviewed or co-authored a change on this page, with how many of them:

@eigenraven (35), @danyadev (5), @mitchej123 (5), @Algent (4), @Dream-Master (4), @RecursivePineapple (3), @ah-OOG-ah (2), @FalsePattern (2), @wlhlm (2), @Alexdoru (1), @alppp (1), @Caedis (1), @Chitak985 (1), @DialecticalMaterialist (1), @DioEgizio (1), @Eldrinn-Elantey (1), @glowredman (1), @Guvante (1), @Kai-Z-JP (1), @kevinrudde (1), @Luca-Guettinger (1), @MalTeeez (1), @mist475 (1), @Nikolay-Sitnikov (1), @nullTheCoder (1), @Oondanomala (1), @PLASMAchicken (1), @qiuxtao (1), @Redderpears (1), @sbancuz (1), @slprime (1), @tiffit (1), @wufe8 (1)