eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
118 stars 135 forks source link

[OpenGL] Include a default binding based on Project Panama #570

Closed laeubi closed 1 year ago

laeubi commented 1 year ago

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:

grafik

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.

laeubi commented 1 year ago

For the first two items I now created a PR: