Suvarna Garge (Editor)

Lightweight Java Game Library

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Repository
  
github.com/lwjgl

Written in
  
Java, C, Kotlin

Development status
  
Active

Operating system
  
Windows, Linux, OS X

Initial release
  
4 February 2007; 10 years ago (2007-02-04)

Stable release
  
3.1.0 / 30 October 2016; 4 months ago (2016-10-30)

The Lightweight Java Game Library (LWJGL) 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 OpenGL, Vulkan, OpenAL and OpenCL. It further provides access to controllers such as gamepads, steering wheels and joysticks in a platform-neutral way.

Contents

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 (JNI). 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 around 20 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.

Notable uses

  • Minecraft
  • References

    Lightweight Java Game Library Wikipedia