LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Cosmo0 on November 24, 2016, 11:05:34

Title: How do I generate bindings for a GLFW fork?
Post by: Cosmo0 on November 24, 2016, 11:05:34
Hello,
I've been doing some work on a private fork of GLFW and I was wondering how I could use the LWJGL source generator to generate java bindings for it. Is this fairly straightforward?

Thanks for the help!
Title: Re: How do I generate bindings for a GLFW fork?
Post by: spasi on November 24, 2016, 11:16:19
Does the fork have differences in the API?
Title: Re: How do I generate bindings for a GLFW fork?
Post by: Cosmo0 on November 24, 2016, 21:56:37
Yeah there are a few new functions added to glfw3.h
Title: Re: How do I generate bindings for a GLFW fork?
Post by: spasi on November 24, 2016, 23:07:12
The easiest solution would be to modify the existing bindings (https://github.com/LWJGL/lwjgl3/tree/master/modules/templates/src/main/kotlin/org/lwjgl/glfw). Most of the API is defined in GLFW.kt (https://github.com/LWJGL/lwjgl3/blob/master/modules/templates/src/main/kotlin/org/lwjgl/glfw/templates/GLFW.kt). Try to add the new functions there and if you have any trouble, reply here or join our slack team (https://slack.lwjgl.org/) and PM me.

Now that LWJGL is modular, you can simply replace the GLFW classes and shared libraries with your own, while using the official release for the rest.