Login  Register

Re: Rules for sharing context between GLJPanels?

Posted by Marian Schedenig on Aug 29, 2014; 4:43pm
URL: https://forum.jogamp.org/Rules-for-sharing-context-between-GLJPanels-tp4032950p4032976.html

Thanks for the corrections.

I was already using GLSharedContextSetter via GLJPanel. Turns out the problem was a stupid mistake buried in my core code. I have a common class to encapsulate and handle all my drawing operations. I initialise that with the GL instance from my JOGL context. What I didn't think of was that when using multiple panels with multiple GL contexts, that GL instance was changing - hence the drawing operations still using the GL from a different context.

I now always set the current GL instance before painting a panel, and it works fine.

The only problem that's left is that my textures (loaded from the shared dummy auto drawable) lack alpha, even though I list an 8/8/8/8 colour configuration in my requested capabilities. But that's probably also just some remaining bug somewhere in my own code.