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 the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
software library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subr ...
that provides bindings to a variety of C libraries for
video game developer A video game developer is a broad term for 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 ...
s to
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
. It exposes
cross-platform In 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 platforms. Some cross-platform software r ...
libraries commonly used in developing video games and multimedia titles, such as
Vulkan Vulkan is a low- overhead, cross-platform API, open standard for 3D graphics and computing. Vulkan targets high-performance real-time 3D graphics applications, such as video games and interactive media. Vulkan is intended to offer higher perform ...
,
OpenGL OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
,
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 ...
and
OpenCL OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), field-progra ...
. 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 way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
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) is a game engine for developing 3D games written in Java. It uses shader technology extensively and can be used to write games for Windows, Linux, macOS, Raspberry Pi, and Android. It uses Lightweight Java Game ...
.


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 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 4 February 2007. 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 GLFW (Graphics Library Framework) is a lightweight utility library for use with OpenGL. It provides programmers with the ability to create and manage windows and OpenGL contexts, as well as handle joystick, keyboard and mouse input. Softwar ...
, EGL and
Objective-C Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was selected by NeXT for its NeXTS ...
, were added. Support for
Oculus Rift Oculus Rift is a discontinued line of virtual reality headsets developed and manufactured by Oculus VR, a division of Meta Platforms, released on March 28, 2016. In 2012 Oculus initiated a Kickstarter campaign to fund the Rift's development, af ...
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 In software design, 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 hardwa ...
(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 (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
, 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 an American spacecraft orbiting Mars to study the loss of its atmospheric gases to space, providing insight into the history of the planet's climate and water. The spacecraft name is an acronym for "Mars Atmosphere and Volatile Evolu ...
and
Gradle Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java (as well as Kotli ...
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 in development by British and Canadian independent developer The Indie Stone. The game is set in the post-apocalyptic, zombie-infested exclusion zone of the fictional Knox County, Kentu ...


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 APIs Java (programming language) libraries Video game development software