[Mono-dev] idea summary: Swing in Mono?...
BGB
cr88192 at hotmail.com
Sun Feb 8 02:36:08 EST 2009
----- Original Message -----
From: "Michael Hutchinson" <m.j.hutchinson at gmail.com>
To: "BGB" <cr88192 at hotmail.com>
Cc: <mono-devel-list at lists.ximian.com>
Sent: Sunday, February 08, 2009 4:48 PM
Subject: Re: [Mono-dev] idea summary: Swing in Mono?...
> On Sun, Feb 8, 2009 at 1:06 AM, BGB <cr88192 at hotmail.com> wrote:
>> 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...
>
> You can accelerate the rendering using the GPU:
> http://www.ogre3d.org/forums/viewtopic.php?t=46348
>
yes, that works...
of course, pure GL would be preferable to Ogre IMO, as GL is good, but a
necessary Ogre dependency is not as good (of course, Ogre support could be
good for those inclined to use Ogre...).
but, yes, GTK# -> GTK+ -> Cairo -> OpenGL, will probably have to work...
raw drawing polygons is fast, only pixmaps are not so fast.
as for whatever reason, getting graphical data to/from the video card is a
bit of a bottleneck, which makes some tasks, such as recording video off the
card, or streaming multiple video streams into a GL app (or, at least,
absent using low-res video), tasks that are difficult to pull off without
killing the framerate...
(I guess, if really needed, a far lighter-weight GL-based widget API could
be created, eventually, but if everything else works this would be more
supplementary than mandatory...).
but, yes, all this is new, but then again I haven't really used GTK and
friends since maybe about 2003 or so, and so it seems a lot is going on with
the internals... (I don't do that much conventional GUI-coding, or even make
all that intensive use of my own GUI stuff, apart from maybe context menus
and other trivial stuff... most of my UIs being operated primarily via a
console, keyboard shortcuts, and mouse actions... but, alas, I did go and
make my widgets go and look more-or-less Windows-ish a few years back, which
is in contrast to the 2003/2004 timeframe where my widgets more tended more
to resemble colored boxes...).
GUI widgets are also fairly useful for whenever they are useful, like when
one needs to enter a value for a property, or summon a help-dialog, ... but
to a large degree I use context menus (like in GIMP, or Maya...).
and, in the years, I never did implement truetype font support (I just use
bitmapped fonts which are rendered to textures, me noticing in the past that
good old trilinear filtering does an at least tolerable job at scaling
them...). (I do feel slightly paranoid though about GL's performance though
if used for rendering lots of text with vector-based fonts... so, at least I
know that bitmapped fonts go fast... though granted one could render
vector-fonts into textures and use these much like bitmapped fonts...).
> <snip>
>> oddly, I can't seem to find any evidence of there being OpenGL bindings
>> in
>> mono, hmm...
>
> There are two available that I'm aware of: Tao and OpenTK.
>
yes, good to know...
they were just not showing up with my use of 'find' and 'grep'...
or such...
> --
> Michael Hutchinson
> http://mjhutchinson.com
>
More information about the Mono-devel-list
mailing list