porting pulpcore to swt

15 views
Skip to first unread message

Carlo Salinari

unread,
May 23, 2011, 10:26:55 AM5/23/11
to PulpCore
Hi,

I'd like to use pulpcore in my swt-based application (not a game). How
much work do you think would be necessary to have the graphics parts
(scenegraph, sprites) run under swt?

Which classes should be ported?

Cheers,
Carlo

Ryan How

unread,
May 23, 2011, 10:36:24 AM5/23/11
to pulp...@googlegroups.com
Hi,

I'm not one of the developers or anything, but I copied what I saw in
the pulpcore player to get it running in a Swing window. You could
probably just embed the Swing canvas into swt ?. If that is a suitable
solution for you...

Cheers, Ryan

Carlo Salinari

unread,
May 23, 2011, 11:50:36 AM5/23/11
to pulp...@googlegroups.com
On 5/23/2011 4:36 PM, Ryan How wrote:
> Hi,
>
> I'm not one of the developers or anything, but I copied what I saw in
> the pulpcore player to get it running in a Swing window. You could
> probably just embed the Swing canvas into swt ?. If that is a suitable
> solution for you...
>
> Cheers, Ryan

Thanks for your reply Ryan.

I know of the swt-awt bridge, but I'd rather not have dependencies on
java.awt.

Besides, looking at the code, it seems it was written avoiding jvm
graphichs dependencies as much as possible.

So I thought it should be relatively easy to port it to swt (in the end,
it should be a matter of providing a way to display a raster image on
the desired platform).

A little guidance from the developers would be greatly appreciated!

Carlo

Seth Hetu

unread,
May 24, 2011, 5:20:39 AM5/24/11
to pulp...@googlegroups.com
Just out of curiosity, why do you want to avoid a dependency on AWT?
AWT's in the standard library, so it won't increase your application's
size or decrease its portability.

That said, I'd avoid SWT-AWT Bridge because it is currently (last time
I checked) Windows-only.

-->Seth

> --
> You received this message because you are subscribed to the Google Groups "PulpCore" group.
> To post to this group, send email to pulp...@googlegroups.com.
> To unsubscribe from this group, send email to pulpcore+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pulpcore?hl=en.
>
>

Carlo Salinari

unread,
May 24, 2011, 8:56:38 AM5/24/11
to pulp...@googlegroups.com
On 5/24/2011 11:20 AM, Seth Hetu wrote:
> Just out of curiosity, why do you want to avoid a dependency on AWT?
> AWT's in the standard library, so it won't increase your application's
> size or decrease its portability.
>
> That said, I'd avoid SWT-AWT Bridge because it is currently (last time
> I checked) Windows-only.

There are a couple of reasons.

First there are fast-growing mobile platforms with non-standard java
implementations (think Android). My guess is that it won't take long
before we see an swt for Android port, and when it happens, I don't want
to be left out of the game because of awt dependencies.

Second, there's this thing called RAP (http://www.eclipse.org/rap/) that
lets you run your swt app as an ajax web-app without modifying the code.
Again: I'm not using it right now, but I like to keep the option open,
and awt surely wouldn't play nice with it.

Third, as you noted, the hole swt-awt bridge is a bit of a kludge, and I
can't have a fundamental aspect of my application rely on it.

Regards,
Carlo

Reply all
Reply to author
Forward
0 new messages