summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_pointtemp.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-11-09 21:26:41 +0000
committerBrian Paul <[email protected]>2002-11-09 21:26:41 +0000
commite307931314f1145305ac2946f13f5e2f020313ec (patch)
tree7c7f9f4d979438dd8eada3c6bfc71fb2cc026bdb /src/mesa/swrast/s_pointtemp.h
parent2dee6187e45ce98b0f3c563a2cbc823bb7340e6c (diff)
fix one-bit error in float->int Z calculation
Diffstat (limited to 'src/mesa/swrast/s_pointtemp.h')
-rw-r--r--src/mesa/swrast/s_pointtemp.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index 405e1f49243..f7bd1240b15 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -1,8 +1,8 @@
-/* $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.
*
@@ -153,7 +153,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
{{
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 */
@@ -359,7 +359,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
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;
}}