[cairo] Re: How to use Cairo glitz backend in existing FLTK OpenGL window?

Jeremy L. Moles jeremy at emperorlinux.com
Wed Jul 26 06:40:14 PDT 2006


On Tue, 2006-07-25 at 16:43 -0700, Bill Spitzak wrote:
> Can glitz be told to use an existing OpenGL context, or does it insist 
> on creating it's own? Being able to use the existing current context 
> would help a lot, in fact it would make this trivial. FLTK will swap the 
> buffers for you and that is the only call that should be needed that 
> needs the window id.

I'm fairly certainly that glitz will create it's own context, and that
there are no hooks currently to let you "inject" your own. Glitz does,
however, provide wrapper functions for setting it's internal GL context
to active, so that you can use it for your own drawing.

I was going to work with glitz more and create better examples, but I
got to the point eventually where it was nearly impossible. I tried for
a good few days to get glitz to work w/ SDL, with no success. So
eventually I gave up and I've been using just the regular image backend
internally to draw on textures. Not nearly as fast as it probably could
be otherwise, but you take what you can get. :)

> Joseph Lisee wrote:
> > In article <1140450044.1907.19.camel at localhost.localdomain>,
> >  Jeremy Moles <jeremy at emperorlinux.com> wrote:
> > 
> >> Basically, the gist of this is going to be:
> >>
> >> 1. Setup up your surface how you please (bound-to-window, pbuffer,
> >> texture, etc.)
> >>
> >> 2. Create a glitz_context_t object to use as a handle to switch between
> >> the glitz OpenGL context and your OpenGL context; (glXMakeCurrent and
> >> glitz_context_make_current will be the ones here).
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
> 



More information about the cairo mailing list