Cube Gears

I broke a promise, the promise to never ever implement the most useless Compiz effect in KWin: cube gears. Well I was not motivated enough to work in a productive way yesterday and thought “just have a look on how Compiz does the gears”. I looked at it and there aren’t many Compiz dependencies, it’s just painting gears. So I just took the code added it into cube and there was a gear. Kind of funny, that the most useless effect can be ported while the useful ones seem to be impossible 😉

Here the video as proof:

For those who don’t see the embedded flash: download

There are some differences to the Compiz effect: the rotation is disabled as it looks very bad. In opposite to Compiz we don’t use the depth buffer and so there can be glitches. You can see them when rotating the cube manually. Because of that I’m unsure if I will add the gears effect to 4.4. Perhaps it’s time to use depth test in KWin as well (would be useful in other effects as well – e.g. FlipSwitch and CoverSwitch).

9 Replies to “Cube Gears”

  1. Ha well you got that out of your system.

    Now how about adding a shortcut to the Window Thumbnail effect that lets you select the region of a window to overlay in the corner of the screen (instead of the entire window). You know that sounds like a lot of fun, admit it. :p

  2. We don’t use the depth test for Shift (Flip + Cover) or even IIRC cube. We just use the painters algorithm and paint stuff that goes behind first and stuff that goes in front last. Although, the depth buffer would be nice, even though it isn’t supported on some hardware.

  3. Well at least for Cube Gears you use it 🙂

    For Cube in general I think you don’t use it – same as we do

Comments are closed.