Unofficial JOGL / GlueGen / JOAL build for Windows on ARM64 (windows-aarch64)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Unofficial JOGL / GlueGen / JOAL build for Windows on ARM64 (windows-aarch64)

mahesh
Hi all,

JogAmp ships natives for Windows x64, Linux, macOS and Android, but not for Windows on ARM64 (Snapdragon laptops, Surface Pro X and similar). On an ARM64 JVM, JOGL fails with "No usable OpenGL profile found". I needed this for my application SimPHY, so I built GlueGen, JOGL and JOAL (with OpenAL Soft) natively for windows-aarch64, and I'm sharing the result in case it helps others:

https://github.com/maheshkurmi/jogamp-windows-arm64

Releases: https://github.com/maheshkurmi/jogamp-windows-arm64/releases

This is an unofficial build, not a JogAmp release. Please report problems with it on that GitHub repo rather than to the JogAmp maintainers.

What's in a release

gluegen-rt.jar, jogl-all.jar and joal.jar, each with its *-natives-windows-aarch64.jar
jogamp-fat-windows-aarch64.jar: all classes plus all ARM64 natives in one jar
BUILDINFO.txt (upstream commits, patch checksums, toolchain versions), SHA256SUMS.txt and license files
Source and build

Based on JogAmp 2.7.0-rc from current upstream master: gluegen f50636de, jogl 0c2d62b5, joal e693f965.
Built natively on ARM64 with llvm-mingw (clang 22.1.1), Ant 1.10.15 and JDK 17.
The repo holds only a few small patches and a build script. A GitHub Actions workflow on GitHub's windows-11-arm runner rebuilds everything from upstream sources, so the binaries can be traced back to source.
What the patches change

GlueGen:
windows-aarch64 platform detection and an llvm-mingw (mingw-arm64) cpptasks compiler/linker configuration
a new MachineDataInfo.StaticConfig.ARM64_WINDOWS entry. Windows ARM64 is LLP64 like x64, but with an 8-byte long double, so no existing entry matches and Platform initialization fails without it. It's appended at the end so existing indices don't change.
jau_sys_Clock.c defines clock_gettime64 when newer mingw-w64 winpthreads headers make clock_gettime an inline wrapper
a tiny gcc.exe front-end for clang that drops the ELF "-Wl,-h,soname" flag, which lld rejects for PE DLLs
JOGL: ARM64 compiler/linker selection for jogl, nativewindow and newt, and selection of the bundled win32-win32-aarch64 SWT jar. A JDK 17+ is needed to build because the SWT jars are Java 17 class files.
OpenAL Soft: a missing #include <cstdlib> in its bundled fmt 11.1.1, required with recent libc++.
JOAL itself needed no source changes.
Requirements

An ARM64 JVM, Java 11 or newer. An x64 JVM under emulation will look for windows-amd64 natives instead.
For hardware-accelerated OpenGL: Microsoft's "OpenCL, OpenGL, and Vulkan Compatibility Pack" from the Microsoft Store (OpenGL on Direct3D 12). Without it, Windows only offers GDI Generic OpenGL 1.1.
Tested

Surface Pro X (Adreno 680) with Microsoft OpenJDK 17 and 21 ARM64.
The GL4bc hardware profile is picked up: renderer "D3D12 (Qualcomm Adreno 680 GPU)", OpenGL 4.1 compatibility profile.
NEWT windows, NEWT inside Swing (NewtCanvasAWT), and offscreen drawables.
JOAL with OpenAL Soft 1.24.3 plays audio.
It runs a full JOGL application (SimPHY, a 2D/3D physics simulator), packaged with jpackage as a native ARM64 installer.
JogAmp's own unit tests have not been run on this build, and the FFmpeg and Oculus VR natives are not included.

Tip for anyone targeting OpenGL-on-D3D12 (including Windows on ARM)
A multisampled FBO with separate GL_DEPTH_COMPONENT24 and GL_STENCIL_INDEX renderbuffers returns GL_FRAMEBUFFER_UNSUPPORTED on this driver. A single packed GL_DEPTH24_STENCIL8 renderbuffer attached to both depth and stencil works. Desktop x64 drivers accept both layouts, so this is easy to miss.

Licenses
GlueGen, JOGL and JOAL keep their BSD licenses. The bundled OpenAL32.dll (OpenAL Soft) is LGPL; its source is the pinned upstream commit plus the one-line patch in the repo. All license texts are included in the release.

For the maintainers
The changes are small and self-contained. If you'd consider official windows-aarch64 support, I'd be happy to submit them through whatever process you prefer (Bugzilla, git patches, or something else), so users can get these natives from regular JogAmp releases and Maven instead of a separate build.

Feedback and test reports from other Windows on ARM devices are very welcome.

Thanks to the JogAmp community for JOGL.

Mahesh Kurmi