use IROUND to convert depth values from float to int (bug 690728)
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 21 Feb 2003 21:00:20 +0000 (21:00 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 21 Feb 2003 21:00:20 +0000 (21:00 +0000)
src/mesa/swrast/s_aalinetemp.h
src/mesa/swrast/s_aatritemp.h

index 4fffd0423ed9a9f8221d1e6d62e980002b81cf43..529da481103fdfcbcd4af774d065d88b6cd0a0ba 100644 (file)
@@ -1,10 +1,10 @@
-/* $Id: s_aalinetemp.h,v 1.21 2002/08/07 00:45:07 brianp Exp $ */
+/* $Id: s_aalinetemp.h,v 1.22 2003/02/21 21:00:27 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  4.1
+ * Version:  5.1
  *
- * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2003  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"),
@@ -54,7 +54,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
     * solving the plane equations at (ix,iy).
     */
 #ifdef DO_Z
-   line->span.array->z[i] = (GLdepth) solve_plane(fx, fy, line->zPlane);
+   line->span.array->z[i] = (GLdepth) IROUND(solve_plane(fx, fy, line->zPlane));
 #endif
 #ifdef DO_FOG
    line->span.array->fog[i] = solve_plane(fx, fy, line->fPlane);
index b5d82a615c122fb983a417dd72bf21d49a79c404..1b4df7537195a178500a74c49608a7e9e3b5d8d9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: s_aatritemp.h,v 1.34 2003/01/28 00:14:32 brianp Exp $ */
+/* $Id: s_aatritemp.h,v 1.35 2003/02/21 21:00:20 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
             array->coverage[count] = coverage;
 #endif
 #ifdef DO_Z
-            array->z[count] = (GLdepth) solve_plane(cx, cy, zPlane);
+            array->z[count] = (GLdepth) IROUND(solve_plane(cx, cy, zPlane));
 #endif
 #ifdef DO_FOG
            array->fog[count] = solve_plane(cx, cy, fogPlane);
             array->coverage[ix] = coverage;
 #endif
 #ifdef DO_Z
-            array->z[ix] = (GLdepth) solve_plane(cx, cy, zPlane);
+            array->z[ix] = (GLdepth) IROUND(solve_plane(cx, cy, zPlane));
 #endif
 #ifdef DO_FOG
             array->fog[ix] = solve_plane(cx, cy, fogPlane);