wedding OpenGL with cairo
Without being in the midst of guadec anymore and finally able to concentrate again, I have fixed the example-hack I started in Vilanova, which was intended to show how one could go about using animated cairo-graphics as a source for dynamic texture-mapping in OpenGL. I also tried to use the new compositing-query function - gtk_widget_is_composited() - in gtk+ 2.10.x, but it turned out to be broken. At least it does not return true if I run under Xgl/compiz or Xorg/xcompmgr. The same error occurs with gtk+/tests/testgtk.c. Is this maybe a shortcoming of the used X11-server? Against which project should I file a bug now?
The presented hack, cleverly called gl-cairo-cube (although not really a cube), does not use the glitz-backend for cairo on purpose… for the moment. Just in case you wonder why your cpu is being hit hard during runtime. From now on I will put my examples, hacks and programs at my cozy spot at people.freedesktop.org. Over time I will move more and more of my stuff there. You can grab the current hack via…
git clone http://people.freedesktop.org/~macslow/gl-cairo-cube.git
If you are not running under a composited environment you will not see the nice transparency like shown in these screencasts, but get the typical black square in the background…

(click to play back, ogg/theora, ~2.9 MBytes)

July 6th, 2006 at 12:17 am
Damn, this is man something very sexy
Looks promising… I can imagine lot of applications who could take very big use of this.
July 6th, 2006 at 1:52 am
Against which project should I file a bug now?
Against both xcompmgr and compiz; the gtk+ implementation relies on a new hint introduced to the EWMH (see http://mail.gnome.org/archives/gtk-devel-list/2006-April/msg00117.html and http://mail.gnome.org/archives/wm-spec-list/2006-April/msg00004.html) which compositing managers should support. compiz will probably add it shortly; at the metacity/compiz small discussion group at GUADEC the new EWMH hints for compositing were brought up and David said he would add them to compiz soon.
July 26th, 2006 at 10:36 pm
The latest git compiz version has the new hint support. This also makes the latest gnome-terminal work with the real transparency stuff using compiz
August 16th, 2006 at 9:01 am
@ FunkyM: I’m running the newest compiz now. I also have a local install of gtk+-2.10.x and have made the upcoming version of cairo-clock 0.4.0 adapt to those new features (gdk_is_screen_composited). I’ll also update my slew of little demo-programs at http://people.freedesktop.org/~macslow to this when I find the time.
December 20th, 2006 at 12:05 pm
Hi, I am in big trouble getting git to work. Can you please send sources as gziped tarball? Thank you.. I want to try it on AIGLX & Beryl
January 2nd, 2007 at 10:52 pm
@ Dux: Automatically generated tarballs are available now at http://people.freedesktop.org/~macslow