Xith3D for SWT (again)

Hi all,

I’m looking for an implementation of a Java scenegraph which is working with Eclipse SWT instead of Swing, that is using an org.eclipse.swt.widgets.Composite instead of a java.awt.Canvas (or s.th. similar) and SWT events instead of AWT events. I’m currently using Java3D and the SWT_AWT bridge, but unfortunately this isn’t working with Mac OS X.

I’ve found a thread here some time ago (http://www.java-gaming.org/forums/index.php?topic=3423.msg31689) discussing that topic and I’m wondering if a solution exists by now. If it doesn’t, do you know another scenegraph implementation working with SWT?

Jens

Well, this thread is older than my account. So I cannot say, what happened as a result of it. But I can tell you, that I’ve found no sign of SWT in the source so far :(. Ian I really don’t know of other scenegraphs’ features very much.

Marvin

I think this could be done, since there seems to be a SWT implementation for JOGL and at least a snippet for LWJGL on the Eclipse OpenGL page.

The greatest hurd would be to create corresponding renderers in Xith, since they don’t exist yet. But I suspect implementing them would be copy and paste with straight forward package renaming of the existing renderers.

So the question is: somebody interested in doing this?

So jpilgrim welcome to Xith3D, :slight_smile:

if you’re interested in doing that, please download latest CVS sources and do the mods you need (if you think you have enough knowledge. If not, just ask something to do it for you ^^. But in every case doing it yourself is still the best solution). Then you can commit your sources and we can include them in xith3d if successful. If you are further interested in Xith3D we could grant you Dev access.

Is that fine for you ? :slight_smile:

Even if I haven’t had a look at it, maybe we can use generics to reuse to AWT based renderers. I believe the main difference in it will be the containers to use (java.awt.Container in case of AWT). Maybe we can just use a generic type instead of java.awt.Container if the tow have something in common.

Hum the single word “generics” fluff the hair of the performance-wanting developer… isn’t it ?

[quote="<MagicSpark.org [ BlueSky ]>,post:6,topic:28382"]
Hum the single word “generics” fluff the hair of the performance-wanting developer… isn’t it ?
[/quote]
No! Generics will never be more expensive that non-generic code. The compile is always able to create at least the same performance from the code, since the code is the same, but with additional type specifications and without (or with less) casts. Java is a strongly typed language and is even stronger typed with generics. When the compiler knows of a variable’s type more exactly it can better optimize the compiled (byte) code. Correct me if I’m wrong, but shouldn’t it be this way?

Marvin

The compiler will generate mostly the same byte code. In fact generics are just compiler checked casts, since that is whats happening under the hood. The instances are just casted to the specified type on request…

So at least generics are no problem, if they’re not even more high performance in some cases.

Ok-dokey.

Thank you all for the answers. So, I downloaded the latest version from the CVS. By CVS do you mean cvs.dev.java.net?
I didn’t found any demo files in the CVS. Are they gone?

Sorry, I’ve found them in xith-tk. TK means toolkit?

indeed