Login  Register

Problem sharing a context among panels in the same frame

Posted by tag on Jan 05, 2013; 2:04am
URL: https://forum.jogamp.org/Problem-sharing-a-context-among-panels-in-the-same-frame-tp4027703.html

We're trying to display two GLCanvases in side-by-side or tabbed panels in the same parent JFrame and share the JOGL context. This worked fine with JOGL 1 but causes either a crash (on OS X) or failure of textures to show up on all but one of the canvases (on Windows 7) with JOGL 2. Our specific examples use JTabbed pane to hold a GLCanvas in two of the tab panes, CardLayout with a GLCanvas on each card, and BorderLayout with two GLCanvases side-by-side. Is this a known problem, and is there a workaround?

Sharing contexts works fine for us when the GLCanvases are in their own frames, but doesn't work when they are in the same frame (the above cases).