jmvs

0004 libGDX (LWJGL3 backend) as the rendering engine

Status: Accepted. Supersedes legacy ADR-0001.

Context

Java3D 1.x is unmaintained and ties JMVS to JDK 11 and vendored natives (legacy risks R1–R3). The renderer must run on macOS (Apple Silicon), Windows and Linux, come from Maven Central, support drawing tens of thousands of atoms smoothly, and let JMVS supply its own shaders.

Decision

Use libGDX (1.14.x) with the LWJGL3 desktop backend, requesting an OpenGL 3.2 core context (GL30 emulation) so instanced rendering is available on macOS (which caps at OpenGL 4.1). JMVS uses libGDX’s Mesh, ShaderProgram, PerspectiveCamera and math types directly rather than the high-level ModelBatch/ModelInstance API, so atoms and bonds can be drawn as instances (0007). All GL code is confined to jmvs-render-gdx (0002).

Alternatives considered

Consequences