diff options
Diffstat (limited to 'src/mesa/drivers/common/t_dd_vb.c')
-rw-r--r-- | src/mesa/drivers/common/t_dd_vb.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/mesa/drivers/common/t_dd_vb.c b/src/mesa/drivers/common/t_dd_vb.c index 9d5277ee010..a5a9f53ab42 100644 --- a/src/mesa/drivers/common/t_dd_vb.c +++ b/src/mesa/drivers/common/t_dd_vb.c @@ -1,19 +1,21 @@ +/* $Id: t_dd_vb.c,v 1.6 2001/03/12 00:48:44 gareth Exp $ */ + /* * Mesa 3-D graphics library * Version: 3.5 - * - * Copyright (C) 1999 Brian Paul All Rights Reserved. - * + * + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL @@ -21,8 +23,8 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * Author: - * Keith Whitwell <[email protected]> + * Authors: + * Keith Whitwell <[email protected]> */ #if (HAVE_HW_VIEWPORT) @@ -65,8 +67,8 @@ static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc ) } -void TAG(translate_vertex)(GLcontext *ctx, - const VERTEX *src, +void TAG(translate_vertex)(GLcontext *ctx, + const VERTEX *src, SWvertex *dst) { GLuint format = GET_VERTEX_FORMAT(); @@ -90,7 +92,7 @@ void TAG(translate_vertex)(GLcontext *ctx, dst->color[1] = src->tv.color.green; dst->color[2] = src->tv.color.blue; dst->color[3] = src->tv.color.alpha; - } + } else { GLfloat oow = (HAVE_HW_DIVIDE) ? 1.0 / src->v.w : src->v.w; @@ -121,10 +123,10 @@ void TAG(translate_vertex)(GLcontext *ctx, dst->specular[0] = src->v.specular.red; dst->specular[1] = src->v.specular.green; dst->specular[2] = src->v.specular.blue; - + dst->fog = src->v.color.alpha/255.0; - if (HAVE_PTEX_VERTICES && + if (HAVE_PTEX_VERTICES && ((HAVE_TEX2_VERTICES && format == PROJ_TEX3_VERTEX_FORMAT) || (format == PROJ_TEX1_VERTEX_FORMAT))) { @@ -175,7 +177,7 @@ void TAG(translate_vertex)(GLcontext *ctx, } #if 0 -static void +static void mga_translate_vertex( GLcontext *ctx, const mgaVertex *src, SWvertex *dst) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); @@ -184,7 +186,7 @@ mga_translate_vertex( GLcontext *ctx, const mgaVertex *src, SWvertex *dst) dst->win[1] = - src->v.y + mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y; dst->win[2] = src->v.z / mmesa->depth_scale; dst->win[3] = src->v.oow; - + dst->color[0] = src->v.color.red; dst->color[1] = src->v.color.green; dst->color[2] = src->v.color.blue; @@ -215,22 +217,22 @@ void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v ) if (format == TINY_VERTEX_FORMAT) { fprintf(stderr, "x %f y %f z %f\n", v->v.x, v->v.y, v->v.z); - fprintf(stderr, "r %d g %d b %d a %d\n", + fprintf(stderr, "r %d g %d b %d a %d\n", v->tv.color.red, v->tv.color.green, v->tv.color.blue, v->tv.color.alpha); - } + } else { - fprintf(stderr, "x %f y %f z %f oow %f\n", + fprintf(stderr, "x %f y %f z %f oow %f\n", v->v.x, v->v.y, v->v.z, v->v.w); - fprintf(stderr, "r %d g %d b %d a %d\n", + fprintf(stderr, "r %d g %d b %d a %d\n", v->v.color.red, v->v.color.green, v->v.color.blue, v->v.color.alpha); } - + fprintf(stderr, "\n"); } |