summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/cube.c
diff options
context:
space:
mode:
authorkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-09 23:55:52 +0000
committerkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-09 23:55:52 +0000
commitc9133bcb07d0d569a9d11ea71f63f126bac4b960 (patch)
tree3831abcb8303d6e7246d1da96269d4ef82f3fe60 /beryl-plugins/src/cube.c
parenteaa3877ff1b9b41a1919a0e9c506820b00d2f3c9 (diff)
downloadmarex-dev-c9133bcb07d0d569a9d11ea71f63f126bac4b960.tar.gz
marex-dev-c9133bcb07d0d569a9d11ea71f63f126bac4b960.tar.bz2
cube: Solve a minor issue where cube caps wouldn't be drawn transparent
with lighting disabled. git-svn-id: file:///beryl/trunk@3891 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/cube.c')
-rw-r--r--beryl-plugins/src/cube.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/beryl-plugins/src/cube.c b/beryl-plugins/src/cube.c
index 31ba10d..44e9bae 100644
--- a/beryl-plugins/src/cube.c
+++ b/beryl-plugins/src/cube.c
@@ -1963,7 +1963,7 @@ cubeDrawCubeCap(CompScreen * s, int hsize, int arrayOffset,
glColor4us(cs->color[0], cs->color[1], cs->color[2],
opacity);
glDrawArrays(GL_TRIANGLE_FAN, arrayOffset, cs->nvertices >> 1);
- /*if (cubeCap && cubeCap->texture.name && s->hsize == 4)
+ /* if (cubeCap && cubeCap->texture.name && s->hsize == 4)
{
if (opacity != OPAQUE)
{
@@ -1980,10 +1980,9 @@ cubeDrawCubeCap(CompScreen * s, int hsize, int arrayOffset,
disableTexture(s, &cubeCap->texture);
screenTexEnvMode(s, GL_REPLACE);
- }*/
- if (cubeCap && cubeCap->texture.name)
+ }
+ else */if (cubeCap && cubeCap->texture.name)
{
- //screenTexEnvMode(s, GL_REPLACE);
enableTexture(s, &cubeCap->texture, COMP_TEXTURE_FILTER_GOOD);
int centerx = *cs->vertices;
@@ -1994,6 +1993,7 @@ cubeDrawCubeCap(CompScreen * s, int hsize, int arrayOffset,
if (opacity != OPAQUE)
{
glColor4us(0xffff, 0xffff, 0xffff, opacity);
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
GLfloat x1,y1,x2,y2;
x1 = cubeCap->tc[4];