From: Derek Foreman Date: Mon, 2 Jun 2003 03:56:55 +0000 (+0000) Subject: bevel orama (temp test, just to see if it looks right) X-Git-Tag: gl2~2 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=5b0004f789267a734fd5604dbbeaa73f347789b1;p=dana%2Fopenbox.git bevel orama (temp test, just to see if it looks right) --- diff --git a/render2/paint.c b/render2/paint.c index ff783dc5..d1c40ff3 100644 --- a/render2/paint.c +++ b/render2/paint.c @@ -100,6 +100,47 @@ void RrPaint(struct RrSurface *sur) break; } + switch (RrPlanarBevelType(sur)) { + case RR_SUNKEN_OUTER: + glBegin(GL_LINES); + glEnd(); + break; + case RR_SUNKEN_INNER: + glBegin(GL_LINES); + glEnd(); + break; + case RR_RAISED_OUTER: + glColor4f(1.0, 1.0, 1.0, 0.25); + glBegin(GL_LINES); + glVertex2i(RrSurfaceX(sur) + 1, RrSurfaceY(sur) + 1); + glVertex2i(RrSurfaceX(sur) + 1, + RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2); + + + glVertex2i(RrSurfaceX(sur) + 1, + RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2); + glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2, + RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2); + + glColor4f(0.0, 0.0, 0.0, 0.25); + glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2, + RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2); + glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2, + RrSurfaceY(sur) + 1); + + glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2, + RrSurfaceY(sur) + 1); + glVertex2i(RrSurfaceX(sur) + 1, RrSurfaceY(sur) + 1); + glEnd(); + break; + case RR_RAISED_INNER: + glBegin(GL_LINES); + glEnd(); + break; + case RR_BEVEL_NONE: + break; + } + for (i = 0; i < sur->ntextures; ++i) RrTexturePaint(sur, &sur->texture[i]); diff --git a/render2/planar.h b/render2/planar.h index bb48aca4..755b1220 100644 --- a/render2/planar.h +++ b/render2/planar.h @@ -17,6 +17,7 @@ struct RrPlanarSurface { #define RrPlanarColorType(sur) ((sur)->data.planar.colortype) #define RrPlanarPrimaryColor(sur) ((sur)->data.planar.primary) #define RrPlanarSecondaryColor(sur) ((sur)->data.planar.secondary) +#define RrPlanarBevelType(sur) ((sur)->data.planar.bevel) void RrPlanarPaint(struct RrSurface *sur, int absx, int absy);