A while ago I published a video showing WebKit rendering as an OpenSceneGraph texture. I’m now publishing the source code in case someone wants to take a look at it: osgGTK and osgWebKit demo.
There are two examples in the code. The first one shows how to implement a GTK+ viewer for OpenSceneGraph using the C++ version of GtkGLExt. The second builds on this to show a modified osgterrain demo with a WebKit-rendered page instead of the terrain texture. To compile this code you’ll need to patch WebKit to support off-screen cairo rendering, you can get the patch at the OpendedHand bugzilla.
As most of the demo code I’ve been publishing lately, it’s more of a proof-of-concept than working code, so handle with care.
Thanks a lot for sharing,
May I ask on which revision of webkit svn does your patched patch apply ?
Thanks in advance.
The patch is not directly for webkit, it’s for the clutter-webkit project at http://svn.o-hand.com/view/clutter/trunk/clutter-webkit/ . Patching it produces the real patch for webkit svn r31042.
This is all a little outdated now, as clutter-webkit has grown from a patch to a real port, which you can find at git://git.o-hand.com/webkit .
Also, a new solution for embedding WebKit in 3D has been presented recently at http://meta.nuanti.com/ .