generate GL_INVALID_OPERATION in glAccum if read/draw buffers aren't the same
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 27 Sep 2005 15:52:27 +0000 (15:52 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 27 Sep 2005 15:52:27 +0000 (15:52 +0000)
src/mesa/main/accum.c

index c1346bab4cdd71fb5e8e1063ac224324366ce599..9a32481c9310dd4ddfbdf7d8a66837ced2200ad6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.3
+ * Version:  6.5
  *
  * Copyright (C) 1999-2005  Brian Paul   All Rights Reserved.
  *
@@ -76,6 +76,13 @@ _mesa_Accum( GLenum op, GLfloat value )
       return;
    }
 
+   if (ctx->DrawBuffer != ctx->ReadBuffer) {
+      /* See GLX_SGI_make_current_read or WGL_ARB_make_current_read */
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+                  "glAccum(different read/draw buffers)");
+      return;
+   }
+
    if (ctx->NewState)
       _mesa_update_state( ctx );