-/* $Id: s_linetemp.h,v 1.13 2002/03/19 15:22:50 brianp Exp $ */
+/* $Id: s_linetemp.h,v 1.14 2002/11/09 21:26:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.0
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
/*
printf("%s():\n", __FUNCTION__);
- printf(" (%f, %f) -> (%f, %f)\n",
- vert0->win[0], vert0->win[1], vert1->win[0], vert1->win[1]);
+ printf(" (%f, %f, %f) -> (%f, %f, %f)\n",
+ vert0->win[0], vert0->win[1], vert0->win[2],
+ vert1->win[0], vert1->win[1], vert1->win[2]);
printf(" (%d, %d, %d) -> (%d, %d, %d)\n",
vert0->color[0], vert0->color[1], vert0->color[2],
vert1->color[0], vert1->color[1], vert1->color[2]);
zPtr = (DEPTH_TYPE *) _mesa_zbuffer_address(ctx, x0, y0);
# endif
if (depthBits <= 16) {
- z0 = FloatToFixed(vert0->win[2]);
- z1 = FloatToFixed(vert1->win[2]);
+ z0 = FloatToFixed(vert0->win[2]) + FIXED_HALF;
+ z1 = FloatToFixed(vert1->win[2]) + FIXED_HALF;
}
else {
z0 = (int) vert0->win[2];
-/* $Id: s_pointtemp.h,v 1.20 2002/10/18 17:02:01 kschultz Exp $ */
+/* $Id: s_pointtemp.h,v 1.21 2002/11/09 21:26:41 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.0
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
{{
GLint x, y;
const GLfloat radius = 0.5F * size;
- const GLint z = (GLint) (vert->win[2]);
+ const GLint z = (GLint) (vert->win[2] + 0.5F);
GLuint count;
#if FLAGS & SMOOTH
const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
span->array->x[count] = (GLint) vert->win[0];
span->array->y[count] = (GLint) vert->win[1];
- span->array->z[count] = (GLint) vert->win[2];
+ span->array->z[count] = (GLint) (vert->win[2] + 0.5F);
span->end = count + 1;
}}