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

Jeremy Moles jeremy at emperorlinux.com
Mon Feb 20 07:40:44 PST 2006


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).

I'm working on writing some documentation for this process now (Reveman
helped me work through some of this and so I want to give back as much
as I can :)). I've been super-busy here at work lately, but I'll
probably have at least a small source sample done sometime this
week--although, I do need to get ready to go PyConn, so I'm not sure. :)
*grin*

On Mon, 2006-02-20 at 15:48 +0100, ml.user at op.pl wrote:
> Hello,
> 
> My name is Robert, I've used Cairo for few months. I write some
> components for complex system and I try to use Cairo as can as possible (mostly Cairo is used as SVG renderer). Since now ussage
> cairo_image_surfrace was been enough, but now I think that maybe using glitz increase performance.  
> 
> I want to use glitz backend for Cairo. I really care about that glitz
> renders to existing OpenGL window, offered by FLTK library. I'm going to use Cairo 1.0.2 with glitz 0.4.4 and FLTK 1.1.4. The operating system is Linux Debian Woody and Sarge.
> 
> I asked for help, because I haven't used glitz, I didn't find any
> tutorial neither documentation for glitz. I noticed in examples
> (cairogears, http://www.cherustone.com/cairo.cpp) that glitz create own OpenGL window.
> 
> I don't want that glitz create own OpenGL window, rather I prefer that
> glitz renders in Fl_Gl_Window created earlier by application.
> Fl_Gl_Window is the OpenGL window provided by FLTK library. I want to be able to mix Cairo + glitz rendering code with other OpenGL rendering code which nothing know about Cairo and glitz. 
> 
> Thanks for help in advance.



More information about the cairo mailing list