Login  Register

Re: How do I create second GL context?

Posted by kitfox on Nov 21, 2011; 9:36pm
URL: https://forum.jogamp.org/How-do-I-create-second-GL-context-tp3526076p3526125.html

I tried adding the following, but am still getting null:

[code]
        GLContext glCtx = fact.getOrCreateSharedContext(null);
       
        GLPbuffer pbuf =
                fact.createGLPbuffer(null,
                caps, null,
                width, height,
                glCtx);
[/code]

And in case I made it sound confusing above - the reason I need the second context is that I'm using a plugin-like architecture.  The bit of code that handles rendering to the screen should know nothing about the code that handles rendering to the offscreen image (that is then saved to disk) and visa versa.  Both are passed the scenegraph they need to render via an interface.