From 8c2f6c5059a60d845716277973c826f4069926e6 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 26 Jun 2001 01:32:48 +0000 Subject: added GL_IBM_rasterpos_clip extension --- src/mesa/main/drawpix.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/drawpix.c') diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 963eb06b44..7d29257c49 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); } -- cgit v1.2.3