On 23 October 2012 18:08, dimitris chloupis <[email protected]> wrote:
> Igor wanted to ask you but kept forgetting. I wanted to make my own GUI api
> for project "Ephestos" which is visual coding for pharo and 3d app Blender.
> At first NBOpenGL was a candidate , but now I also consider Athens ,
> especially if you say you want to port morphic to it.
>
Let me explain a bit about Athens:

Athens is an API for vector-based 2D graphics.
It was designed with layered architecture in mind: there is a
top-level (user) API,
and implementation , which can use one or another backend.
Like that, users can be confident that no matter what rendering backend is used,
they don't have to adapt to it, and just keep using same API for drawing.

Currently there is 2 backends: balloon (using VM plugins) and cairo
(using cairo library).

Other backends could be: OpenGL, OpenVG, Quartz(native Mac OS vector engine)
Btw cairo also provides quartz and openvg as one of its backends, so,
in short run
with some effort we can use cairo for those backends..
but in a long run it would be much better, of course, to provide
backends to use these frameworks
directly , avoiding extra wrapping layer , such as cairo.
Also, i read that Mozilla moves to a new , faster & better rendering
engine (can't remember its name),
which benefits from multicore hardware, so there's a lot of choices..

> I am certainly interested in vector based GUIs but another thing that
> interest me is GUIs with loads of animations like the ones you see in games.
> You think Athens is fast enough to be used for such busy interfaces ?

it is too early to judge how fast it is , because currently i am at
"make it work" stage,
not "make it fast".
However the benchmarking drawing full morphic desktop (all windows & morphs)
is already quite promising - they show comparable performance of balloon engine
(a bit faster , in fact, but just because i am still cannot render the
text morphs).
Cairo is faster than balloon.. but since there is many conversion(s)
happen to pass data to it
(like converting forms to cairo surfaces, converting gradients etc),
it suffers from it at bit.
But that can be mitigated by introducing caching etc.

And of course, if you going to implement own (non-morphic) UI which
using Athens, you can deal much better with these caveats.
I paying a lot of attention in Athens to make sure API does not comes
with big overhead.
It is yet to be seen, if i succeeded, because there's always some
tradeoffs, basically: how to provide a nice object-oriented API to end
users, without exposing them to nasty and muddy world of C functions
which doing real job.

> I would prefer to make my own widgets / morphs and move away from the standard
> look of windows and buttons and more make it look like GUIs you see in games
> and Sci Fi movies since the fun factor is a big goal in my project. Since
> you are experienced in this than me , what you think ?
>
> The problem with NBOpenGL is that I fear I will have a lot more work to do,
> but that is debatable. Of course you implementing morphic in Athens even
> partially makes my life a lot easier.
>

I wish to start implementing Athens backend for NBOpenGL.. but that's
only plans now.
I have no time for it.
If you maybe know, recently NVidia release an opengl extension for 2D
vector graphics,
which provides quite good API for 2D vector-based rendering.
And i checked and my Mac OS X 10.7.5 already contains that extension.

http://developer.nvidia.com/nv-path-rendering

so, the idea is not to implement all computation(s) and path(s) by
yourself using opengl,
but to bind to this functionality.
Hopefully, after couple of years , this extension will find its way to
most graphic cards/GL drivers,
not just NVidia ones.

(and if you worry about speed, this thingy is 100-1000 x faster than cairo ;)

> Another question I have is do I need Cairo installed to use Athens ? I would
> rather use something that does not require installations from the user. If
> yes is it possible to package Cairo with Pharo and Athens ?
>

The idea now is to ship VMs bundled with cairo libraries.
Because balloon backend i made is quite limited, shitty and slow and
was made mostly to develop & test Athens api (still it can be used as
a last resort, when nothing better available)).

Today i finally made cairo build successfully on windows (already did
that for Mac),
and on linux(es), cairo is already installed on system(s) by default,
so there is nothing to care about from user's perspecitve
(well, except from some minimalistic/exotic distributions, which does
not includes it).

> If anyone else want to jump and advice me, I am more than welcome it.
>

P.S. Needless to say, that i would be happy if you can join and help
developing Athens.
Or even if you decide to just use it, it will also help a lot for
finding/fixing bugs and improve quality and performance.
The Athens (like Pharo) is open-source project from its very birth,
and open for any contributions by anyone.

-- 
Best regards,
Igor Stasenko.

Reply via email to