Login  Register

Re: AWT thread question

Posted by Kain16 on Nov 06, 2015; 7:40am
URL: https://forum.jogamp.org/AWT-thread-question-tp4035746p4035749.html

Hi,

Thanks for the reply.
I made a small example.

At a JButton's action:

SwingWorker<Void, Void> sw = new SwingWorker<Void, Void>() {
        @Override
        protected Void doInBackground() throws Exception {
                rManager.changeEnvMap(); //  call display of my "offscreen drawable"(rManage)
                return null;
        }
};
sw.execute();

For my test i have two GLJPanel with shared context which are displaying a box and a sphere with environment mapping and a button for call code above. If  i use the button and check which thread is processing my display for "offscreen drawable" than i got "SwingWorker-pool...".

And it works :).

Is this so simple ? Does "Jogl" manage all the current thread / context switching?

Balazs