Skip to content

DJtheRedstoner/LWJGLTwoPointFive

Repository files navigation

LWJGLTwoPointFive

An example of running LWJGL3 alongside LWJGL2 in Minecraft.

IMPORTANT: This does NOT make minecraft use LWJGL3 for rendering, it simply allows using LWJGL3 bindings alongside LWJGL2

How it works

Excluding opengl classes, the only classes the conflicts between lwjgl2 and 3 are org.lwjgl.BufferUtils and org.lwjgl.PointerBuffer. Thankfully, those classes have no native methods so simply relocating them just works. After that, most things work. LWJGL2 jars are Sealed, however simply removing org.lwjgl. from transformer exclusions gets around this and lets you transform lwjgl classes (which is needed in some cases). In the case of nanovg bindings, NanoVGGLConfig needs to be able to fetch function pointers so a transformer and custom FunctionProvider is needed.

TODO:

  • gradle plugin/task to merge and relocate sources
  • test out more bindings

About

An example of running LWJGL3 alongside LWJGL2 in Minecraft.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages