Posted by
Sven Gothel on
Dec 05, 2010; 2:08pm
URL: https://forum.jogamp.org/re-NEWT-Threading-Overview-tp1991718p2022369.html
On Tuesday, November 30, 2010 10:47:47 Cork [via jogamp] wrote:
>
> Is there a similar concept of a shared context so that the textures bound to the context are available to all the NEWT Displays (Display is the right word? or are they still called canvases - still trying to get my head around what NEWT is...)
Dear Cork,
regarding your question I have fixed the NEWT GLWindow API adding a setter for shared GLContext,
which was missing - sorry.
http://jogamp.org/git/?p=jogl.git;a=commit;h=fd0d3f15d41d32b3987f4b88862619ef1a31b999http://jogamp.org/git/?p=jogl.git;a=commit;h=de2a30104098216963132ed02b3dd66acd799d9eBoth include a simple shared display list example with our infamous Gears :)
Sure this would work with everything shared, hence textures as well.
This is included in build #243
http://jogamp.org/deployment/archive/master/gluegen_230-jogl_243-jocl_222/http://jogamp.org/deployment/archive/master/gluegen_230-jogl_243-jocl_222/archiveI have cleaned up the folder structure a little bit,
so the demos are in it's own folder as well as the developer archive ZIP files (archive).
>
> Currently I have a base class that encapsulates my GLCanvas. This consumes a few common keyboard and mouse events. The owning container (dialog or frame) also attaches a listener so it also has a chance to process these same, and other events that the child wasn't interested in. I'm wondering how a decoupled EDT will work in this case.
> is it still possible that as I switch focus between my multiple canvas's I'm going to receive my events as before?
> Does a parent container have a chance to 'add a listener' to the EDT?
NewtCanvasAWT propagates and translates all parent (Canvas) AWT events to the NEWT Window/GLWindow,
and hence to it's listener - yes.
> I read something about 1 EDT per Display? whereas currently swing is a single EDT for the whole app and all my canvases. So my app currently has around 20 canvas's, does that mean now 20 EDT threads?
No.
The NEWT Display is a straight analogy to the native windowing system 'display'.
On MS Windows this just does not exist, hence it is unique.
On X11 Windowing System this is the DISPLAY connection, so when you run it all local (:0.0/null)
you deal with only unique NEWT Display as well.
To be honest, NEWT Display 'only' exists to comfort X11 and EGL.
> Does it also mean 20 rendering threads?
And here comes the beauty of NEWT,
rendering [is/threads are] decoupled from the NEWT EDT.
As mentioned in my blog (please read it, plus examples):
http://jausoft.com/blog/2010/11/28/newt-threading-overview/You just use as many animator threads as you wish (eg Animator)
and they are able to render independent from AWT EDT's or whatsoever.
>
> Anyway great to see some doku appearing for NEWT :)
Thanks to the request(s) - yes.
Since I am very busy with the rc2 and fixing core bugs,
it would be awesome if somebody creates a NEWT section in our wiki.
Please email me with your gpg/pgp public key id, so we can setup an account.
Cheers, Sven
>
>
>
> ______________________________________
> View message @
http://jogamp.762907.n3.nabble.com/re-NEWT-Threading-Overview-tp1991718p1991718.html> To start a new topic under jogl, email
[hidden email]
> To unsubscribe from jogl, visit
health & wealth
mailto:[hidden email] ;
http://jausoft.comland : +49 (471) 4707742 ; cell: +49 (151) 28145941
Timezone CET: PST+9, EST+6, UTC+1