Index: include/compiz.h =================================================================== RCS file: /cvs/xorg/app/compiz/include/compiz.h,v retrieving revision 1.26 diff -u -r1.26 compiz.h --- include/compiz.h 10 Apr 2006 22:17:28 -0000 1.26 +++ include/compiz.h 11 Apr 2006 22:08:15 -0000 @@ -879,7 +879,8 @@ CompTextureFilter filter); void -disableTexture (CompTexture *texture); +disableTexture (CompScreen *screen, + CompTexture *texture); /* screen.c */ Index: plugins/cube.c =================================================================== RCS file: /cvs/xorg/app/compiz/plugins/cube.c,v retrieving revision 1.8 diff -u -r1.8 cube.c --- plugins/cube.c 9 Apr 2006 21:14:17 -0000 1.8 +++ plugins/cube.c 11 Apr 2006 22:08:18 -0000 @@ -593,7 +593,7 @@ glEnd (); - disableTexture (&cs->sky); + disableTexture (s, &cs->sky); glEndList (); @@ -859,7 +859,7 @@ enableTexture (s, &cs->texture, COMP_TEXTURE_FILTER_GOOD); glTexCoordPointer (2, GL_FLOAT, 0, cs->tc); glDrawArrays (GL_TRIANGLE_FAN, 0, cs->nvertices >> 1); - disableTexture (&cs->texture); + disableTexture (s, &cs->texture); } else glDrawArrays (GL_TRIANGLE_FAN, 0, cs->nvertices >> 1); Index: plugins/water.c =================================================================== RCS file: /cvs/xorg/app/compiz/plugins/water.c,v retrieving revision 1.11 diff -u -r1.11 water.c --- plugins/water.c 8 Apr 2006 15:07:58 -0000 1.11 +++ plugins/water.c 11 Apr 2006 22:08:27 -0000 @@ -1222,7 +1222,7 @@ glBindTexture (ws->target, 0); (*w->screen->activeTexture) (GL_TEXTURE0_ARB); - disableTexture (texture); + disableTexture (w->screen, texture); glPopMatrix (); Index: src/display.c =================================================================== RCS file: /cvs/xorg/app/compiz/src/display.c,v retrieving revision 1.13 diff -u -r1.13 display.c --- src/display.c 10 Apr 2006 22:17:28 -0000 1.13 +++ src/display.c 11 Apr 2006 22:08:31 -0000 @@ -1187,7 +1187,7 @@ EMPTY_REGION (s->damage); - if (s->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK) + if (1) //s->damageMask & COMP_SCREEN_DAMAGE_ALL_MASK) { s->damageMask = 0; Index: src/paint.c =================================================================== RCS file: /cvs/xorg/app/compiz/src/paint.c,v retrieving revision 1.5 diff -u -r1.5 paint.c --- src/paint.c 29 Mar 2006 12:18:26 -0000 1.5 +++ src/paint.c 11 Apr 2006 22:08:33 -0000 @@ -623,7 +623,7 @@ (*w->screen->drawWindowGeometry) (w); - disableTexture (texture); + disableTexture (w->screen, texture); glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); @@ -634,7 +634,7 @@ (*w->screen->drawWindowGeometry) (w); } - disableTexture (texture); + disableTexture (w->screen, texture); glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); @@ -661,13 +661,13 @@ (*w->screen->drawWindowGeometry) (w); } - disableTexture (texture); + disableTexture (w->screen, texture); glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); w->screen->activeTexture (GL_TEXTURE0_ARB); - disableTexture (texture); + disableTexture (w->screen, texture); glColor4usv (defaultColor); screenTexEnvMode (w->screen, GL_REPLACE); @@ -719,7 +719,7 @@ (*w->screen->drawWindowGeometry) (w); } - disableTexture (texture); + disableTexture (w->screen, texture); } glPopMatrix (); @@ -857,7 +857,7 @@ glDrawArrays (GL_QUADS, 0, nBox * 4); - disableTexture (bg); + disableTexture (s, bg); } if (mask & PAINT_BACKGROUND_WITH_STENCIL_MASK) Index: src/screen.c =================================================================== RCS file: /cvs/xorg/app/compiz/src/screen.c,v retrieving revision 1.23 diff -u -r1.23 screen.c --- src/screen.c 11 Apr 2006 07:49:48 -0000 1.23 +++ src/screen.c 11 Apr 2006 22:08:35 -0000 @@ -1060,7 +1060,8 @@ XFree (visinfo); - glxExtensions = glXQueryExtensionsString (s->display->display, screenNum); + glxExtensions = glXQueryServerString (s->display->display, + screenNum, GLX_EXTENSIONS); if (!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap")) { fprintf (stderr, "%s: GLX_EXT_texture_from_pixmap is missing\n", Index: src/texture.c =================================================================== RCS file: /cvs/xorg/app/compiz/src/texture.c,v retrieving revision 1.7 diff -u -r1.7 texture.c --- src/texture.c 9 Apr 2006 18:06:44 -0000 1.7 +++ src/texture.c 11 Apr 2006 22:08:36 -0000 @@ -335,6 +335,19 @@ glEnable (texture->target); glBindTexture (texture->target, texture->name); + if (!screen->bindTexImage (screen->display->display, + texture->pixmap, + GLX_FRONT_LEFT_EXT, + NULL)) + { + fprintf (stderr, "%s: glXBindTexImage failed\n", programName); + + glXDestroyGLXPixmap (screen->display->display, texture->pixmap); + texture->pixmap = None; + + return; + } + if (filter == COMP_TEXTURE_FILTER_FAST) { if (texture->filter != GL_NEAREST) @@ -399,8 +412,14 @@ } void -disableTexture (CompTexture *texture) +disableTexture (CompScreen *screen, CompTexture *texture) { + glBindTexture (texture->target, texture->name); + + screen->releaseTexImage (screen->display->display, + texture->pixmap, + GLX_FRONT_LEFT_EXT); + glBindTexture (texture->target, 0); glDisable (texture->target); }