Re: canvas notes





>>
>> Any thoughts on that 3D vs. 2D thing? i.e. it seems like we want to be
>> able to mix OpenGL and Cairo at will, but it isn't clear to me what that
>> really means.
>
3d scenegraphs are still another problem. I'm not sure one wants to have
3d and 2d capabilities in the same framework. I know it's very appealing
and from an intellectual point of view, you might want to represent
every kind of objects within the same framework and deal with 2d and 3d
objects the same way.
I guess there are very good "3d canvas" like OpenInventor and the Doom
engine ;-) and developping such a canvas in GTK is far beyond a
productive and easy-to-program canvas.

On the other handl, it is very seducing to think about an underlying
canvas for the whole desktop (evas, display pdf, etc...) but that would
mean we must rewrite almost all GTK lower levels. Not very productive at
all.

But, it is still possible to think about an opengl surface as a canvas
item and let the programmer deal with objects in that surface like
he/she wants. If this surface belong to a more complex structure, then
it would be possible for the canvas to be aware of that and treat this
object in a particular way. Let me explain what I'm thinking : the
opengl surface is just a rectangle, but one would like to put other 2d
objects on this surface. Think about extra information, text and so on
over the 3d world. Then the canvas must be aware of that and compose 2d
objects with the opengl surface. If you want to apply a transformation
on that object, then the canvas must be able to pass those information
to the opengl renderer. That's a bit tricky because either the
programmer must react to events like zooming on the surface or rotating
it, or the canvas must drive this surface and be able to do the changes
by itself.

>> Kind of a similar question to is a compositing manager best done with
>> RENDER or GL as the foundation maybe...
>
It seems GL should be a good solution as 3d gpu are faster in 2d
operations than their 3d counterparts. But if RENDER uses GL then ;-)

> Why does cairo exist when everything can be done in OpenGL?

Cairo is able to deal with high-level graphics in the sense of PDF which
is not the case for OpenGL. It is mostly a 3d graphics library (with 2d
capabilities also). If you want do complex 2d graphics in OpenGL, you
must program them. It is way easier with Cairo. On the other end, GL
offers 2d capabilites which are very nice for Cairo (i.e. glitz).

> All widgets and font rendering can be done with OpenGL too.

Yes : GTK -> Cairo -> Glitz -> GL -> driver (or dri-> driver)

David





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]