[compiz] [PATCH] Always use mipmaps in cube plugin

Bartosz Taudul wolf.pld at gmail.com
Tue Jun 26 16:35:08 PDT 2007


Currently, the cube plugin uses mipmapping only when cube is unfolded.
When the cube is rotated, mipmaps are not used, which leads to ugly look
of textures.

The attached patch fixes this. This leads to another kind of artifacts,
which are fixable with anisotropic filtering.

http://team.pld-linux.org/~wolf/aniso.png
The leftmost image is the current state of cube plugin. The center image
is with mipmaps enabled. The rightmost is with mipmaps and anisotropic
filtering.

wolf
-- 
  Bartek   .  
  Taudul   :  
          .:....................................................................
w o l f @ p l d - l i n u x . o r g            .:. http://wolf.valkyrie.one.pl/
-------------- next part --------------
diff -ruN compiz./plugins/cube.c compiz/plugins/cube.c
--- compiz./plugins/cube.c	2007-06-27 00:25:32.000000000 +0200
+++ compiz/plugins/cube.c	2007-06-27 01:21:28.016740889 +0200
@@ -1434,7 +1434,7 @@
 
     xMove = cs->xRotations;
 
-    if (cs->grabIndex && cs->opt[CUBE_SCREEN_OPTION_MIPMAP].value.b)
+    if (cs->opt[CUBE_SCREEN_OPTION_MIPMAP].value.b)
 	s->display->textureFilter = GL_LINEAR_MIPMAP_LINEAR;
 
     if (cs->invert == 1)


More information about the compiz mailing list