Skip to main content

FYI: Using JOGL withing Java3D

3 replies [Last post]
snowstm
Offline
Joined: 2004-06-29

FYI: JOGL code can be used within the Java3D environment.

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.

I have only begun testing this capability, however so far it works perfectly, and should work with similar commands for Linux and MacOS as well. Do not use any of the context code as that will likely fail, it uses the current OpenGL context already set by Java3D.

I am using it for a head up display over a Java3D scene graph.

S.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
soundjata
Offline
Joined: 2004-08-23

To achieve platform transparency you'd better use

GLContext wgl = GLContextFactory.getFactory().createGLContext(this, new GLCapabilities(), null, null );

This works on my Solaris/X11.

Russell East

Hi,
how does this work with the Java3D downloadable jars? I cannot find any
JOGL related classes in there at all. It looks more like JOGL has been
completely hidden within the 3dcore-ogl so/dll. If I wanted to mix both
Java3D and JOGL right now, do I need to include jars/binaries for both?
-- Russell

> -------- Original Message --------
> Subject: [JAVA3D-INTEREST] Re: FYI: Using JOGL withing Java3D
> Date: Mon, 23 Aug 2004 09:37:53 EDT
> From: java3d-interest@javadesktop.org
> Reply-To: interest@java3d.dev.java.net
> To: interest@java3d.dev.java.net
>
>
>
>To achieve platform transparency you'd better use
>
>GLContext wgl = GLContextFactory.getFactory().createGLContext(this, new GLCapabilities(), null, null );
>
>This works on my Solaris/X11.
>---
>[Message sent by forum member 'soundjata' (soundjata)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=24217庙
>
>
--------------------------------------------------------------------------------------------------

> -------- Original Message --------
> Subject: [JAVA3D-INTEREST] FYI: Using JOGL withing Java3D
> Date: Fri, 09 Jul 2004 15:03:12 EDT
> From: java3d-interest@javadesktop.org
> Reply-To: interest@java3d.dev.java.net
> To: interest@java3d.dev.java.net
>
>
>
>FYI: JOGL code can be used within the Java3D environment.
>
>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.
>
>I have only begun testing this capability, however so far it works perfectly, and should work with similar commands for Linux and MacOS as well. Do not use any of the context code as that will likely fail, it uses the current OpenGL context already set by Java3D.
>
>I am using it for a head up display over a Java3D scene graph.
>
>S.
>---
>[Message sent by forum member 'snowstm' (SLZ)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=16053㺵
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Matthew Hilliard

J3d doesn't run with jogl--it uses its own native bindings.

You can look into Xith3d since it's essentially a j3d implementation on top
of jogl.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net