[cairo] glitz internal and cairo rendering model

David Reveman c99drn at cs.umu.se
Fri May 28 06:19:47 PDT 2004


On Fri, 2004-05-28 at 11:23 +0200, Stéphane Conversy wrote:
> Hi,
> 
> I am really interested in your work and have a question about it, and 
> especially about the internals:
> 
> AFAI understood it, cairo is kind of a direct-mode model of drawing. So 
> it seems to me that you can't benefit from past calculations,
> except if you save results in pixmaps, or in glitz case, textures.
> imagine i want to draw a complex geometry figure : cairo first needs to 
> tesselate it, then glitz adapt it to whatever format gl handles,
> then it is displayed. Now, say that this figure must be rendered 
> multiple times (for ex, it's an icon and I have to display it a hundred 
> times, or
> worst, it's part of a zooming interface and the user zooms in). Does 
> the rendering model implies that the tesselation occurs for each 
> drawing ?

Yes, unless you save the result in a glitz offscreen surface (pbuffer or
texture),
you'll need to let cairo do all the tesselation again.

However, I plan on trying to add a new type of surface to glitz, a kind
of retained mode rendering surface. All rendering to this type of
surface will be stored in display lists and compositing this surface
onto a "real" surface will just call the display list. When targetting
this kind of glitz surface with cairo, you'll only need to render it
once and you can then use the surface multiple times. You'll also be
able to apply transformations to these kind of surface and that will be
useful  for zooming and similar effects, however at some level of zoom
you'll probably need to let cairo re-tesselated the drawing but the
threshold for this can be handled by the application or a higher level
library.

These are just some of my ideas, I don't know if all this is actually
possible, it'll need some testing to find out.

-David





More information about the cairo mailing list