OK UI package now ported to SWT ! ! !

That was a BITCH ! ! !

Anyone out there even using the userinterface package,
or did I just waste 3 weeks of my life needlessly ?

UIWindows are a good idea, but I had to change a few
things. Firstly, transforms were a little off “out of the box”
so mouseclicks could go unnoticed, ESPECIALLY if one were
to resize the window. Secondly, it was necessary to put
some code in to differentiate when an event was
intended for an overlay, and when it was intended for the
actual canvas. Also, UIOverlay stuff is useful on its own,
it should not be in the same package as UIWindow stuff.
Of course, that’s an academic argument. Lastly, the whole
thing is glued together with AWT event crap. All of that
had to be abstracted into interfaces.

Things I wanted to change, but couldn’t:

Views know about UIWindowManagers, Why?
Shouldn't UIWindowManagers just stick geometry
into scenes, and views render geometry.  Keeps
code clean . . . reduces plaque.

Anyway, it’s working flawlessly on Swing and SWT now,
even after reshapes of the top level frame.

Yeeaahhh Bwooyyy ! ! !

                                                       -TOBY

Looks like an LWJGL based, totally awt independant build of xith is now something feasable 8)
Good job champ :slight_smile:

AAAAARRRRRGGGHHHH!!!

You guys changed all the code . . .

Now I know there is a God . . .

No one else would find this shit funny . . .

I’ll be in merge purgatory if anyone needs me . . .

                                    -TOBY

LOL - ;D

[quote]Looks like an LWJGL based, totally awt independant build of xith is now something feasable 8)
Good job champ :slight_smile:
[/quote]
bloody ripper! Please keep up the good work tgeorge.

I was worried about using UI in my game for this reason but now I am not.

Thanks,

Will.

[quote]AAAAARRRRRGGGHHHH!!!

You guys changed all the code . . .
[/quote]
…but what shall we do?.. I megre very very very often. But, anyway, we need to co-ordinate work better to minimize such pbs.

Yuri

[quote]Anyone out there even using the userinterface package,
or did I just waste 3 weeks of my life needlessly ?
[/quote]
I am definitely using the userinterface package, and thanks for the time that you’ve spent working on it Toby, I really appreciate it. I was able to easily add some Swing UIs that I had created into my 3D scene and am very excited to have this capability. ;D

I’m looking through the classes now in the package com.xith3d.userinterface, and I’m trying to figure out how everything works. I’ve downloaded the source code from 2-29 and am looking through that, but if you’ve made changes, I would really like to see what you’ve done. If I go to http://www.xith.org/ and click on source at the top and go to the user interface package classes, would I be able to see what your changes done there, or are you still working on merging the code? Once you’re done, could you list the classes that were changed also?

Again, thanks for your contributions.

Jason Cheatham

J,

I am in the process of commenting my repackaged
implementation and putting a zip of it on a publicly
available web site. When I get done, I will post a message
to this list.

                                          -TOBY

Toby,

I’m really looking forward to seeing what you’ve done. The userinterface package is very interesting and I’ve had to deal with differentiating when an event was intended for an overlay, and when it was intended for the actual canvas, so the fact that you’ve dealt with this is great news for me. Let me know if I can do anything to help.

Jason

Any progress here?

I love the idea of using overlays, but at the moment they are too buggy (wrong transforms, missing events, losing focus etc) to be of any real use…

Terje

I don’t understand the significance of this. Does it mean that Xith3D can now be used in an SWT GUI window?

I believe the project was to use SWT for the UIWindow instead of Swing/AWT…

I am guessing that UI package allows using SWT components inside Xith ? What about the other way around? Is there a way to use SWT shell to display the Xith context ?

[quote]I believe the project was to use SWT for the UIWindow instead of Swing/AWT…
[/quote]
I’m a little lost in the teminology here ???

What I would be interested in is to develop a Java application using SWT instead of Swing, but still be able to use Xith3D to display 3D graphics.

I’ve seen that there’s an experimental OpenGl binding for SWT but it’s not Jogl. Isn’t Xith3D based on Jogl. Doesn’t this imply that Jogl must be available for SWT before Xith3D can be?

Is this UIWindows thing some kind of shortcut that makes it possible to use Xith3D with SWT without Jogl?

Xith3D isn’t tied to JOGL, it works with LWJGL for example.

I havn’t looked into the SWT bindings personally but I’m sure it’s possible (and someone has done it so quite clearly it is).

The ``userinterface’’ package however is different as that uses Swing. It sounds like there may be a way you can remove this dependancy with a SWT/Swing package?? I don’t know.

Will.

[quote]Xith3D isn’t tied to JOGL, it works with LWJGL for example.
[/quote]
If this is so this information isn’t given in the Xith3D features sticky thread. It says: Reference implementation uses JOGL -> OpenGL

What do you mean by quite clearly. Does this mean you’re sure that Xith3D can be used with SWT?

I just don’t understand if what you’re saying means that Xith3D can be used with SWT?

I’m sorry for beeing thick here but I’m not familiar with Xith3D and its current status. Is there a straight yes or no answer to be had? Can Xith3D be used with SWT right out of the box as it stands now?

The short answer is NO.

This thread is talking about the UI (``userinterface’’) package.

These are swing widgets you can use in your application.

tgeorge claims to have ported the UI package to SWT.

SWT could potentially be used instead of JOGL or LWJGL if it has a way of doing OpenGL which I believe it does. But someone would have to code it first.

The sticky thread is correct - the reference implementation is for JOGL. Recently LWJGL support has been added.

Will.

OK,

I just happened to peek in here today, and saw this exchange.
So I wanted to let everyone know exactly what it is that I have
done.

What I have done is really two things. Firstly, I ported the
JoGL bindings to SWT. So that you can use JoGL in an ALL SWT
application. This first part has absolutely nothing to do with
Xith3D. Secondly, I modified the Xith3D release to use the
JoGL over SWT binding. This second part obviously required
me to make MAJOR changes to the Xith3D code base. The version
of Xith3D that I am using runs on both AWT/Swing AND SWT ! ! !

So when I say that the userinterface package was ported to SWT,
what I meant was that the userinterface package can now run
using my version of Xith3D, running over my version of JoGL,
running over SWT. I hope everyone followed that. It means
that you can bring up a SWT window, or ‘Shell’, and put a
canvas in it that has a Xith3D based scene painted in it.
Now, the Swing components that the userinterface package puts
up as an overlay on the screen can now be used as a chat
window, or what have you, with full transparency support under
SWT.

The problem, as I saw it at the time I originally started this
topic, was how to go about merging the changes back into Xith3D.
To do so would mean that almost everyone else’s applications
and demos would break, but I would get help supporting a fast SWT
3D rendering engine for free. Since my business is medical
imaging, and NOT 3D library development, to get the free help
from the open sourcers was very attractive to me. However, I
quickly realized that there would be an argument over the fact
that my version of Xith3D would break what’s been built to date.
Now instead of making everyone else rework applications
that they’ve spent countless hours on, I decided to just use
the changes myself and not get into flame wars.

That said, I am thinking about starting a blog on the topic of
my version of Xith3D for others who are interested in using
Xith3D over SWT. I know there are problems with forking just
like there are problems with merging, but I think this is
necessary for several reasons. Primarily, I am lazy, and a
freeloader, by nature. So if someone else is
willing to do coding, I am more than willing
to benefit from . . . er . . . I mean . . . beta test . . .
their changes to my version. Another reason that such a blog
may be valuable, is that the version of Xith3D that I have
makes some major improvements to Xith3D including support for
LUMINANCE, INTENSITY and other grayscale-like pixel formats,
as well as, 3D textures. These things are EXTREMELY useful in
medical imaging. Not to mention implementing the userinterface
package correctly, so that mouse hotspots line up with the
picture of the Swing component on the screen. Other
improvments include the ability of JoGL over SWT to support
adding and removing multiple canvases to and from a SWT
window, and supporting java based OpenGL applications with
small memory footprints. Memory is something AWT/Swing just
does NOT do well.

Well,
There you have it citizens . . .
And now I welcome your questions if anything is still unclear.

                       -TOBY

[quote]OK,
What I have done is really two things. Firstly, I ported the JoGL bindings to SWT. So that you can use JoGL in an ALL SWT application. This first part has absolutely nothing to do with Xith3D. Secondly, I modified the Xith3D release to use the JoGL over SWT binding. This second part obviously required me to make MAJOR changes to the Xith3D code base. The version
of Xith3D that I am using runs on both AWT/Swing AND SWT ! ! !
[/quote]
Thanks Toby, I now have a much better understanding of what you’ve done. The Xith3D/SWT combination I’ve been looking for actually exists. :slight_smile:

I have a couple of questions though.

  1. You say you first ported Jogl to SWT. Shouldn’t this be enougth to make standard Xith3D work? You say that you had to make major changes to Xith3D for it to work on Jogl for SWT. Why is that so?

  2. These major changes you had to make to Xith3D are they strewn all over the place? I guess they’re somehow related to replacements of Swing related code. I had expected Xith3D to have a confined interface for this to avoid the unfortunate situation you describe where several parallell versions must be maintained.

  3. Shouldn’t the Eclipse people be very interested in what you’ve done and wellcome it with open arms? From what I know Eclipse doesn’t have any 3D support at all (apart from an experimental OpenGL binding). Has there been no reaction?

I’m very interrested in this. Your changes are of two kinds aren’t they. Bare minimum to make things work and improvements. Anyway, hopefully there’s a way to incorporate your changes into standard Xith3D to avoid forking.

/Ulrika

well if u have the Overlays working with events better then they are that would be a good start :slight_smile: