From 4be6c0f04b9ba81dba144b45f92ab807e141755f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 23 Aug 2003 21:40:21 +0000 Subject: glDrawPixels(GL_DEPTH_COMPONENT) with glPixelZoom didn't work --- src/mesa/swrast/s_drawpix.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/mesa/swrast/s_drawpix.c') diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 008b60dcff..ab33d61b57 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -627,7 +627,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, GLenum type, const GLvoid *pixels ) { const GLboolean bias_or_scale = ctx->Pixel.DepthBias!=0.0 || ctx->Pixel.DepthScale!=1.0; - const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0; + const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0; const GLint desty = y; struct sw_span span; @@ -720,19 +720,13 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, span.array->z[i] = (GLdepth) (floatSpan[i] * zs + 0.5F); } } - if (ctx->Visual.rgbMode) { - if (zoom) { - _swrast_write_zoomed_rgba_span(ctx, &span, - (const GLchan (*)[4]) span.array->rgba, - desty, skipPixels); - } - else - _swrast_write_rgba_span(ctx, &span); + if (zoom) { + _swrast_write_zoomed_depth_span(ctx, &span, desty, skipPixels); + } + else if (ctx->Visual.rgbMode) { + _swrast_write_rgba_span(ctx, &span); } else { - if (zoom) - _swrast_write_zoomed_index_span(ctx, &span, desty, 0); - else _swrast_write_index_span(ctx, &span); } } -- cgit v1.2.3