Hello Guest

SWT

  • 28 Replies
  • 21201 Views
SWT
« on: March 31, 2004, 14:04:54 »
I found a few posts mentioning about SWT integration, but couldn't find how to do it. There was a link in one the posts but it was broken, and the CVS tree didn't seem to have anything related to SWT. Could some be kind enough to give me any direction?

thanks :)

*

Offline fbi

  • **
  • 56
Resurrected link...
« Reply #1 on: April 01, 2004, 07:10:28 »
Sorry...but that link is broken 'cause of the fact I did turn my web server off. I did implement a SWT binding on the Windows platform...and I should finally take some to port it on Linux/GTK.
BTW: I restarted the web server so the link you found should work (at leat today)  :D
Anyway we should put it in the CVS someday...Cas can I start implementing the GLCanvas interface and inherit my old SWTCanvas class from it :D  (at least we have a working Windows version soon)?
I think I'll work on a simplified build of the 0.89 version (stripping out OpenAL and something else as long as I can...it should not be a problem to plug it in later).

SWT
« Reply #2 on: April 01, 2004, 07:18:05 »
Thanks fbi! :)
Just downloaded the file and it seems great stuff!

I'll try to get GLCanvas in an Eclipse rcp application, let's see what happens :p

*

Offline princec

  • *****
  • 1933
    • Puppygames
SWT
« Reply #3 on: April 01, 2004, 08:52:33 »
We've got the new GLContext stuff in CVS now - care to try it out?

Cas :)

*

Offline fbi

  • **
  • 56
SWT
« Reply #4 on: April 01, 2004, 11:00:57 »
Ok...I'm gonna connect to the CVS. I take a look at it and then I tell you what I'm supposed to do  :wink:

*

Offline fbi

  • **
  • 56
SWT
« Reply #5 on: April 01, 2004, 11:36:45 »
OK Cas...I tried the context stuff and all...the question now is: I create anyway a GLCanvas interface, my SWTCanvas class inheriting form it and I care about the registration of the GL context with the new stuff, ain't it?  :)

*

Offline princec

  • *****
  • 1933
    • Puppygames
SWT
« Reply #6 on: April 01, 2004, 12:18:23 »
'srite. You just pass it into GLContext.useContext(mySWTcanvas) - and then all LWJGL GL calls will be on your SWT canvas!

Make sure you're in the same thread as the thread that created the SWT context though.

Cas :)

*

Offline fbi

  • **
  • 56
SWT
« Reply #7 on: April 01, 2004, 15:01:20 »
Quote from: "pedr0t"
Thanks fbi! :)
Just downloaded the file and it seems great stuff!

I'll try to get GLCanvas in an Eclipse rcp application, let's see what happens :p


Lemme know about it...  :wink:
I'm gonna try something like this too...so could share same ideas and code someday if you like it  :)

*

Offline fbi

  • **
  • 56
SWT
« Reply #8 on: April 01, 2004, 15:02:43 »
Quote from: "princec"
'srite. You just pass it into GLContext.useContext(mySWTcanvas) - and then all LWJGL GL calls will be on your SWT canvas!

Make sure you're in the same thread as the thread that created the SWT context though.

Cas :)


OK Cas...I'm gonna do that. With this new context stuff my job is even simpler  :wink:
Thank you a lot for this brand new version  :D

SWT
« Reply #9 on: April 01, 2004, 22:41:55 »
Quote from: "fbi"

Lemme know about it...  :wink:
I'm gonna try something like this too...so could share same ideas and code someday if you like it  :)


No problem fbi ;)
I'm developing a 3d scene editor (with keyframe animation and the lot) for an academic project. Currently I run it using xith + jogl + swing, but I'm considering moving it to xith + jwjgl + swt. Spend the day abstracting out some of my gui classes, so I could experiment with both environments.

Haven't tried compiled your code yet, but since I've got to finish this before end of hollidays I might stick with my current setup so I don't get distracted with the amount of cool things we can play around with ;p

*

Offline fbi

  • **
  • 56
SWT
« Reply #10 on: April 02, 2004, 08:08:39 »
I understand your situation very well...I'm in academia, too.
Or to be precise I'm trying to get my PhD ended by the end of October  :D
I started to play with LWJGL when I wanted to create a new client for my PhD project (an Embodied Conversational Agent). I used Shout3D for an applet version, then I decided to create a stand-alone application so I resorted to create my own scenegraph API (just to fit my needs you know). But I needed to bind SWT to LWJGL because I wanted a SWT interface...
And so here we are  :wink:

SWT
« Reply #11 on: April 02, 2004, 12:43:25 »
[a bit off topic]

Hehe, nice :)  
But in one way is quite cool, because as a consequence you produce something which some one( in this case, the open source community) can actually benefit from. Some times I feel academic projects are really just for grades. I'm not sure how it works for PhD theses, but do they all get published somewhere so people can read? (naive guestion, sorry :p)

My is still an undergrad project (final year :shock:), but I still have to write 15,000 words for a report, which is crazy (given I haven't start it). The problem is that most of the grade seems to come from the report, while the program we write doesn't even count that much (which is quite strange). Maybe I'll have to limit the project and spend more time in the report, and hopefully I'll continue its development after exams.

I'm considering doing master. Fbi, did you start your PhD straight after university?

[\a bit off topic]

*

Offline Matzon

  • *****
  • 2242
SWT
« Reply #12 on: April 03, 2004, 20:25:02 »
tried to get the binding from http://ant1.di.uniba.it/lwjgl/LWJGL_SWT.zip - no connection ?

*

Offline fbi

  • **
  • 56
SWT
« Reply #13 on: April 05, 2004, 07:55:16 »
Sorry Matzon for the problem...the fact is that I have an Apache web server on my machine that I sometimes turn off when I have to code or develop something  :)
If you try it now it should work fine.
By the way tomorrow morning I will give you the NEW Windows version which supports not only rendering in a SWT Canvas but also the GL context sharing between multiple canvases as requested by some people  :wink:
I started coding the Linux version but as I'm not that cool X programmer   :shock:  I'm getting into a bit of trouble.
Anyway I'm trying just to use X-Windows API as long as I can because, doing so, we could use both the Motif version of SWT and especially the GTK one  :D

*

Offline fbi

  • **
  • 56
SWT
« Reply #14 on: April 05, 2004, 09:38:58 »
Another important question I would like to answer (with the help of the whole community) is about how to produce different versions.
You probably now that SWT is delivered with different jars (and native libraries of course): that basically means that there are a bit of low-level calls which are also possible from the Java side (you must use the OS class) and I actually used because this way code is a bit simpler.
But, of course, these calls vary from Window to Linux to Mac and so on...whatcha gonna do?

1) Put all the context and devices management stuff into C/C++ code.
2) Distribute different versions of LWJGL, that this time differ a bit (in just one file) also in the Java code (that is basically what people do at Eclipse.org).

Lemme know about it so that I eventually accomodate changes ASAP  :wink: