summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-11-28 22:34:46 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-11-28 22:34:46 +0000
commit7f55eb2b149a0994a526307d01388cc123868eb9 (patch)
treee7308ad654e29ea0cc7b24cf9864421b09e571a5
parent86ca491ade2322fbc652b78489cea67759bd09b8 (diff)
changed error tests for depth and stencil buffers
-rw-r--r--src/mesa/swrast/s_copypix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 1c5f58fcf0..e1ae060ee2 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -1,4 +1,4 @@
-/* $Id: s_copypix.c,v 1.6 2000/11/28 08:03:22 joukj Exp $ */
+/* $Id: s_copypix.c,v 1.7 2000/11/28 22:34:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -650,7 +650,7 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
GLint overlapping;
- if (!ctx->ReadBuffer->DepthBuffer || !ctx->DrawBuffer->DepthBuffer) {
+ if (!ctx->Visual.DepthBits) {
gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
return;
}
@@ -758,7 +758,7 @@ static void copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
const GLboolean shift_or_offset = ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset;
GLint overlapping;
- if (!ctx->DrawBuffer->Stencil || !ctx->ReadBuffer->Stencil) {
+ if (!ctx->Visual.StencilBits) {
gl_error( ctx, GL_INVALID_OPERATION, "glCopyPixels" );
return;
}