LWJGL 3 native folder recommendation

Started by bobjob, October 02, 2016, 08:03:36

Previous topic - Next topic


Ive just started using the new LWJGL3 version with a module layout for libraries.

I was wondering if it was possible to have a native folder layout like:
natives/<module name>/file.dll,.so...

that way the native folder will only need to be setup once, as long as the module name is hardcoded into the library loading code within LWJGL.

Currently for every module you use with a native you then need to spend time locating the native. As far as I know on Eclipse I had to uncompress all the jar files containing the native files as well.

Its not a big deal, but it would make for an easier setup if someone wanted to simply import all the libraries into their project when first learning LWJGL, as they would only need to select the 1 native folder for the LWJGL library


Generally LWJGL 3 works out of the box without setting up natives manually. It comes with a "SharedLibraryLoader" that takes care of extracting the natives automatically. This is completely hidden away with Maven/Gradle. With the zip bundle, you also don't need to do anything special except adding the native JARs to the classpath.

We're currently finalizing the module configurator on the website. Maven/Gradle script generation is ready (currently only on the nightly) and soon you'll be able to configure the zip bundle as well (it will contain only the modules you request). One of the features we'd like to add is merging of the bundled modules (one JAR with all classes, one JAR with all natives, simple directory structure, etc). This will be optional, but it will basically achieve what you're asking.


Never used Maven or Gradle before, sounds like its the best way to stay up to date. I guess I should learn how to take advantage of the new alternative ways of installing LWJGL.

Thanks again Spasi