summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/blurfx.c
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-09 23:18:29 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-09 23:18:29 +0000
commit31edb85960a6e065b9a27171c9df8a51361c0aba (patch)
tree063b3c2793482ef35e62401971a1a05a59d4c27b /beryl-plugins/src/blurfx.c
parent28e809883725c466e3e8bd60585be8b88066cea3 (diff)
downloadmarex-dev-31edb85960a6e065b9a27171c9df8a51361c0aba.tar.gz
marex-dev-31edb85960a6e065b9a27171c9df8a51361c0aba.tar.bz2
maybe a fix for the stencil problem
git-svn-id: file:///beryl/trunk@573 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/blurfx.c')
-rw-r--r--beryl-plugins/src/blurfx.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/beryl-plugins/src/blurfx.c b/beryl-plugins/src/blurfx.c
index 20781d9..a224595 100644
--- a/beryl-plugins/src/blurfx.c
+++ b/beryl-plugins/src/blurfx.c
@@ -1755,9 +1755,14 @@ blurfxDrawWindowTexture (CompWindow * w, CompTexture * texture,
// draw blur
if (blur_enabled)
{
+ Bool enable_stencil = FALSE;
if (useFbo)
{
-
+ if (glIsEnabled( GL_STENCIL_TEST))
+ {
+ glDisable(GL_STENCIL_TEST);
+ enable_stencil = TRUE;
+ }
s->framebufferRenderbuffer (GL_FRAMEBUFFER_EXT,
GL_DEPTH_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, 0);
@@ -1800,6 +1805,8 @@ blurfxDrawWindowTexture (CompWindow * w, CompTexture * texture,
s->framebufferRenderbuffer (GL_FRAMEBUFFER_EXT,
GL_STENCIL_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, bs->rb);
+ if (enable_stencil)
+ glEnable( GL_STENCIL_TEST);
}
else
{
@@ -4433,9 +4440,9 @@ loadPngToTexture2D (BlurfxScreen * bs, BlurTexture * tex, char *filename)
GLERR;
- if (stat (filename, &fInfo) ||
- !S_ISREG (fInfo.st_mode) ||
- S_ISDIR (fInfo.st_mode) ||
+ if (stat (filename, &fInfo) ||
+ !S_ISREG (fInfo.st_mode) ||
+ S_ISDIR (fInfo.st_mode) ||
access (filename, F_OK) != 0)
{
fprintf (stderr, "Unable to read image \"%s\" \n", filename);