On 01/05/2013 03:04 AM, tag [via jogamp] wrote:
> 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).
Please provide a unit test reflecting your case.
Best would be if you copy code from
(1) 'TestSharedContextListAWT' and maybe (2) 'TestSharedContextVBOES2NEWT'
(1) is AWT based and shared lists where (2) is NEWT based and shares VBOs.
Please create a bug report.
Either send me a git pull request, or the git email patch
and reference it w/ bug report.
You can also attach your unit test to the bug report.
On 01/05/2013 01:12 PM, gouessej [via jogamp] wrote:
> If you want to avoid your context to be destroyed, you mustn't use the
> heavyweight AWT canvas, rather use GLWindow or NewtCanvasAWT.
Note that ctx sharing via NEWT is tested on all platform via above unit tests,
hence using the already mentioned NewtCanvasAWT would at least give you
a working environment - but it also gives your application a better performance.
Please consider NEWT Overview:
<
http://jogamp.org/jogl/doc/NEWT-Overview.html>
~Sven