Posted by
Sven Gothel on
Jan 31, 2012; 5:47pm
URL: https://forum.jogamp.org/Advantages-of-using-NEWT-vs-GLCanvas-tp3703674p3704116.html
On Tuesday, January 31, 2012 05:29:17 PM gouessej [via jogamp] wrote:
>
> Hi
>
> NEWT full screen mode works better than its AWT equivalent and the framerate
> is often a bit higher even though you don't use multiple threads. It has a
> better support of multiple screens and its handling of the OpenGL context is
> better for sharing.
>
> Don't use NEWT if you're looking for interoperability with Swing and AWT.
> NewtCanvasAWT is helpful as another bridge, for example when you use SWT
> (until the native SWT heavyweight GLCanvas is ready) to put a GLWindow into
> a SWT composite.
.. plus we support NEWT across devices (headless, embedded/mobile, ..).
<
http://jausoft.com/blog/2011/10/05/jogljogamp-red-square-moscow-nurbs-graphicon2011>
In a CAD project and I for myself we use NewtCanvasAWT for AWT/Swing integration
and implementing all components [interacting w/ the GLEventListener] AWT/Swing agnostic.
This gives us the advantage of platform freedom and a fast reaction to bugs (AWT, ..)
since we are in charge of them and can fix them - also able to add new features if required.
We already have adaptor/producer classes in place to filter AWT and Android events to NEWT
which then can be handled by NEWT [input] event listener.
This is currently utilized for NewtCanvasAWT, Android and in case you use your NEWT event listener
with AWT components.
http://jogamp.org/jogl/doc/NEWT-Overview.htmlBesides the multithreading benefit [rendering independent event dispatcher],
NEWT supports:
- transparency,
- fullscreen,
- decoration less windows,
- native [re-]parenting
- Applet integration [easy]
<
http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.html>
demonstrated here: <
http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html>
- [mouse] pointer control [confine, warp]
<
http://jausoft.com/blog/2011/10/13/new-newt-mouse-features/>
- .. ?
The JOGL test applets / demos are a nice demonstration of how you just can
deploy a demo as an Applet, desktop application and on mobile (Android)
if implemented solely based on GLEventListener and NEWT listener.
But .. whatever you choose, AWT, SWT, NEWT, ..,
the most important fact here IMHO is *you have a choice*.
Cheers, Sven
PS: NEWT is not in any way related to one of the current US GOP candidates :)