[cairo] Cairo & OpenGL: is this possible?
Chris Wilson
chris at chris-wilson.co.uk
Fri May 14 03:08:41 PDT 2010
On Fri, 14 May 2010 19:38:47 +1000, "John C. Turnbull" <ozemale at ozemail.com.au> wrote:
> I believe Cairo/OpenGL integration is experimental at the moment but I will
> outline what I would like to do and then hopefully someone can tell me if it
> is or will be possible.
>
> What I'd like to see is an application which renders using traditional
> vector graphics with the ability to "embed" 3D graphics (OpenGL) in regions
> of the surrounding 2D graphics. So what you would end up with is a kind of
> 3D panel(s) inside a 2D infrastructure.
>
> Is this kind of tight 2D/3D integration possible with Cairo and OpenGL now
> or in the foreseeable future?
Yes. The real answer will be much more complex of course as the 2D
UI surrounds rarely update with the same frequency as the foreground
content. This means that you will obviously not want to waste CPU and GPU
time re-rendering static content and will undoubtably require a complex
canvas to handle the updating elements only when required. The trivial
answer will be for the forseeable future to use render-to-texture for the
static portions, cairo-gl will ease this model by keeping it all in the GL
pipeline and be a significant enhancement over either image + upload or
xlib + tfp. How soon we get to the ultimate goal of seamlessly and
efficiently mixing Cairo, Video and 3D, I do not know. But Benjamin is
driving us hard to get there. ;-)
-ickle
--
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo
mailing list