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 3 ships a comprehensive set of graphics-related bindings, covering everything from low-level GPU APIs like OpenGL and Vulkan to high-level helpers for font rendering, GUI layout, shader compilation, and image I/O. All bindings are optional modules that you add individually to your project.
The current stable release is 3.4.2. Use the LWJGL build configurator to generate Maven or Gradle dependency declarations for exactly the bindings you need.

Rendering APIs

These bindings expose the primary GPU rendering interfaces supported by LWJGL.
BindingArtifactKey ClassesDescription
OpenGLorg.lwjgl:lwjgl-openglGL11GL46, GLUtilThe most widely adopted 2D and 3D graphics API. LWJGL exposes every core and extension entry point via per-version classes (GL11 through GL46) and supports both compatibility and core profiles.
OpenGL ESorg.lwjgl:lwjgl-openglesGLES20GLES32Royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems, including consoles, phones, and vehicles.
Vulkanorg.lwjgl:lwjgl-vulkanVK10VK14, VkInstance, VkDeviceNext-generation graphics and compute API providing high-efficiency, cross-platform access to modern GPUs. LWJGL covers the full Vulkan specification from 1.0 (VK10) through 1.4 (VK14).
bgfxorg.lwjgl:lwjgl-bgfxBGFX, BGFXInitCross-platform, graphics-API-agnostic rendering library licensed under BSD-2-Clause. Abstracts over OpenGL, Vulkan, Metal, and Direct3D, making it suitable for “bring your own engine” workflows.
When targeting desktop platforms, prefer OpenGL or Vulkan directly. Use bgfx when you want a single rendering backend that can target multiple graphics APIs without per-platform code paths.

Scene and Model Loading

Assimp

org.lwjgl:lwjgl-assimpAssimp, AIScene, AIMeshA portable Open Source library to import various well-known 3D model formats (OBJ, FBX, glTF, Collada, and 40+ more) in a uniform manner. Use Assimp.aiImportFile() as the main entry point.

meshoptimizer

org.lwjgl:lwjgl-meshoptimizerMeshOptimizerA mesh optimization library that makes meshes smaller and faster to render by improving vertex cache locality, overdraw, and vertex fetch efficiency. Pair with Assimp for a full import-and-optimize pipeline.

par shapes / octasphere / streamlines

org.lwjgl:lwjgl-parParShapes, ParOctasphere, ParStreamlinesThree related libraries from Philip Rideout: par_shapes for parametric mesh generation, par_octasphere for sphere/capsule/rounded-box meshes, and par_streamlines for triangulating wide lines and curves.

NanoSVG

org.lwjgl:lwjgl-nanosvgNanoSVG, NSVGImageA simple, lightweight SVG parser that rasterizes vector graphics into pixel buffers. Useful for loading SVG icons and UI assets at runtime without a full SVG engine dependency.

Text and Font Rendering

BindingArtifactKey ClassesDescription
FreeTypeorg.lwjgl:lwjgl-freetypeFreeType, FTLibrary, FTFaceA widely used, freely available library to render fonts. Supports TrueType, OpenType, Type 1, and many other formats. FreeType handles outline scaling and hinting.
HarfBuzzorg.lwjgl:lwjgl-harfbuzzHarfBuzz, HBBuffer, HBFontA text shaping library that converts a sequence of Unicode code points into properly positioned glyph indices — handling ligatures, kerning, and right-to-left scripts. Typically used together with FreeType.
msdfgenorg.lwjgl:lwjgl-msdfgenMSDFGenA multi-channel signed distance field generator. Produces compact SDF textures from vector glyph outlines that render sharply at any scale on the GPU — a popular technique for resolution-independent text.
stb_truetypeorg.lwjgl:lwjgl-stbSTBTruetypePart of the stb collection. Parses, decodes, and rasterizes TrueType font glyphs with no external dependencies. Lower fidelity than FreeType but simpler to integrate.

Vector Graphics and GUI

NanoVG

org.lwjgl:lwjgl-nanovgNanoVG, NVGContextA small antialiased 2D vector graphics rendering library for OpenGL. Exposes a canvas-style API for drawing paths, gradients, images, and text. Ideal for in-game HUDs and tool overlays.

Nuklear

org.lwjgl:lwjgl-nuklearNuklear, NkContext, NkPanelA minimal immediate-mode GUI toolkit written in ANSI C and released into the public domain. Nuklear handles input, layout, and widget rendering but delegates the actual draw calls to your own backend.

Yoga

org.lwjgl:lwjgl-yogaYoga, YGNodeAn open-source, cross-platform Flexbox layout engine from Meta. Compute CSS Flexbox layouts from Java for custom UI systems without a full browser engine. Works well as a layout backend for Nuklear or NanoVG interfaces.

Shader Tools

BindingArtifactKey ClassesDescription
Shadercorg.lwjgl:lwjgl-shadercShaderc, ShadercCompiler, ShadercCompileOptionsGoogle’s collection of libraries for shader compilation. Compiles GLSL and HLSL to SPIR-V at runtime or build time, with full include-handling and macro support. Required for dynamic Vulkan shader pipelines.
SPIRV-Crossorg.lwjgl:lwjgl-spvcSPIRVCross, SpvcContext, SpvcCompilerPerforms reflection on SPIR-V binary and can cross-compile SPIR-V back to GLSL, HLSL, MSL, or ESSL. Use it to inspect uniform layouts or to target multiple graphics backends from a single SPIR-V source.

Texture and Image Utilities

KTX (Khronos Texture)

org.lwjgl:lwjgl-ktxKTXTexture, KTXTexture2A lightweight container format for GPU textures targeting OpenGL, Vulkan, and other GPU APIs. Supports compressed texture formats (ASTC, ETC, BC), mipmaps, and array/cube textures in a single file.

Tiny OpenEXR

org.lwjgl:lwjgl-tinyexrTinyEXRA small, header-only library for loading and saving OpenEXR (.exr) HDR images. Suitable for loading environment maps and HDR render targets used in physically-based rendering pipelines.

Vulkan Memory Allocator

org.lwjgl:lwjgl-vmaVma, VmaAllocator, VmaAllocationCreateInfoGPUOpen’s easy-to-integrate Vulkan memory allocation library. Automates suballocation, memory type selection, and defragmentation so you spend less time managing VkDeviceMemory handles directly.

stb Libraries

The org.lwjgl:lwjgl-stb artifact bundles Sean Barrett’s collection of single-file, public-domain C libraries. All are accessed through the org.lwjgl.stb package.
Class: STBImageDecodes images from file or memory in JPG, PNG, TGA, BMP, PSD, GIF, HDR, and PIC formats. The primary entry point for loading textures in LWJGL applications that don’t need a full media framework.
Class: STBImageWriteWrites PNG, TGA, BMP, and JPEG images to disk or a callback. Useful for screenshots and texture baking results.
Class: STBImageResizeResizes images to arbitrary dimensions with good quality using a configurable filter. Supports premultiplied alpha and sRGB color spaces.
Class: STBTruetypeParses TrueType font files and rasterizes glyphs to bitmaps. Simpler to set up than FreeType but with fewer hinting options.
Class: STBVorbisDecodes Ogg Vorbis audio files to raw float or 16-bit signed PCM. Can be used with OpenAL for streaming background music.
Class: STBPerlinProvides revised Perlin noise with 3D input and 1D output. Useful for terrain generation and procedural textures.
Class: STBRectPackA simple 2D rectangle packer for building texture atlases. Used internally by many font atlas implementations.
Class: STBEasyFontA quick-and-dirty bitmap font for printing frame rates and debug output directly to an OpenGL context.
All stb libraries share a single Maven artifact — org.lwjgl:lwjgl-stb. You do not need to add separate dependencies for each stb sub-library.

Build docs developers (and LLMs) love