eclipse.platform.swt
eclipse.platform.swt copied to clipboard
Integrate LWJGLX-SWT into SWT OpenGL.
Is your feature request related to a problem? Please describe. I need support for OpenGL 3 in SWT on MacOS, as far as I can tell that is not possible today with SWT.
Describe the solution you'd like A way to specify which version of OpenGL to use, on MacOS this is necessary to use newer features.
Describe alternatives you've considered On MacOS x86 I can use LWJGLX-SWT, but they have no aarch64 version yet.
Additional context I filed an issue here Integrate in normal SWT? #17
I need support for OpenGL 3 in SWT on MacOS, as far as I can tell that is not possible today with SWT.
Can you explain why it is not possible?
A way to specify which version of OpenGL to use, on MacOS this is necessary to use newer features.
What (native) functions are involved here? e.g. SWT allows customize certain things already so it might be possible to enhance.
On MacOS, if you don't specify GL version you get 2.1. The only example of how to specify which GL version to use, comes from LWJGLX, they use GLData to hold the version values before transferring them to GLCanvas. I haven't seen any other way... The only additions that are needed seem to be the GLData & GLCanvas classes.
The only example of how to specify which GL version to use, comes from LWJGLX, they use GLData to hold the version values before transferring them to GLCanvas. I haven't seen any other way...
Why is this way not sufficient? Using OpenGL with SWT usually requires a custom binding so LWJGLX should have ways to do whatever you want.
The only additions that are needed seem to be the GLData & GLCanvas classes.
If you have concrete requirements, please don't hesitate to open a PR with proposed changes.
Why is this way not sufficient? Using OpenGL with SWT usually requires a custom binding so LWJGLX should have ways to do whatever you want.
They only provide x86 versions of their library, of course this can be fixed on their end but the additions to GLData and GLCanvas seem so small that it would be a shame not to include them in the normal SWT.
You should assume that we know nothing at all. So we can't judge on what the small change might be.
Contributing a PR is super easy:
https://github.com/eclipse-platform/eclipse.platform.swt?tab=readme-ov-file#contributing-to-swt
A PR would make it 100% clear what the small change would be...
Especially as I do not understand if LWJGLX-SWT is an integration with SWT (what is the usual pattern with SWT+OpenGL) or if it ships a copy of SWT with some enhancements that you wanted to integrated here.
but the additions to GLData and GLCanvas seem so small that it would be a shame not to include them in the normal SWT.
The integration is probably the "easy" part, but I fear maintenance is not. Just glancing at the Linux port, I already see a lot of hard dependencies to X11... So someone has to step up and do a Wayland port or this will break in the very near future.
This discussion also reminds me a little bit of https://github.com/eclipse-platform/eclipse.platform.swt/issues/2420. Wouldn't it also make sense to first evaluate which one (LWJGLX-SWT, JOGL and perhaps others as well) is the best fit?