Skip to content

3.1. Modules and Packages

Ioannis Tsakpinis edited this page Dec 11, 2016 · 1 revision

LWJGL is organized in modules:

  • The core module includes packages org.lwjgl and org.lwjgl.system.
  • Each API binding is a separate module and is contained within a single Java package. For example the org.lwjgl.opengl package contains the entire lwjgl-opengl module.

All public functionality in the following packages is meant to be used directly by users:

  • org.lwjgl
  • org.lwjgl.<binding>
  • org.lwjgl.util.<binding>

The package org.lwjgl.system includes a lot of public functionality, but also:

  • includes classes used internally by LWJGL to implement critical functionality that is generally not useful to users.
  • includes platform-specific bindings and related functionality.
  • includes unsafe utilities used to access off-heap memory.

There are no backwards compatibility guarantees for any public API in the system package.

On the other hand, some classes are very powerful and/or useful and can be considered more stable than others:

  • org.lwjgl.system.Configuration
  • org.lwjgl.system.MemoryUtil
  • org.lwjgl.system.MemoryStack

Power-users that want to get the most out of LWJGL are encouraged to use them.