LWJGL
   HOME

TheInfoList



OR:

The Lightweight Java Game Library (LWJGL) is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
software library In computing, a library is a collection of resources that can be leveraged during software development to implement a computer program. Commonly, a library consists of executable code such as compiled functions and classes, or a library can ...
that provides bindings to a variety of C libraries for
video game developer A video game developer is a software developer specializing in video game development – the process and related disciplines of creating video games. A game developer can range from one person who undertakes all tasks to a large business with em ...
s to
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
. It exposes
cross-platform Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
libraries commonly used in developing video games and multimedia titles, such as
Vulkan Vulkan is a cross-platform API and open standard for 3D graphics and computing. It was intended to address the shortcomings of OpenGL, and allow developers more control over the GPU. It is designed to support a wide variety of GPUs, CPUs and o ...
,
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
,
GLFW GLFW (Graphics Library Framework) is a lightweight utility library for use with OpenGL, OpenGL ES and Vulkan. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mou ...
,
OpenAL OpenAL (Open Audio Library) is a cross-platform audio application programming interface (API). It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those o ...
and
OpenCL OpenCL (Open Computing Language) is a software framework, framework for writing programs that execute across heterogeneous computing, heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), di ...
. 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 An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
close to the original. It is also the basis of many high-level Java game engines and libraries, such as
libGDX 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 usin ...
or the
jMonkeyEngine jMonkeyEngine (abbreviated JME or jME) is an open-source and cross-platform game engine for developing 3D games written in Java. It can be used to write games for Windows, Linux, macOS, Raspberry Pi, Android, and iOS (currently in alpha testi ...
.


History

Development of the library began in 2002 with the release of
J2SE 1.4 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 Pr ...
, making use of the newly-added non-blocking I/O operations and off-heap memory access. These additions to the
JDK 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 ...
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. 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. Many new bindings, including
GLFW GLFW (Graphics Library Framework) is a lightweight utility library for use with OpenGL, OpenGL ES and Vulkan. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mou ...
, EGL and
Objective-C Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
, were added. Support for
Oculus Rift Oculus Rift is a discontinued line of virtual reality headsets, virtual reality headsets developed and manufactured by Oculus VR, a virtual reality company founded by Palmer Luckey that is widely credited with reviving the virtual reality indust ...
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 The Java Native Interface (JNI) is a foreign function interface programming framework that enables Java code running in a Java virtual machine (JVM) to call and be called by native applications (programs specific to a hardware and operating s ...
(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 Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, 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 MAVEN is a NASA spacecraft orbiting Mars to study the loss of that planet's atmospheric gases to space, providing insight into the history of the planet's climate and water. The name is an acronym for "Mars Atmosphere and Volatile Evolution" w ...
and
Gradle Gradle is a build automation tool for multi-language software development. It manages tasks like compilation, packaging, testing, deployment, and publishing. Supported languages include Java (as well as JDK-based languages Kotlin, Groovy, Sc ...
configuration files to ease their use with existing projects.


Notable uses

* '' Minecraft: Java Edition'' * ''
Project Zomboid ''Project Zomboid'' is an open-world, Isometric video game graphics, isometric video game developed by British and Canadian Independent video game development, independent developer The Indie Stone. The game is set in the Zombie apocalypse, post- ...
'' * Necesse


References


External links

* {{Video game engines, state=collapsed Cross-platform free software Free computer libraries Free game engines Free software programmed in Java (programming language) Graphics libraries Java (programming language) libraries Video game development software Video game development software for Linux