[cairo] new pattern interface and OpenGL patch

David Reveman c99drn at cs.umu.se
Thu Mar 25 12:40:13 PST 2004


I thought of another solution to the 'cairo_gl_surface_create' problem:

A simple:
cairo_set_target_glc (glc_surface_t *surface);

that's all, nothing more. =)

This way the user have full control over the format and the creation
of the glc_surface_t. Cairo will be unaware of the used OpenGL
implementation and will only need one OpenGL backend; an OpenGL backend
that can render to glc surfaces.

This would make a whole bunch of problems disappear.
cairo_gl_surface_show and cairo_gl_surface_realize would not be needed.
If I add a WGL (Windows GL) backend to libglc, not a single line of code
in cairo would have to be changed for OpenGL rendering in Windows.

I like this solution, it would make things a lot simpler for cairo. The
disadvantage is of course that the user needs to know about libglc.

- David

-- 
David Reveman <c99drn at cs.umu.se>





More information about the cairo mailing list