Login  Register

Re: Context sharing: regression from JSR231 to Jogl 2.x?

Posted by TomN on Sep 14, 2011; 10:35am
URL: https://forum.jogamp.org/Context-sharing-regression-from-JSR231-to-Jogl-2-x-tp3332167p3335436.html

Thanks for the feedback, guys. Changing the order of operations as you suggested makes the context sharing work, but I still have a crucial problem that I didn't have with Jogl 1.1.1.

Allow me to elaborate on what I'm trying to achieve. I use a GLCanvas as my main drawable. The application uses a docking framework and offers a full-screen mode, both of which trigger changes to the component hierarchy surrounding the GLCanvas. By default, these changes cause all my application's texture objects to be lost due to the GL context being recreated. I successfully circumvented this with Jogl 1.1.1 by creating a pbuffer that shares its context with the GLCanvas. Since the pbuffer is not affected by the component hierarchy changes, it "protects" my texture objects for me.

My current status with Jogl 2.x is that texture objects are valid in both the canvas and the pbuffer as long as I leave the canvas where it is. When the canvas reinitializes its context, however, it looks like the context sharing with the pbuffer is broken, and as a result my textures are still gone. Am I missing anything else?

If it helps, here's the unit test code that I'm using to investigate these issues:
GLCanvasContextSharingFullscreenTest.java

Thanks again,
-- Tom