Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  OK UI package now ported to SWT ! ! !  (Read 7212 times)
0 Members and 1 Guest are viewing this topic.
Offline tgeorge

Senior Newbie




Java games rock!


« Posted 2004-03-18 04:58:18 »

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
Offline Java Cool Dude

Senior Member




Java forever


« Reply #1 - Posted 2004-03-18 05:01:14 »

Looks like an LWJGL based, totally awt independant build of xith is now something feasable  Cool
Good job champ Smiley
Offline tgeorge

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-03-18 05:12:18 »

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
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline aNt

Senior Member




AFK


« Reply #3 - Posted 2004-03-18 07:16:49 »

LOL -  Grin
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #4 - Posted 2004-03-19 08:13:23 »

Quote
Looks like an LWJGL based, totally awt independant build of xith is now something feasable  Cool
Good job champ Smiley


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.

Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #5 - Posted 2004-03-20 17:24:15 »

Quote
AAAAARRRRRGGGHHHH!!!!

You guys changed all the code . . .


...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

Yuri Vl. Gushchin
JProof Group
Offline jkc6n

Senior Newbie




Java games rock!


« Reply #6 - Posted 2004-03-23 14:12:37 »

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


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. Grin

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
Offline tgeorge

Senior Newbie




Java games rock!


« Reply #7 - Posted 2004-03-24 12:09:02 »

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
Offline jkc6n

Senior Newbie




Java games rock!


« Reply #8 - Posted 2004-03-24 13:52:52 »

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

Offline orz

Senior Newbie




Java games rock!


« Reply #9 - Posted 2004-05-16 00:34:35 »

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
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline uj

Junior Member





« Reply #10 - Posted 2004-05-18 16:07:12 »

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

Senior Member


Medals: 1


Lazy Middle Class Intellectual


« Reply #11 - Posted 2004-05-18 17:39:09 »

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

Sacramento Volleyball
"Whitty phrase goes here."
Offline VeeJay

Senior Newbie




Java games rock!


« Reply #12 - Posted 2004-05-19 02:37:03 »

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 ?
Offline uj

Junior Member





« Reply #13 - Posted 2004-05-19 09:13:13 »

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

I'm a little lost in the teminology here  Huh

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?
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #14 - Posted 2004-05-19 12:47:05 »

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.

Offline uj

Junior Member





« Reply #15 - Posted 2004-05-19 15:14:55 »

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

If this is so this information isn't given in the Xith3D features sticky thread. It says: Reference implementation uses JOGL -> OpenGL

Quote

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).

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

Quote

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.

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?
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #16 - Posted 2004-05-19 23:59:19 »

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.

Offline tgeorge

Senior Newbie




Java games rock!


« Reply #17 - Posted 2004-05-20 04:20:18 »

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
Offline uj

Junior Member





« Reply #18 - Posted 2004-05-20 07:42:07 »

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 ! ! !

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.  Smiley

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
Offline aNt

Senior Member




AFK


« Reply #19 - Posted 2004-05-20 10:33:01 »

well if u have the Overlays working with events better then they are that would be a good start Smiley
Offline orz

Senior Newbie




Java games rock!


« Reply #20 - Posted 2004-05-20 12:17:25 »

I agree with aNt, please post the changes to the overlays  so we can fix the events for our guis =)

Terje
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #21 - Posted 2004-05-20 13:57:20 »

I'd would be very nice indeed to have this as part of the Xith3D distribution.

As we havn't frozen the API yet, improvements to the API should definitally be discussed considered.  The sooner the better.

Can your xith3d apps be compiled with gcj/JET to native code like other SWT apps?  Being able to compile a Xith3D app that used the userinterface package into native code would be a big plus I think.  Currently you can do it with LWJGL - but not if you're using the userinterface package.

Will.

Offline tgeorge

Senior Newbie




Java games rock!


« Reply #22 - Posted 2004-05-20 15:22:09 »

First for UJ's 3 questions,

1 - The reason that simply porting JoGL to SWT is not
enough to run Xith3D, is because Xith3D is dependent
on AWT components and AWT events.  All of that crap
had to be abstracted out to get Xith3D to work with
SWT obviously since SWT DOES NOT use AWT events
or components.  These are the changes that will guarantee
that most, if not all, existing Xith3D apps will not work
with my version of Xith3D.

2 - Sort of addressed this question above, but to be
explicit, yes these changes did need to be made in
multiple packages.  I'm thinking about some further
refactoring of my own Xith3D version to divide even more
things out a little better and make it easier to work
in the code base.  I think that there could be a very small,
core set of stuff that is Xth3D.  The rest would be
add on projects.   The 'userinterface' package represents
a good example of something that should probably be
an add-on package.

3 - Never actually considered the Eclipse people, but that's
a good idea.  I have had my head down in the
implementation of segmentation algorithms, so I have not
been keeping up with where Eclipse is, or what they may
need.  As only the JoGL, and the Xith3D projects help me
in implementing segmentation using level sets.  That
said, if you know how to get in touch with those people,
perhaps the Eclipse project would be a good place to
host this set of tools.  As opposed to some medical
imaging geek's blog, that may or may not be updated
once a year.

You seem to know a lot about Eclipse/SWT.  We should
talk, how do you send personal messages with this
website ?  Is it possible ?

                                       -TOBY
Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #23 - Posted 2004-05-20 18:31:06 »

Toby,

Can you post somewhere your changed version alone with original version of Xith3D you started to patch, so I can take a look on possible API changes?

I see no reason why we should avoid merging of your changes with the main source tree, so earlier this will happen, easier it will be.

Yuri

Yuri Vl. Gushchin
JProof Group
Offline uj

Junior Member





« Reply #24 - Posted 2004-05-20 20:08:31 »

Quote
First for UJ's 3 questions,
You seem to know a lot about Eclipse/SWT.

Unfortunately nothing useful in this situation. I'm just an ordinary Eclipse user. I have a Swing/Java3D application and I've been looking for alternatives because Swing hasn't been that good in the past and Java3D kind of faded away.

I thought SWT/Xith3D would be a good combination. Eclipse has a lot of momentum and is lacking a 3D renderer. Also it would be possible to produce pure native executables for Windows and Linux using Excelsior Jet if you want.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #25 - Posted 2004-05-21 15:27:47 »

So, er, what's going on then?

I wonder if, ummm, the Xith team might possibly consider porting their code permanently over to LWJGL? Seeing as it works with SWT (via a little adapter we now have) and AWT (via a JOGL) now?

Cas Smiley

Offline Yuri Vl. Gushchin

Senior Member




Speak Java!


« Reply #26 - Posted 2004-05-23 08:52:22 »

Cas,

At least I am thinking about this and already made some tests. As of SWT, I still don't have a version to take a look how it works and what has been done to factor out AWT dependencies.

Yuri

Yuri Vl. Gushchin
JProof Group
Offline jkc6n

Senior Newbie




Java games rock!


« Reply #27 - Posted 2004-06-08 01:36:37 »

Toby,

I've been working with the userinterface package and have ran into a couple of the problems that you have mentioned.  One problem was differentiating between mouse events in the scene and those in the UIWindow.  I wanted to be able to have a JSlider that controls the position of an object, but also wanted to be able to rotate an object in the scene with the mouse.  This capability isn't quite supported with the user interface package.

Now, I'm trying to be able to add a scrollbar to the UIWindow to scroll through the JPanel, but am stuck.  (Has anyone been able to do this?)

So, I was wondering if you might post your version of Xith to learn more about what you've done?  The userinterface package is extremely important and am thrilled that it supports Swing at all, but it can definitely be done better.  


Thank you!

Jason
Offline vinstar

Junior Newbie




Java games rock!


« Reply #28 - Posted 2004-06-09 12:14:27 »

It would be great to have a way to use Xith without any dependency on AWT. Makes it easier to use the IBM JDK on Linux for example.

We have experience with the SWT OpenGLCanvas and it works on Windows and Linux. It's just a wrapper to the OpenGL state machine using JNI, as it should be.

It would be nice if we could replace this with lwjgl and then have Xith3D on top of that Smiley  I like layered structures with their own responsibility.

How much time would this take ?
Offline vinstar

Junior Newbie




Java games rock!


« Reply #29 - Posted 2004-06-09 12:30:56 »

Quote
So, er, what's going on then?
I wonder if, ummm, the Xith team might possibly consider porting their code permanently over to LWJGL? Seeing as it works with SWT (via a little adapter we now have) and AWT (via a JOGL) now?


Say, I read on the lwjgl site that it is restricted to one window ... Does that mean that I cannot have multiple OpenGL views of the same object open, drawn on different canvases ?
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (23 views)
2014-04-15 18:08:23

BurntPizza (18 views)
2014-04-15 03:46:01

UprightPath (32 views)
2014-04-14 17:39:50

UprightPath (16 views)
2014-04-14 17:35:47

Porlus (32 views)
2014-04-14 15:48:38

tom_mai78101 (58 views)
2014-04-10 04:04:31

BurntPizza (116 views)
2014-04-08 23:06:04

tom_mai78101 (216 views)
2014-04-05 13:34:39

trollwarrior1 (183 views)
2014-04-04 12:06:45

CJLetsGame (190 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!