-/* $Id: s_copypix.c,v 1.1 2000/10/31 18:00:04 keithw Exp $ */
+/* $Id: s_copypix.c,v 1.2 2000/10/31 23:11:06 brianp Exp $ */
/*
* Mesa 3-D graphics library
/* If read and draw buffer are different we must do buffer switching */
saveReadAlpha = ctx->ReadBuffer->Alpha;
changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer
- || ctx->DrawBuffer != ctx->ReadBuffer;
+ || ctx->DrawBuffer != ctx->ReadBuffer;
+
+ (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
+ ctx->Pixel.DriverReadBuffer );
if (overlapping) {
GLint ssy = sy;
}
}
+ /* Restore pixel source to be the draw buffer (for blending, etc) */
+ (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
+ ctx->Color.DriverDrawBuffer );
+
if (overlapping)
FREE(tmpImage);
}
changeBuffer = ctx->Pixel.ReadBuffer != ctx->Color.DrawBuffer
|| ctx->DrawBuffer != ctx->ReadBuffer;
+ (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer,
+ ctx->Pixel.DriverReadBuffer );
+
if (overlapping) {
GLint ssy = sy;
tmpImage = (GLuint *) MALLOC(width * height * sizeof(GLuint));
}
}
+ /* Restore pixel source to be the draw buffer (for blending, etc) */
+ (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
+ ctx->Color.DriverDrawBuffer );
+
if (overlapping)
FREE(tmpImage);
}