LWJGL

Last updated

Lightweight Java Game Library (LWJGL)
Original author(s) Caspian Prince
Developer(s) Ioannis Tsakpinis
Initial release4 February 2007;17 years ago (2007-02-04) [1]
Stable release
3.3.3 / 16 September 2023;7 months ago (2023-09-16)
Repository github.com/lwjgl
Written in Java, C, Kotlin [2] [3]
Operating system Linux, macOS, Windows, FreeBSD
Platform Java platform
Type Free computer library
License BSD, [4] some bindings under different licenses [2]
Website lwjgl.org

The Lightweight Java Game Library (LWJGL) is an open-source software library that provides bindings to a variety of C libraries for video game developers to Java. It exposes cross-platform libraries commonly used in developing video games and multimedia titles, such as Vulkan, OpenGL, OpenAL and OpenCL.

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.

History

Development of the library began in 2002 with the release of J2SE 1.4, making use of the newly-added non-blocking I/O operations and off-heap memory access. These additions to the JDK allowed for better access to native memory and libraries not a part of the JDK. The first official release of the library was on 4 February 2007. [1]

On 13 November 2014, version 3 was announced, which was released in the alpha version on 27 April 2015 and is a complete rewrite of LWJGL. [5] [6] [7] Many new bindings, including GLFW, EGL and Objective-C, were added. [4] [6] Support for Oculus Rift development was also added with LibOVR bindings. [4] [7] The new version was released on 4 June 2016, after more than 3 and a half years in development. [8]

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. [4] [7] [9]

While utility classes are written in pure Java, most of the binding classes are automatically generated by a custom generator implemented in Kotlin. [2] [3]

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. [10] [11] [12]

Provided bindings [2] [4]
BindingCategoryDescriptionNotes
EGL Khronos APIsInterface between Khronos rendering APIs and the underlying native platform window system.
OpenCL API for cross-platform parallel computing.
OpenGL 3D graphics specification implemented by most GPU vendors.Most extensions are supported, but less popular ones will be added on request.
OpenGL ES OpenGL for embedded systems like mobile phones, tablets, or consoles.
Vulkan Upcoming cross-platform 3D graphics API.
GLFW Display and InputWindow management library needed for handling OpenGL and Vulkan contexts as well as user input.
JAWT AWT native interface.
nfdSmall cross-platform native file dialogs library.
tinyfdSmall native dialog library.
OpenAL AudioThree-dimensional audio API.ALC and other extensions are supported. Specifically bundles the OpenAL Soft implementation.
Opus Open, royalty-free audio codec.
Assimp GraphicsPortable open source library to import various 3D model formats.
bgfxCross-platform rendering library supporting multiple graphics backends.
DriftFXLibrary to render OpenGL content into JavaFX nodes.
LibOVRAPI of the Oculus Rift SDK.
meshoptimizerA mesh optimization library that makes meshes smaller and faster to render
NanoSVGSimple SVG parser.
NanoVG2D vector graphics rendering library using OpenGL.
NuklearSimple GUI library.
par_shapesGenerator for parametric and other simple shapes.
par_streamlinesTriangulate wide lines and curves.
OpenVR An 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.
ShadercA collection of libraries for shader compilation
SPIRV-CrossA library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
OpenEXR A small, single-header library to load and save OpenEXR (.exr) images.
Tootle (AMD)A 3D triangle mesh optimization library that improves on existing mesh preprocessing techniques.
Vulkan Memory AllocatorAn easy to integrate Vulkan memory allocation library.
YogaAn 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.
CUDA A parallel computing platform and programming model developed by NVIDIA for general computing on GPUs.
dyncallLibrary for dynamically calling C functions in a portable way.Set to be removed.
jemalloc Low-level memory management.
libffi A portable, high level programming interface to various calling conventions.Replaces dyncall.
libdivideA library that replaces expensive integer divides with comparatively cheap multiplication and bitshifts.
LLVM A collection of modular and reusable compiler and toolchain technologies.
LMDB Fast database library using memory-mapped files.
LZ4 A lossless data compression algorithm that is focused on speed.
Meow HashFast non-cryptographic hash.
ODBC A C-language interface that makes it possible for applications to access data from a variety of database management systems.
RemoteryRealtime CPU/GPU profiler.
rpmallocCross-platform thread caching memory allocator.
xxHash Fast hash algorithm.
Zstandard A fast lossless compression algorithm.

Notable uses

Related Research Articles

Irrlicht is an open-source game engine written in C++. It is cross-platform, officially running on Windows, macOS, Linux and Windows CE and due to its open nature ports to other systems are available, including FreeBSD, Xbox, PlayStation Portable, Symbian, iPhone, AmigaOS 4, Sailfish OS via a QT/Qml wrapper, and Google Native Client.

<span class="mw-page-title-main">Log4j</span> Java-based logging software

Apache Log4j is a Java-based logging utility originally written by Ceki Gülcü. It is part of the Apache Logging Services, a project of the Apache Software Foundation. Log4j is one of several Java logging frameworks.

<span class="mw-page-title-main">Java (software platform)</span> Set of computer software and specifications

Java is a set of computer software and specifications that provides a software platform for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

The Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. The language is specified by the Java Language Specification (JLS); changes to the JLS are managed under JSR 901. In September 2017, Mark Reinhold, chief Architect of the Java Platform, proposed to change the release train to "one feature release every six months" rather than the then-current two-year schedule. This proposal took effect for all following versions, and is still the current release schedule.

TypeScript is a free and open-source high-level programming language developed by Microsoft that adds static typing with optional type annotations to JavaScript. It is designed for the development of large applications and transpiles to JavaScript. Because TypeScript is a superset of JavaScript, all JavaScript programs are syntactically valid TypeScript, but they can fail to type-check for safety reasons.

OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GPL-2.0-only with a linking exception. Were it not for the GPL linking exception, components that linked to the Java Class Library would be subject to the terms of the GPL license. OpenJDK is the official reference implementation of Java SE since version 7.

QtScript is a scripting engine that has been part of the Qt cross-platform application framework since version 4.3.0. It was first deprecated and then dropped as of Qt 6.5.

<span class="mw-page-title-main">JavaFX</span> Java software platform for GUI

JavaFX is a software platform for creating and delivering desktop applications, as well as rich web applications that can run across a wide variety of devices. JavaFX has support for desktop computers and web browsers on Microsoft Windows, Linux, and macOS, as well as mobile devices running iOS and Android, through Gluon Mobile.

The Java Platform Module System specifies a distribution format for collections of Java code and associated resources. It also specifies a repository for storing these collections, or modules, and identifies how they can be discovered, loaded and checked for integrity. It includes features such as namespaces with the aim of fixing some of the shortcomings in the existing JAR format, especially the JAR Hell, which can lead to issues such as classpath and class loading problems.

The Java Development Kit (JDK) is a distribution of Java technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java Application Programming Interface (API). It is derivative of the community driven OpenJDK which Oracle stewards. It provides software for working with Java applications. Examples of included software are the Java virtual machine, a compiler, performance monitoring tools, a debugger, and other utilities that Oracle considers useful for Java programmers.

sbt (software) Open-source build tool for Scala and Java projects

sbt is an open-source build tool created explicitly for Scala and Java projects. It aims to streamline the procedure of constructing, compiling, testing, and packaging applications, libraries, and frameworks. sbt is highly adaptable, permitting developers to customize the build process according to their project's specific needs.

Xtext is an open-source software framework for developing programming languages and domain-specific languages (DSLs). Unlike standard parser generators, Xtext generates not only a parser, but also a class model for the abstract syntax tree, as well as providing a fully featured, customizable Eclipse-based IDE.

<span class="mw-page-title-main">Bootstrap (front-end framework)</span> Web design front-end

Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first front-end web development. It contains HTML, CSS and (optionally) JavaScript-based design templates for typography, forms, buttons, navigation, and other interface components.

<span class="mw-page-title-main">Chromium Embedded Framework</span> Free and open-source software framework

The Chromium Embedded Framework (CEF) is an open-source software framework for embedding a Chromium web browser within another application. This enables developers to add web browsing functionality to their application, as well as the ability to use HTML, CSS, and JavaScript to create the application's user interface.

<span class="mw-page-title-main">GraalVM</span> Virtual machine software

GraalVM is a Java Development Kit (JDK) written in Java. The open-source distribution of GraalVM is based on OpenJDK, and the enterprise distribution is based on Oracle JDK. As well as just-in-time (JIT) compilation, GraalVM can compile a Java application ahead of time. This allows for faster initialization, greater runtime performance, and decreased resource consumption, but the resulting executable can only run on the platform it was compiled for. It provides additional programming languages and execution modes. The first production-ready release, GraalVM 19.0, was distributed in May 2019. The most recent release is GraalVM for JDK 22, made available in March 2024.

libGDX is a free and open-source game-development application framework written in the Java programming language with some C and C++ components for performance dependent code. It allows for the development of desktop and mobile games by using the same code base. It is cross-platform, supporting Windows, Linux, Mac OS X, Android, iOS, BlackBerry and web browsers with WebGL support.

The tables below compare cryptography libraries that deal with cryptography algorithms and have API function calls to each of the supported features.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

<span class="mw-page-title-main">Polymer (library)</span> Open-source JavaScript library of Web Components

Polymer is an open-source JavaScript library for building web applications using Web Components. The library is being developed by Google developers and contributors on GitHub. Modern design principles are implemented as a separate project using Google's Material Design design principles.

Angular is a TypeScript-based, free and open-source single-page web application framework led by the Angular Team at Google and by a community of individuals and corporations. Angular is a complete rewrite from the same team that built AngularJS. Angular ecosystem consists of a diverse group of over 1.7 million developers, library authors, and content creators.

References

  1. 1 2 Matzon, Brian (4 February 2007). "LWJGL 1.0 Released". LWJGL Forum. Retrieved 23 July 2016.
  2. 1 2 3 4 "LWJGL/lwjgl3". github.com . Retrieved 13 August 2016.
  3. 1 2 "lwjgl3/doc – Generator". github.com . 11 August 2015. Retrieved 30 August 2015.
  4. 1 2 3 4 5 "Official website" . Retrieved 14 August 2015.
  5. Tsakpinis, Ioannis (13 November 2014). "Welcome to LWJGL 3". blog.lwjgl.org.
  6. 1 2 "LWJGL 3 Roadmap". github.com . Retrieved 2 June 2015.
  7. 1 2 3 Tsakpinis, Ioannis (27 April 2015). "LWJGL 3.0.0a released". blog.lwjgl.org.
  8. "LWJGL 3.0.0 Released!". blog.lwjgl.org. 4 June 2016. Retrieved 4 June 2016.
  9. "Bindings FAQ". github.com . 27 December 2014. Retrieved 27 July 2015.
  10. "LWJGL 3.1.0 Released!". blog.lwjgl.org. 30 October 2016. Retrieved 11 November 2016.
  11. "Minecraft unblocked" . Retrieved 16 November 2023.
  12. "Download – LWJGL". lwjgl.org. Retrieved 11 November 2016.
  13. "Minecraft Attributions | Minecraft". Minecraft.net. Retrieved 9 July 2020.
  14. "APZDTISA #3: This time with LIVE MULTIPLAYER!". Project Zomboid. 17 February 2014. Retrieved 25 January 2022.