I'm building a data model visualization app. I want the app to be an OpenGL view but I'd like the app to have all the standard features that would make it a "real application", using native windows if possible.
- windowed view / fullscreen (including screen selection) / maximize (full screen without blanking other screens)
- resizable windows
- application icon / title control
- key and mouse inputs
nice to haves
- drop down menus
- multiple windows / displays
In the past i could do all of these using SWT + LWJGL. But it seems like overkill to include SWT to get these.
On principal I'd also like to not use AWT because they are not real windows and the performance problems documented on the JOGL site.
michael says: (all features should be already in or on the immediate TODO list, the only issue i see are the drop down menus.... not implemented yet)
On Friday, May 14, 2010 02:08:01 Christian Catchpole [via jogamp] wrote:
> Michael Bien suggested I post this question here:
> I'm building a data model visualization app. I want the app to be an OpenGL
> view but I'd like the app to have all the standard features that would make
> it a "real application", using native windows if possible.
> - windowed view / fullscreen (including screen selection) / maximize (full
> screen without blanking other screens)
> - resizable windows
> - application icon / title control
> - key and mouse inputs
I guess NEWT supports that right now.
> nice to haves
> - drop down menus
This is something we cannot support, since it would fight NEWT's purpose
of being just a simple windowing toolkit only.
However, it would be possible to add these high level features directly in Java
utilizing NEWT/JOGL. One may implement these using text rendering,
undecorated windows or z stacked GL objects / overlays.
Actually the idea of NEWT is that most features are supported by the
underlying windowing toolkit, especially mobile platforms.
A project using NEWT may want to implement UI elements by its own.
A feature which might be of interest here is to integrate drag&drop into NEWT ..
> - multiple windows / displays
NEWT supports that.
> In the past i could do all of these using SWT + LWJGL. But it seems like
> overkill to include SWT to get these.
> On principal I'd also like to not use AWT because they are not real windows
> and the performance problems documented on the JOGL site.
I'm hoping to make a UI that really has no dependancy on a traditional windowing desktop. And I hope it will spend most of it's time in full screen. But if it does have to be launched and coexist on a desktop, it should still play nicely.
Yeah, I'm not convinced about drop downs. Perhaps they are a distraction.
And yes, drag and drop was something else I was thinking of today.
So I can understand how much work has gone into this project and haven't found any direct doco or examples for NEWT (maybe there are, i just need to get my head around it). I'll check out all the code over the weekend. My first step was to convert my LWJGL code to JOGL and test with FBCubes.. but my first issue on OS X..
Exception in thread "main" java.lang.RuntimeException: Unable to initialize JAWT
at java.security.AccessController.doPrivileged(Native Method)
You may be interested in the drag-drop from swing to the GLCanvas as demonstrated in my app. I uses swing (no native requirements) next to (and interacting with) GLCanvas. www.insparia.com
Best wishes on your project.
I couldn't find an example which rendered GL to a native window. But i did find 2 examples, one which did the native window dispatch and another which did the GLContext selection and rendering. so i combined them and this is what i came up with..
I use NewtFactory.createDisplay(null); and GLWindow.create(capabilities, false) so the Display and Screen are not properly associated I assume. Next step is detecting multiple screens, managing those and switching to fullscreen / borderless maximised.
I then delegate to my own Renderer interface. When I used LWJGL I made my own runtime proxy to an identical GL interface (to be LWJGL independent). But JOGL seems so far ahead, especially with the profiles, I'm happy to have JOGL as a dependancy with all the benefits.