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 gives Java developers direct, type-safe access to the native APIs powering modern graphics, audio, and parallel computing — without sacrificing performance. Whether you are building a game engine, a visualization tool, or an audio application, LWJGL bridges the gap between the JVM and native libraries like OpenGL, Vulkan, OpenAL, and OpenXR.

Quickstart

Create your first LWJGL window and draw to the screen in minutes.

Installation

Add LWJGL to your Maven or Gradle project and choose your bindings.

Memory Management

Understand MemoryUtil and MemoryStack for safe off-heap allocations.

Bindings Reference

Browse all 46+ supported native library bindings.

What you can build

LWJGL gives you direct access to the native APIs that power high-performance applications across every major platform.

Graphics with OpenGL & Vulkan

Render 2D and 3D scenes using the industry-standard OpenGL API or the modern low-overhead Vulkan API.

Windowing with GLFW

Create windows, handle input, and manage OpenGL/Vulkan contexts with GLFW.

Audio with OpenAL

Integrate 3D positional audio, streaming, and effects using OpenAL.

Parallel Computing

Harness GPU compute power with OpenCL for scientific and data workloads.

Core concepts

Native Bindings

Learn how LWJGL maps Java types to native structs and function pointers.

FFM API (JDK 25+)

Use the new Foreign Function & Memory backend for modern JVM compatibility.

Configuration

Tune LWJGL behavior at runtime with system properties or programmatic config.

Troubleshooting

Diagnose common issues with natives, memory, and platform compatibility.

At a glance

LWJGL 3 is distributed as a set of independent modules on Maven Central. The core module is always required; all binding modules are optional.
1

Add the core dependency

Add org.lwjgl:lwjgl and the appropriate natives artifact for your platform to your build file.
2

Add binding modules

Include only the bindings you need — for example org.lwjgl:lwjgl-glfw and org.lwjgl:lwjgl-opengl.
3

Write your application

Import the generated binding classes and call native APIs directly from Java or Kotlin.
4

Run

LWJGL automatically extracts and loads native libraries from the JAR — no manual setup required.
LWJGL 3.4.0+ supports the JDK 25 Foreign Function & Memory (FFM) API as an alternative to JNI. See the FFM API guide for details.

Build docs developers (and LLMs) love