summaryrefslogtreecommitdiff
path: root/src/mesa/main/accum.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-27 16:10:49 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-27 16:10:49 +0000
commitdbd0fa920effdceacec34fa0d5ae9ab7a2f09614 (patch)
tree840634946b81788568767f5ecdccba20193f7acd /src/mesa/main/accum.c
parent78b3b667b5fc7dbd7f723682f8ffaa0091286abb (diff)
tweak glAccum error checking
Diffstat (limited to 'src/mesa/main/accum.c')
-rw-r--r--src/mesa/main/accum.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 9a32481c93..7682176183 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -58,11 +58,6 @@ _mesa_Accum( GLenum op, GLfloat value )
GLuint xpos, ypos, width, height;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (ctx->Visual.accumRedBits == 0 || ctx->DrawBuffer != ctx->ReadBuffer) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glAccum");
- return;
- }
-
switch (op) {
case GL_ADD:
case GL_MULT:
@@ -76,6 +71,11 @@ _mesa_Accum( GLenum op, GLfloat value )
return;
}
+ if (ctx->Visual.accumRedBits == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glAccum(no accum buffer)");
+ return;
+ }
+
if (ctx->DrawBuffer != ctx->ReadBuffer) {
/* See GLX_SGI_make_current_read or WGL_ARB_make_current_read */
_mesa_error(ctx, GL_INVALID_OPERATION,