Java3D embedded in an Eclipse RCP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Java3D embedded in an Eclipse RCP

pmagerma
Hi Jogamp team,
Happy to see that you take in hands the continuation of Java3D.

I develop an Eclipse RCP app which displays river basins using Java3D for a while. I was using version 1.5.2 so far, and I tried this week the new version 1.6 over JOGL.

Unfortunately, I faced one hangout problem.

This occurred in the creation of the Canvas3D, when getting the Preferred Configuration.
I tracked it down to the instruction "f.setVisible(true)" in JoglPipeline.getBestConfiguration(GraphicsConfigTemplate3D).

This seems due to the fact that the frame (an AWT Embedded in an SWT composite of an editorPArt) is not visible yet (in reality, not completely instantiated) when this instruction is called.

If I try with a minimalist RCP app, just a view and a simple universe in it, it won't hang, although I see briefly a window appearing and disappearing, which to me seems to be the Frame that hangs in my complex app.

I just wanted to warn you, as I'm not stuck: I found a way to initialise my drawings in two different synchronised threads, to let the window appear before continuing the initialisation and hence avoiding the interlock.

Cheers,
Pol Magermans
Software Engineer,
Aquapôle, University of Liège, Belgium.
Reply | Threaded
Open this post in threaded view
|

Re: Java3D embedded in an Eclipse RCP

gouessej
Administrator
Hi

I worked on a software (for Earth science) based on Eclipse RCP and "our" own visualizer (plain JOGL) several years ago.

You probably use SWT_AWT (the SWT/AWT bridge). I had to do some hacky things to make it work correctly with the debug pipeline. I'm a bit ill at ease because there is only one other high level 3D engine whose default renderer is based on JOGL and which doesn't require the use of a bridge for SWT integration but it isn't Java3D because there is no plan to add new features into it even though it is still actively maintained (big kudos to Harvey and some individuals of course). I fear that you'll have to go on using your clever workaround. Please share your findings (in details) and maybe I'll have something a bit smarter to suggest.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D embedded in an Eclipse RCP

pmagerma
Hi Julien,

You're right, I have to use SWT_AWT bridge and it is a bit tricky.

I won't miss the occasion to share my findings with you guys.

Cheers

Pol

P. Magermans,
Software Engineer
Aquapôle, University of Liège, Be
Reply | Threaded
Open this post in threaded view
|

Re: Java3D embedded in an Eclipse RCP

gouessej
Administrator
Hi

You can look at this bug report, it contains an old example that uses my hacks:
https://jogamp.org/bugzilla/show_bug.cgi?id=455

Best regards.
Julien Gouesse | Personal blog | Website