Lightweight Java Game Library


The Lightweight Java Game Library is an open-source Java software library for video game developers. It exposes high performance cross-platform libraries commonly used in developing video games and multimedia titles, such as Vulkan, OpenGL, OpenAL and OpenCL. It further provides access to controllers, steering wheels and joysticks in a platform-neutral way.
The primary goal of the project is to provide a way for Java developers to get access to resources that are otherwise unavailable or poorly implemented on the existing Java platform. The main philosophy is to expose underlying technology as a thin wrapper, thus creating an API close to the original. It is also the basis of many high-level Java game engines and libraries, such as libGDX or the jMonkeyEngine.
LWJGL is available under a BSD license.
On 13 November 2014, version 3 was announced, which was released in alpha version on 27 April 2015 and is a complete rewrite of LWJGL. Many new bindings, including GLFW, EGL and Objective-C, were added. Support for Oculus Rift development was also added with LibOVR bindings. The new version was released on 4 June 2016, after more than 3 and a half years in development.

Bindings

The library accesses native C code through the Java Native Interface. Bindings to each of the native libraries exist as different modules so developers can make custom builds with only the things they need in a certain program.
While utility classes are written in pure Java, most of the binding classes are automatically generated by a custom generator implemented in Kotlin.
Since version 3.1, LWJGL is fully split into 51 modules that can be downloaded and used separately. To make this process easier, the project provides an online build configurator, which allows users to download custom combinations of modules and automatically generates Maven and Gradle configuration files to ease their use with existing projects.
BindingCategoryDescriptionNotes
EGLKhronos APIsInterface between Khronos rendering APIs and the underlying native platform window system.
OpenCLKhronos APIsAPI for cross-platform parallel computing.
OpenGLKhronos APIs3D graphics specification implemented by most GPU vendors.Most extensions supported, but less popular ones will be added on request.
OpenGL ESKhronos APIsOpenGL for embedded systems like mobile phones, tablets or consoles.
VulkanKhronos APIsUpcoming cross-platform 3D graphics API.
GLFWDisplay and InputWindow management library needed for handling OpenGL and Vulkan contexts as well as user input.
JAWTDisplay and InputAWT native interface.
nfdDisplay and InputSmall cross-platform native file dialogs library.
tinyfdDisplay and InputSmall native dialog library.
OpenALAudioThree-dimensional audio API.ALC and other extensions are supported.
OpenAL SoftAudioFreely licensed software implementation of OpenAL.
OpusAudioOpen, royalty-free audio codec.
AssimpGraphicsPortable open source library to import various 3D model formats.
bgfxGraphicsCross-platform rendering library supporting multiple graphics backends.
DriftFXGraphicsLibrary to render OpenGL content into JavaFX nodes.
LibOVRGraphicsAPI of the Oculus Rift SDK.
meshoptimizerGraphicsA mesh optimization library that makes meshes smaller and faster to
NanoSVGGraphicsSimple SVG parser.
NanoVGGraphics2D vector graphics rendering library using OpenGL.
Nuklear GraphicsSimple GUI library.
par shapesGraphicsGenerator for parametric and other simple shapes.
par_streamlinesGraphicsTriangulate wide lines and curves.
OpenVRGraphicsAn API runtime that allows access to VR hardware from multiple vendors without requiring applications have specific knowledge of the type of hardware they are targeting.
ShadercGraphicsA collection of libraries for shader compilation
SPIRV-CrossGraphicsA library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
OpenEXRGraphicsA small, single-header library to load and save OpenEXR images.
Tootle GraphicsA 3D triangle mesh optimization library that improves on existing mesh preprocessing techniques.
Vulkan Memory AllocatorGraphicsAn easy to integrate Vulkan memory allocation library.
YogaGraphicsAn open-source, cross-platform layout library that implements CSS Flexbox.
STBSTBLightweight single-file libraries for loading images, sounds and fonts.
Bullet PhysicsOtherReal-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine-learning, etc.
CUDAOtherA parallel computing platform and programming model developed by NVIDIA for general computing on GPUs.
dyncallOtherLibrary for dynamically calling C functions in a portable way.
jemallocOtherLow-level memory management.
libdivideOtherA library that replaces expensive integer divides with comparatively cheap multiplication and bitshifts.
LLVMOtherA collection of modular and reusable compiler and toolchain technologies.
LMDBOtherFast database library using memory-mapped files.
LZ4OtherA lossless data compression algorithm that is focuses on speed.
Meow HashOtherFast non-cryptographic hash.
ODBCOtherA C-language interface that makes it possible for applications to access data from a variety of database management systems.
RemoteryOtherRealtime CPU/GPU profiler.
rpmallocOtherCross-platform thread caching memory allocator.
xxHashOtherFast hash algorithm.
ZstandardOtherA fast lossless compression algorithm.

Notable uses