Looking for clarification on context

What is the easiest/most proper way to get a valid context that i don’t plan to render on, for purposes of texture/display list sharing? When my library is initialized, i need to establish one context to use for purposes of sharing with every rendering surface i create thereafter.

The best way is probably to see whether you can create a pbuffer with GLDrawableFactory.canCreateGLPbuffer() and if so create a small one and use its context. Note you may need to call display() on the pbuffer once to get its context to be created. If you’re running on an older OpenGL version which doesn’t support pbuffers, you could create a 1x1 undecorated Frame and add a GLCanvas to it. Note that that window would probably have to be visible for the lifetime of the application.

Apparently the magic I hadn’t known about was needing to call display(). I’ll use the PBuffer approach. Thankfully, supporting old OpenGL versions and hardware is not among my list of difficulties; this app will be running on a minimum of GF6xxx hardware.

Thanks, Ken! you kick ass.

Hi,

I’ve tried several options to share lists, and is facing problems. I can’t make the displaylist persist over the init call in a GLJPanel (tried creating both a visible frame as above, and a pbuffer, to get a sharing context out). I’m working in the java2d jogl mustang environment.

So before tearing off more hair I would like to hear if anybody has succeeded in sharing lists (in the same GLJPanel across init), in the java2d/jogl/mustang setup. To my best I’ve tried to use the hints in the threads concerning the issue. I use the below settings.

Best regards Christian

-Djogl.verbose -Djogl.debug.Java2D
-Dswing.aatext=true -Dsun.java2d.opengl=true
-Dsun.java2d.d3d=false
-Djogl.debug.GLJPanel

Could you write a small test case showing the problem? It’s certainly possible there are issues in the context of the Java2D/JOGL bridge in this area, though I think that by virtue of some of the jogl-demos working (such as ProceduralTexturePhysics) sharing between GLJPanels and GLPbuffers is working when the bridge is active.

Hello,

Thankyou very much for the information. It was nice knowing wheter it is an exising known feature or something to look at. I did a small demo to illustrate the problem, which failed to do so. So I’ll look into my legacy application that apparently misbehaves.

Regards Christian