[cairo] GL backend progress report

David Reveman c99drn at cs.umu.se
Fri Dec 5 03:52:02 PST 2003


If you're wondering how the GL backend is coming along, here is some
info.

libglxc has changed name to libglc as all GLX specific code has been
virtualized and moved to separate files. Other GL layer backends for
libglc can now be added in a straight forward way.

Transformations and repeat should now work for all surface sizes,
however transformations will produce slightly different results than
render/ic in some cases. Correct me if I'm wrong but when xrender or ic
does transformations they replace pixels outside the drawable/image as
transparent when fetching pixels from source or mask. libglc will
instead replace pixels outside the surface with nearest pixel but never
draw outside the transformed source area. This is most noticeable when
transforming small surfaces to much larger ones with bilinear filtering.
libxsvg does this when creating linear gradients, therefor gradients
will not always work correctly with the GL backend. 
This brings us to the following subject.

Cairo and gradients
Are there any plans on adding built in gradient functions to cairo?
Like: 
cairo_gradient_linear (cr, x_from, y_from, x_to, y_to, 
                       x_dst, y_dst, width, height)

cairo_gradient_radial (cr, ...)

This will allow backends to create gradients in the way which is most
effecient to them. GL backend can for example use color trapezoids and
color triangles to create linear and radial gradients. 


In the nearest future time will be spent on tackling the anti-aliasing
problem, making sure libglc works as well as possible on different
hardware and performance optimizations. As we're not experienced OpenGL
developers, don't hesitate to correct us if you see something that's
wrong in the code, or something that can be done in a better way. 

Anyone who has tried libglc with ATI's binary driver? It should support
pbuffers.

The bits can be found at http://www.cs.umu.se/~c99pnn/thesis/


/ David and Peter

-- 
David Reveman ( c99drn at cs.umu.se )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20031205/ee06f72a/attachment.pgp


More information about the cairo mailing list