Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT/OSX using X11 instead of Aqua ?
SWT/OSX using X11 instead of Aqua ? [message #459330] Fri, 05 August 2005 18:26 Go to next message
Eclipse UserFriend
Originally posted by: yarden.sci.utah.edu

Hi,

Is there away to run SWT on the Mac using the X11 presentation layer
rather then Aqua ?

Specifically, my rcp uses JOGL, which in turn requires the use of
SWT_AWT. Yet, SWT_AWT does not run on the Mac due to incompatibility
between the SWT and AWT (long story, but as far as I understand it has
to do with Cocoa/Carbon). Thus my question.... can I have SWT to run on
the Mac using the X11 interface instead... ?

thanks,

Yarden
Re: SWT/OSX using X11 instead of Aqua ? [message #459336 is a reply to message #459330] Fri, 05 August 2005 21:37 Go to previous messageGo to next message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Yarden Livnat wrote:
> Is there away to run SWT on the Mac using the X11 presentation layer
> rather then Aqua ?
>
> Specifically, my rcp uses JOGL, which in turn requires the use of
> SWT_AWT. Yet, SWT_AWT does not run on the Mac due to incompatibility
> between the SWT and AWT (long story, but as far as I understand it has
> to do with Cocoa/Carbon). Thus my question.... can I have SWT to run on
> the Mac using the X11 interface instead... ?

I have SWT/GTK+ built on my PowerBook using the GTK+ that's in fink,
although I'm not sure if it would actually help with the JOGL thing,
since you'd need it to use GLX instead of AGL, no?

There are some SWT/GL bindings I was looking at finishing. Doing an
AGL layer there is easy. The problem with JOGL I think is that all of
their GL bindings are tied to an AWT widget at some level. LWJGL's
binding is nicer since they just have static methods for each GL call,
so you can do all of the OpenGL context management with SWT and then
just use their binding. Maybe I'm misunderstanding JOGL though.

-Billy
Re: SWT/OSX using X11 instead of Aqua ? [message #459339 is a reply to message #459336] Sat, 06 August 2005 01:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yarden.mac.com

Billy Biggs <bbiggs@ca.ibm.com> wrote:

> Yarden Livnat wrote:
> > Is there away to run SWT on the Mac using the X11 presentation layer
> > rather then Aqua ?
> >
> > Specifically, my rcp uses JOGL, which in turn requires the use of
> > SWT_AWT. Yet, SWT_AWT does not run on the Mac due to incompatibility
> > between the SWT and AWT (long story, but as far as I understand it has
> > to do with Cocoa/Carbon). Thus my question.... can I have SWT to run on
> > the Mac using the X11 interface instead... ?
>
> I have SWT/GTK+ built on my PowerBook using the GTK+ that's in fink,

I'm glad to hear that. What did you have to do to get SWT/GTK+ on the
mac ?

> although I'm not sure if it would actually help with the JOGL thing,
> since you'd need it to use GLX instead of AGL, no?

That could be. I haven't looked into that part yet.

> There are some SWT/GL bindings I was looking at finishing. Doing an
> AGL layer there is easy.

I think SWT/GL is OpenGL 1.1 compliant and does not support fragment and
vertex program. Also, last I checked it did not support OSX either.

> The problem with JOGL I think is that all of
> their GL bindings are tied to an AWT widget at some level.

That is correct and it is the fact that SWT and AWT do not work together
on the Mac that is the source of this problem.

> LWJGL's binding is nicer since they just have static methods for each GL call,
> so you can do all of the OpenGL context management with SWT and then
> just use their binding.

LWJGL does not support GLU :-( and I'm not sure which 1.x version of
OpenGL it supports.

> Maybe I'm misunderstanding JOGL though.

JOGL support OpenGL 2.0.... now, this is something I really like.

In short, I'll give up OSX if need be (though at home I work on my
PowerBook and this will be a very big headache) but I'd like to check
all the options... so back to my question above:

what did you do to get SWT/GTK+ on the mac ?

thanks!

Yarden
Re: SWT/OSX using X11 instead of Aqua ? [message #459343 is a reply to message #459339] Sat, 06 August 2005 16:22 Go to previous messageGo to next message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Yarden Livnat wrote:
>> I have SWT/GTK+ built on my PowerBook using the GTK+ that's in fink,
>
>
> I'm glad to hear that. What did you have to do to get SWT/GTK+ on the
> mac ?

As it may be useful to others too I wrote a web page describing it:

http://vektor.ca/eclipse/swt-gtk-darwin/

>> There are some SWT/GL bindings I was looking at finishing. Doing an
>> AGL layer there is easy.
>
> I think SWT/GL is OpenGL 1.1 compliant and does not support fragment and
> vertex program. Also, last I checked it did not support OSX either.

OSX == AGL (Apple GL), that binding should not be difficult to support.

> LWJGL does not support GLU :-( and I'm not sure which 1.x version of
> OpenGL it supports.

LWJGL supports GLU and OpenGL 2.0.

-Billy
Re: SWT/OSX using X11 instead of Aqua ? [message #459394 is a reply to message #459336] Mon, 08 August 2005 17:52 Go to previous messageGo to next message
Ivan Markov is currently offline Ivan MarkovFriend
Messages: 61
Registered: July 2009
Member
Billy,

> There are some SWT/GL bindings I was looking at finishing. Doing an
> AGL layer there is easy. The problem with JOGL I think is that all of
> their GL bindings are tied to an AWT widget at some level.

Just FYI I think they are rewriting JOGL to be JSR-231 (Java Bindings for
OpenGL) compatible.
One of the goals of this JSR, as far as I understand is to split up the GL
context management from the "pure" GL stuff, so that the binding to be
toolkit-agnostic.
JOGL is supposed to become the reference implementation of the JSR.

Probably getting early feedback on how and if SWT can work with JSR-231 will
be invaluable for the binding not to become another AWT-only thing. But you
probably know all of that already.

Cheers,
Ivan
Re: SWT/OSX using X11 instead of Aqua ? [message #459820 is a reply to message #459336] Wed, 17 August 2005 22:44 Go to previous messageGo to next message
Matthew Conway is currently offline Matthew ConwayFriend
Messages: 6
Registered: July 2009
Junior Member
On 2005-08-05 17:37:02 -0400, Billy Biggs <bbiggs@ca.ibm.com> said:

> Yarden Livnat wrote:
>> Is there away to run SWT on the Mac using the X11 presentation layer
>> rather then Aqua ?
>
> I have SWT/GTK+ built on my PowerBook using the GTK+ that's in fink,
> although I'm not sure if it would actually help with the JOGL thing,
> since you'd need it to use GLX instead of AGL, no?

Cool - what would I have to do to get eclipse to run using these bindings?

Eclipse seems to run abysmally slow on OSX, so I'd like to try these
bindings to see if they are any faster. In typical fashion, I switch
to osx just when the gtk bindings start to perform on par with win32 :)

Thanks,

Matt
Re: SWT/OSX using X11 instead of Aqua ? [message #459858 is a reply to message #459820] Thu, 18 August 2005 14:45 Go to previous messageGo to next message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Matthew Conway wrote:
>>> Is there away to run SWT on the Mac using the X11 presentation layer
>>> rather then Aqua ?
>>
>> I have SWT/GTK+ built on my PowerBook using the GTK+ that's in
>> fink, [...]
>
> Cool - what would I have to do to get eclipse to run using these bindings?

It wouldn't be too hard, I don't think, but work and it doesn't
really interest me :) You'd want to just use my SWT and run the GTK+
Eclipse. Compiling the eclipse executable should be trivial, just get
the source and recompile (platform-launcher module in CVS).

-Billy
Re: SWT/OSX using X11 instead of Aqua ? [message #459922 is a reply to message #459858] Thu, 18 August 2005 17:33 Go to previous messageGo to next message
Matthew Conway is currently offline Matthew ConwayFriend
Messages: 6
Registered: July 2009
Junior Member
On 2005-08-18 10:45:55 -0400, Billy Biggs <bbiggs@ca.ibm.com> said:

> Matthew Conway wrote:
>>>> Is there away to run SWT on the Mac using the X11 presentation layer
>>>> rather then Aqua ?
>>>
>>> I have SWT/GTK+ built on my PowerBook using the GTK+ that's in fink, [...]
>>
>> Cool - what would I have to do to get eclipse to run using these bindings?
>
> It wouldn't be too hard, I don't think, but work and it doesn't
> really interest me :) You'd want to just use my SWT and run the GTK+
> Eclipse. Compiling the eclipse executable should be trivial, just get
> the source and recompile (platform-launcher module in CVS).

Ok, that worked - I'm now running eclipse on macosx using X11/GTK
(fink) instead of carbon - definately faster. Kind of a hack, but
makes eclipse usable until the carbon port performance gets improved.

All I needed to do was fetch the eclipse-linux-3.1 distro, replace the
libs in the swt plugin, then ran eclipse using java rather than the
launcher: java -cp startup.jar org.eclipse.core.launcher.Main -os linux
-ws gtk -arch x86

Had some problems at first, but starting over with a fresh workspace
and readding my extension plugin dirs seemed to fix them. Not sure if
I need to do the core resources lib, but seems to work without it for
now, so I may if workspace refreshes seem too slow.

Only issue I'm having is that dialogs are way too big (which I can live
with), and the cycle parts (ctrl-f6 for editors) are way too small
(which I can't live with :(

Any ideas on how I can fix the second - i.e. hopefully some pref file
somewhere I can tweak so that when I ctrl-f6 I can actually see the
editor names (or even a pointer to the source that controls this and
I'll fix it that way?

Mattt
Re: SWT/OSX using X11 instead of Aqua ? [message #459931 is a reply to message #459922] Fri, 19 August 2005 04:27 Go to previous messageGo to next message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Matthew Conway wrote:
> Only issue I'm having is that dialogs are way too big (which I can live
> with), and the cycle parts (ctrl-f6 for editors) are way too small
> (which I can't live with :(
>
> Any ideas on how I can fix the second - i.e. hopefully some pref file
> somewhere I can tweak so that when I ctrl-f6 I can actually see the
> editor names (or even a pointer to the source that controls this and
> I'll fix it that way?

I tend to think that if you see some sort of behaviour like this,
it's likely something that can be reproduced under Linux in some sort of
weird situation. The weird stuff that I've seen under fink are usually
relating to the way the Mac fonts are exported to X11 (check it out --
you don't have a bold style for most fonts!!) and the DPI of the X
server. This probably explains some of the dialog sizing weirdness,
since Eclipse uses the font size for a bunch of their dialog layouts.

So -- can you just file a bug against Platform > SWT with
screenshots, and we can debug these there?

Thanks,
-Billy
Re: SWT/OSX using X11 instead of Aqua ? [message #460175 is a reply to message #459931] Mon, 22 August 2005 14:53 Go to previous message
Matthew Conway is currently offline Matthew ConwayFriend
Messages: 6
Registered: July 2009
Junior Member
On 2005-08-19 00:27:52 -0400, Billy Biggs <bbiggs@ca.ibm.com> said:

> reproduced under Linux in some sort of weird situation. The weird
> stuff that I've seen under fink are usually relating to the way the Mac
> fonts are exported to X11 (check it out -- you don't have a bold style
> for most fonts!!) and the DPI of the X server. This probably explains
> some of the dialog sizing weirdness, since Eclipse uses the font size
> for a bunch of their dialog layouts.

Anything off the top of your head that I could try to workaround the
font issue? Run a different xserver maybe?

> So -- can you just file a bug against Platform > SWT with
> screenshots, and we can debug these there?

Will do, though I'm not sure how much value it would have - I'd much
rather work be done on making swt-carbon faster =)
The bug report is at https://bugs.eclipse.org/bugs/show_bug.cgi?id=107614

Matt

p.s. I documented how I got eclipse-osx-gtk working on my blog:
http://simplygenius.com/geekblog/2005/08/22/1124720745359.ht ml
Previous Topic:How to disable TableItem
Next Topic:Minimum size for a dialog
Goto Forum:
  


Current Time: Tue Apr 23 17:05:55 GMT 2024

Powered by FUDForum. Page generated in 0.03887 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top