LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.67k stars 631 forks source link

Foreign Function/Memory API (aka Project Panama) Support? #813

Closed gudenau closed 1 year ago

gudenau commented 1 year ago

Description

With the new FFI APIs in preview in Java 19, it would be nice to have LWJGL support. The new FFI APIs are supposed to be faster than JNI already and should hopefully have fewer breaking API changes than the incubator releases of Java 18 and earlier.

There are methods that allow you to used direct NIO buffers and some methods that existing LWJGL tooling may be able to hook into without too much effort.

octylFractal commented 1 year ago

See #609

gudenau commented 1 year ago

That didn't show up in the issues or PRs when I searched, funky.

Spasi commented 1 year ago

Hey @gudenau,

Migrating LWJGL to Panama will be a top priority when the time is right. You'll know it's happening when development on LWJGL 4 begins.

The current plan is to have a first working build when JDK 20 is released. It will be an alpha/beta build and there will be a long testing period after that. Note that:

gudenau commented 1 year ago

Interesting, I was under the impression that preview features were not supposed to have such massive API changes where incubator APIs could.

My bad.