summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@JOEL-UBUNTU.(none)>2007-11-05 17:59:56 +0900
committerJoel Bosveld <joel@JOEL-UBUNTU.(none)>2007-11-05 17:59:56 +0900
commit32b96b008694eed7710c4306b99160504b28837e (patch)
tree633b480cd6164078fd01d2e580f71b09ede6cea5
parent3080663a8dfc3ef9bdf55abe4c8c79ff07fd6558 (diff)
downloadphotowheel-32b96b008694eed7710c4306b99160504b28837e.tar.gz
photowheel-32b96b008694eed7710c4306b99160504b28837e.tar.bz2
Caps can now be transparent
Changed blending mode to allow transparent caps. Also, fixed an error in the code, which drew top cap with B and A value for bottom cap.
-rw-r--r--photo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/photo.c b/photo.c
index 1b6e4e9..469be26 100644
--- a/photo.c
+++ b/photo.c
@@ -156,7 +156,7 @@ photoCapChange (CompScreen *s,
glNewList (gs->dList, GL_COMPILE);
glBegin(GL_POLYGON);
- glColor4us(top[0],top[1],bot[2],bot[3]);
+ glColor4us(top[0],top[1],top[2],top[3]);
for(i=gs->n-1;i>-1;i--)
{
@@ -291,7 +291,8 @@ photoPaintInside (CompScreen *s,
glEnable (GL_BLEND);
-
+ glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
enabled = glIsEnabled (GL_CULL_FACE);
if(gs->enablecull)glEnable(GL_CULL_FACE);