[cairo] Cairo & OpenGL: is this possible?
John C. Turnbull
ozemale at ozemail.com.au
Fri May 14 03:35:49 PDT 2010
Thanks for the rapid response.
That all sounds very promising although I am obviously going to need more
detail to be able to implement something along these lines as I have no
experience with Cairo yet. Do you know of any examples that do something
similar or are attempting to head toward where I am heading? Yes, my
ultimate goal is to integrate Cairo, 3D and video so I would be *very*
interested in any further information or links you could provide relating to
the work being done in this area.
From: Chris Wilson [mailto:chris at chris-wilson.co.uk]
Sent: Friday, 14 May 2010 20:09
To: John C. Turnbull; cairo at cairographics.org
Subject: Re: [cairo] Cairo & OpenGL: is this possible?
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
> outline what I would like to do and then hopefully someone can tell me if
> 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
> of the surrounding 2D graphics. So what you would end up with is a kind
> 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. ;-)
Chris Wilson, Intel Open Source Technology Centre
More information about the cairo