Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/LWJGL/lwjgl3/llms.txt

Use this file to discover all available pages before exploring further.

LWJGL (Lightweight Java Game Library) 3 is an open source Java library that enables cross-platform access to popular native APIs used in graphics (OpenGL, Vulkan), audio (OpenAL), and parallel computing (OpenCL) applications. Its access is direct and high-performance, yet wrapped in a type-safe, Java-friendly layer. LWJGL is freely available under the BSD 3-Clause license and distributed via Maven Central.
LWJGL is an enabling technology that provides low-level access. It is not a framework and does not add higher-level abstractions beyond what the underlying native libraries expose. If you are new to graphics programming, consider starting with a framework or game engine built on top of LWJGL before working with it directly.

Key features

Direct native access

Calls map 1-to-1 to native library functions. There is no abstraction layer between your Java code and the GPU driver.

Type-safe Java API

All bindings are generated from native headers and use Java types, enums, and structs instead of raw pointers and integer constants.

Modular distribution

Only the core module is required. Add only the binding modules you actually use — keeping your dependency footprint small.

Automatic native loading

LWJGL extracts platform-specific native libraries from the JAR at runtime. No java.library.path configuration is required in the common case.

Off-heap memory utilities

MemoryUtil and MemoryStack provide safe, explicit control over off-heap memory, which is required when passing data buffers to native APIs.

FFM API support

From version 3.4.0 and JDK 25, LWJGL supports the Foreign Function & Memory API and is fully functional with --sun-misc-unsafe-memory-access=deny.

Supported bindings

Khronos APIs

LibraryDescription
EGLInterface between Khronos rendering APIs and the native platform window system.
KTX (Khronos Texture)Lightweight container for textures for OpenGL, Vulkan, and other GPU APIs.
OpenCLOpen standard for cross-platform parallel programming across CPUs, GPUs, and embedded processors.
OpenGLThe most widely adopted 2D and 3D graphics API in the industry.
OpenGL ESCross-platform 2D and 3D graphics API for embedded and mobile systems.
OpenXRHigh-performance access to Augmented Reality and Virtual Reality platforms and devices.
VulkanLow-overhead, explicit GPU API for modern, high-efficiency graphics and compute.

Display and input

LibraryDescription
GLFWCreate windows, handle keyboard/mouse/gamepad input, and manage OpenGL or Vulkan contexts.
SDLCross-platform access to audio, keyboard, mouse, joystick, and GPU hardware.
JAWTThe AWT native interface.
Native File Dialog ExtendedPortable C library for native file open, folder select, and save dialogs.
tinyfdLightweight native dialog library.

Audio

LibraryDescription
FMODEnd-to-end solution for game audio and music.
OpenALCross-platform 3D audio API for gaming applications.
OpenAL SoftLGPL-licensed, cross-platform software implementation of OpenAL.
OpusOpen, royalty-free, highly versatile audio codec.

Graphics utilities

Assimp, bgfx, FreeType, HarfBuzz, meshoptimizer, msdfgen, NanoSVG, NanoVG, Nuklear, par_shapes, par_streamlines, Shaderc, SPIRV-Cross, Vulkan Memory Allocator, Yoga, and the full stb single-file library collection (image loading, font rasterization, Perlin noise, and more).

Other utilities

hwloc, jemalloc, libffi, libspng, LLVM, LMDB, LZ4, ODBC, Remotery, RenderDoc, rpmalloc, xxHash, and Zstandard.
The easiest way to pick which bindings to include is to use the build configurator on the LWJGL website. It generates ready-to-paste Maven and Gradle dependency declarations.

Supported platforms

LWJGL 3 requires Java 8 or later and supports the following operating systems and CPU architectures:
Operating systemArchitectures
FreeBSDx64
Linuxx64, arm64 (ARMv8/AArch64), arm32 (ARMv7/armhf), ppc64le, riscv64
macOSx64, arm64 (Apple Silicon)
Windowsx64, x86, arm64

License

LWJGL is released under the BSD 3-Clause License. Individual bindings may be subject to the terms of the corresponding third-party library license; see the third-party license directory for details.

Next steps

Quickstart

Create a window and draw your first frame with GLFW and OpenGL.

Installation

Add LWJGL to your Maven or Gradle project with the right native classifiers.

Build docs developers (and LLMs) love