For various reasons, I’ve been playing with Clutter over the past week. Rather than the 1.0 release that was announced a little while ago, I’m still on 0.8 – for a number of reasons, but mainly because 1.0 isn’t really available in any distro yet, and because the various language bindings are not yet up to date. LWN has a pretty decent write-up of the 1.0 release (subscriber only for the next week).
Let me talk about the negative things about Clutter first. Here are my main problems with it:
- documentation for the bindings isn’t great. I haven’t looked at the C++ stuff, which I have a suspicion might be good, but information for pyclutter and Clutter# is extremely hard to find. For the project I’m doing, I’ve ended up writing it in C – I would have much preferred to use C#, Python or Perl in preference. Ho hum.
- it’s not great on non-accelerated hardware. No, scratch that – it’s terrible. My machine has a decent Radeon, but because I’m using the free software driver I don’t get 3D. Clutter therefore sucks big-time. For the project I’m working on, this showed up quite early on: I couldn’t get animations to work. I would run the animation, but nothing would happen. Turned out that because I had something else going on, it wasn’t getting enough screen update time and was basically just freezing rather than dropping frame rate. I’ve changed things around to deal with this, but you absolutely need 3D acceleration for Clutter.
However, all that said, I’m extremely impressed by Clutter. The API is pretty simple: I haven’t coded using it before, and I think I learned it in about four hours. Obviously, you need to have some kind of understanding of what a scene graph is, and some of Clutter’s terminology is confusing – for me, Alpha was the worst as every time I saw it crop up I assumed it was something to do with opacity. A better name would have been ValueTimeRelationship or something – it’s just a function which computes a value between 0 and 1 given a time parameter t.
What I really like is ClutterScript – again, awful name, because it’s not a script in the programmatic sense – the ability to define parts of the user interface in an external JSON file, bring it in and play with it. It’s quite basic (there are lots of things that I’d like to do that you just can’t do, although some of it is hackable) but a big timesaver, especially in C.
It does seem to me that Clutter and Gtk need to get it together somehow. I suppose if they continue to work together relatively well it’s not too much of an issue, but I think the Clutter bits really ought to be built into the toolkit, or the other way around: there are still substantial gaps between the tool (like accessibility, as mentioned in the LWN article). But it has intrigued me about GNOME 3. I’ve seen gnome-shell and bits of Mutter, but I can see how this could be extremely compelling.
I just wonder how it’s going to work with my video card.