[Mono-dev] idea summary: Swing in Mono?...

BGB cr88192 at hotmail.com
Sun Feb 8 01:06:03 EST 2009

----- Original Message ----- 
From: "Chris Toshok" <toshok at gmail.com>
To: "BGB" <cr88192 at hotmail.com>
Cc: "Jerry Maine" <crashfourit at gmail.com>; 
<mono-devel-list at lists.ximian.com>
Sent: Sunday, February 08, 2009 3:36 PM
Subject: Re: [Mono-dev] idea summary: Swing in Mono?...

> Not to toot our own horn here too much, but you'd probably get a lot
> more out of using an existing technology here - moonlight
> specifically.  we already have apis for posting user events (although
> the api currently uses gtk events, there's nothing stopping you from
> creating them and passing them in, and at some point in the future
> we'll likely abstract things a bit more), and we already draw to an
> offscreen pixmap that you can use as a texture.
> And all of this is likely to be far less work for you (and be far less
> distasteful for the rest of the community) as something like Swing.
> Chris

yes, this is a workable option, but there is a minor drawback:
certain operations, in particular, uploading textures (glTexImage2D), 
dumping graphics to screen (glWritePixels), getting graphics from screen 
(glReadPixels), ... all tend to be fairly expensive (far more than drawing 
native primitives in GL).

so, yes, using an offscreen pixmap for a GUI, and streaming this into GL 
would work, just it would be a little bit of a threat to the performance...

but, whatever is the case, my concern is far more about the backend, than 
the frontend.

but, whatever is the case, I am not presently using mono as such in my 
projects (a major issue being that I just can't really get it to build in 
either MinGW or Cygwin, where I would by far prefer if it worked in 
MinGW...), and so my current idea is more about things that could be bridged 
between frameworks, than about something specific to a particular framework 
(and as such, maximizing the amount that would exist as managed code is an 

granted, my framework is mostly C based and at present the only thing in the 
"managed" side only has an incomplete JVM, not-yet-written CIL VM, and is in 
general a very different project than Mono, but oh well... (my general 
thinking is that the JVM and .NET VM are close enough that it may be 
possible to engineer a VM that does both and later "gloss over the 

but, presently, it is not my intent to actually do anything as of yet, more 
I am investigating the problem in general at the moment (AKA: information 
gathering), and am as such still open to ideas and suggestions.

oddly, I can't seem to find any evidence of there being OpenGL bindings in 
mono, hmm...

More information about the Mono-devel-list mailing list