I have experimented lately with Project Panama (available with JDK17 as an incubator feature) and created a prototype for SWT+OpenGL.
I was able to get it working to generate the bindings and adapted the Snippet195 to use this what results in a pure Java-Code only binding of OpenGL at my Linux system:
I therefore like to suggest we start with incubating this feature for SWT and ship the bindings by default so people can use SWT+OpenGL without any additional effort, using custom bindings (like JOGL / JWGL / ..) will still be possible but we have an out of the box solution then and i think this will really boost the usefulness of SWT+OpenGL!
What needs to be done:
[x] SWT would require Java 17 for this feature (as far as I know this would be fine for this release @akurtakov ?)
[x] Cleanup the POC and provide it as a PR, add a new snippet
[ ] Check this on the different linux variants (I have tested with Debian x64)
[ ] Provide a POC for Windows @HannesWell wanted to look into this
[ ] Provide a POC for Mac (any one interested here?)
[ ] Possibly providing feedback to the Project Panama about any issues we find
My goal would be to have at least Windows+Linux support for the 2023-06 release we can ship with an explicit notice that it is experimental to gather feedback for both SWT + Project Panama and people can start using it, once we got enough confidence and the APi is finalized and SWT has reached that jdk level (most probably Java 21) we can make this an official API and support backward compatibility for older java versions by using Multi-Release-jars, support for this was recently added to Tycho.
I have experimented lately with Project Panama (available with JDK17 as an incubator feature) and created a prototype for SWT+OpenGL.
I was able to get it working to generate the bindings and adapted the Snippet195 to use this what results in a pure Java-Code only binding of OpenGL at my Linux system:
I therefore like to suggest we start with incubating this feature for SWT and ship the bindings by default so people can use SWT+OpenGL without any additional effort, using custom bindings (like JOGL / JWGL / ..) will still be possible but we have an out of the box solution then and i think this will really boost the usefulness of SWT+OpenGL!
What needs to be done:
My goal would be to have at least Windows+Linux support for the 2023-06 release we can ship with an explicit notice that it is experimental to gather feedback for both SWT + Project Panama and people can start using it, once we got enough confidence and the APi is finalized and SWT has reached that jdk level (most probably Java 21) we can make this an official API and support backward compatibility for older java versions by using Multi-Release-jars, support for this was recently added to Tycho.