summaryrefslogtreecommitdiff
path: root/3d.c
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-01-27 20:36:43 +0100
committerDennis kasprzyk <onestone@opencompositing.org>2008-01-27 20:36:43 +0100
commitc1fa7516723c5b26bf5cdf80332099cc10c2b71d (patch)
tree5dabfe01b6f9d109524f8552246ab570d6fed6ec /3d.c
parentb2c357df90bc6f9f0acafdfd57b5109688114c70 (diff)
download3d-c1fa7516723c5b26bf5cdf80332099cc10c2b71d.tar.gz
3d-c1fa7516723c5b26bf5cdf80332099cc10c2b71d.tar.bz2
Cleanups.
Diffstat (limited to '3d.c')
-rw-r--r--3d.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/3d.c b/3d.c
index ec3532b..0ea3a65 100644
--- a/3d.c
+++ b/3d.c
@@ -228,12 +228,13 @@ tdPaintWindowWithDepth (CompWindow *w,
Region region,
unsigned int mask)
{
- Bool wasCulled;
- Bool status;
- int wx, wy, ww, wh;
- int bevel, cull;
- CompScreen *s = w->screen;
- CompVector point, tPoint;
+ Bool wasCulled;
+ Bool status;
+ int wx, wy, ww, wh;
+ int bevel, cull, temp;
+ CompScreen *s = w->screen;
+ CompVector point, tPoint;
+ unsigned short *c;
TD_SCREEN (s);
@@ -279,20 +280,22 @@ tdPaintWindowWithDepth (CompWindow *w,
glDisable (GL_CULL_FACE);
glEnable (GL_BLEND);
- glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glBegin (GL_QUADS);
- unsigned short *c;
+ glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
if (w->id == s->display->activeWindow)
c = tdGetWidthColor(s);
else
c = tdGetWidthColorInactive(s);
- int temp = c[3] * w->paint.opacity;
+
+ temp = c[3] * w->paint.opacity;
temp /= 0xffff;
glColor4us(c[0],c[1],c[2],temp);
point.z = 0.0f;
point.w = 1.0f;
+ glBegin (GL_QUADS);
+
/* Top */
ADDQUAD (wx + DOBEVEL (Topleft), wy + 0.01,
wx + ww - DOBEVEL (Topright), wy + 0.01);
@@ -360,9 +363,10 @@ tdPaintWindowWithDepth (CompWindow *w,
wx + ww, wy + bevel,
&tds->bTransform, transform);
}
- glColor4usv (defaultColor);
- glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glEnd ();
+
+ glColor4usv (defaultColor);
+ glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glPopMatrix ();
if (tdw->ftb)