summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 963eb06b44d..7d29257c497 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.54 2001/06/18 17:26:08 brianp Exp $ */
+/* $Id: drawpix.c,v 1.55 2001/06/26 01:32:48 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -64,9 +64,13 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
_mesa_update_state(ctx);
}
+#if 1
x = IROUND(ctx->Current.RasterPos[0]);
y = IROUND(ctx->Current.RasterPos[1]);
-
+#else
+ x = IFLOOR(ctx->Current.RasterPos[0]);
+ y = IFLOOR(ctx->Current.RasterPos[1]);
+#endif
ctx->OcclusionResult = GL_TRUE;
ctx->Driver.DrawPixels(ctx, x, y, width, height, format, type,
&ctx->Unpack, pixels);
@@ -142,9 +146,13 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
if (!ctx->Current.RasterPosValid) {
return;
}
+#if 1
destx = IROUND(ctx->Current.RasterPos[0]);
desty = IROUND(ctx->Current.RasterPos[1]);
-
+#else
+ destx = IFLOOR(ctx->Current.RasterPos[0]);
+ desty = IFLOOR(ctx->Current.RasterPos[1]);
+#endif
ctx->OcclusionResult = GL_TRUE;
ctx->Driver.CopyPixels( ctx, srcx, srcy, width, height, destx, desty,
@@ -187,9 +195,13 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
if (ctx->RenderMode==GL_RENDER) {
if (bitmap) {
+#if 0
GLint x = (GLint) ( (ctx->Current.RasterPos[0] - xorig) + 0.0F );
GLint y = (GLint) ( (ctx->Current.RasterPos[1] - yorig) + 0.0F );
-
+#else
+ GLint x = IFLOOR(ctx->Current.RasterPos[0] - xorig);
+ GLint y = IFLOOR(ctx->Current.RasterPos[1] - yorig);
+#endif
if (ctx->NewState) {
_mesa_update_state(ctx);
}