Login  Register

Re: transfer images from TextureData to a Texture off of the EDT in JOGL

Posted by Sven Gothel on Aug 02, 2014; 8:49pm
URL: https://forum.jogamp.org/transfer-images-from-TextureData-to-a-Texture-off-of-the-EDT-in-JOGL-tp4032678p4032694.html

On 08/01/2014 01:27 PM, Marco [via jogamp] wrote:

> Hi,
>
> thankyou for your hints.
>
> I now compressing the data to DDS in another thread on the fly, which works
> really good for me. At least on my machine texture loading "freezes" are gone.
>
> I allready realizes that I need to make thread the current context for GL.
> Even loading in another thread, I still got trouble since some other jogl
> parts running on the ui thread seesms to ask for a global lock, and finally
> waiting for this lock still causes UI freeze, even the work is done on another
> thread.
>
> I knew that AWT needs to have everything in the event dispatch thread. but I
> don't know why just loading data inside jogl needs to set such a global lock
> which prevent me from doing real multi threading?
Well, If you dare to look into our GLMediaPlayerImpl's StreamWorker thread,
you will see that we utilize a shared context running on a separate thread
which loads the texture from the movie decoder. Each finished texture frame
is then pushed to the full ringbuffer, ready to be used by the user,
which runs on a different thread, using the 'other shared GL context.'

I have elaborated on this here as well:
  <http://forum.jogamp.org/Best-way-to-prepare-an-Image-td4031731.html#a4031732>

~Sven


signature.asc (894 bytes) Download Attachment