Login  Register

Re: Problem Moving from 1.1.1a -> 2.0

Posted by Sven Gothel on Mar 16, 2012; 9:14am
URL: https://forum.jogamp.org/SOLVED-Problem-Moving-from-1-1-1a-2-0-tp3826486p3831296.html

On 03/16/2012 07:59 AM, sorghumking [via jogamp] wrote:

>
>
> Okay, it's definitely a context problem.  We attempt to share contexts as
> follows:
>
> 1. Create a dummy GLCanvas with the default constructor
> 2. Grab that canvas's GLContext with getContext()
> 3. Pass that context when instantiating the GLCanvases we actually render to
>
> I discovered
> http://forum.jogamp.org/JOGL1-1-1-gt-JOGL2-Sharing-context-drawable-member-of-GLCanvas-is-null-in-createContext-td1851054.html
> this thread  and tried his workaround - after creating the dummy canvas, add
> it to a Frame and make the frame visible - it works!!!  I'm delighted, but
> why do I need the workaround?  That thread is from late 2010, and his last
> post suggests the issue was resolved in a newer JOGL build ("cool, it works
> fine now with the jogl-2.0-b3-20101124-windows-i586 build").  Is my approach
> to sharing the context the problem?  How should I be doing it?
>
Use the source 'sorghumking' :)

http://jogamp.org/git/?p=jogl.git;a=tree;f=src/test/com/jogamp/opengl/test/junit/jogl/acore;h=36a0b271b26633906c1d1395d33545632d774c7e;hb=HEAD

Looks at the many tests here w/ *SharedContext* in the name.

~Sven


signature.asc (910 bytes) Download Attachment