Mixing Java3D and JOGL

Hello,

is there a way to use JOGL inside a Java3D (ogl) Canvas3D and/or share the same context ?

Mik

Technically, no, as Java3D could use either DX or OGL as the renderer. However, there was a post on one of the J3D lists about 2-3 weeks ago from someone that had created their own WindowsOGLContext() instance during one of te initialisation phases of the Canvas3D and managed to get it all to run reasonably well.

Found it -> http://www.javadesktop.org/forums/thread.jspa?threadID=3222&tstart=15

Thanks,

Mik

The trick (grab from post):

After the Canvas3D environment has been created, add the following to create a JOGL environment:


WindowsOnscreenGLContext wgl = new WindowsOnscreenGLContext( this, new GLCapabilities(), null, null );
GL gl = wgl.getGL();

Now use gl in either/or preRender or postRender with the OpenGL commands you want to display either before the scene graph or after the scene graph. Great for display only elements using JOGL capabilities.