Re: GLException "Unable to create temp OpenGL context for device context" thrown when GLContext.makeCurrent() called
Posted by
Sven Gothel on
Sep 11, 2012; 8:17pm
URL: https://forum.jogamp.org/GLException-Unable-to-create-temp-OpenGL-context-for-device-context-thrown-when-GLContext-makeCurrend-tp4026068p4026124.html
On 09/11/2012 09:02 PM, stepasite [via jogamp] wrote:
> Hi Sven,
>
> I know about the constructor and that was the way how I shared GLContext
> instances till migrating to JOGL2.
>
> But with JOGL2 this sharing does not work reliably for me. When all the
> canvases are docked in my app at the same time (removeNotify() and then
> addNotify() called for all the canvases), the context is sometimes lost.
Right .. use an offscreen drawable / GLContext and share that one
w/ the other. See *Shared* unit tests ..
>
> When asking my previous question, I was looking for a way of sharing GLContext
> as it is done in GLWindow -- sharing of context can be done later (e.g. in
> init()), not when constructing an object.
nope .. in GLWindow and all GLContext usage in general (native API general)
it has to be done before the GLContext is constructed
and hence before any GLEventListener gets called.
~Sven