summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-03-25 16:16:37 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-03-25 16:16:37 +0000
commit70207b70c5761c7493294896535b849ce8519bcd (patch)
tree81f001bb8397f6c21d359ce2300c0a8e82b16000 /src
parent1bbc203c6e7fa200339204d4b686616ed030e6c1 (diff)
check for incomplete FBO in _mesa_Clear()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/buffers.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 121050593f..25f1236f23 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -7,7 +7,7 @@
* Mesa 3-D graphics library
* Version: 6.5
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -132,6 +132,12 @@ _mesa_Clear( GLbitfield mask )
_mesa_update_state( ctx ); /* update _Xmin, etc */
}
+ if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
+ "glClear(incomplete framebuffer)");
+ return;
+ }
+
if (ctx->RenderMode == GL_RENDER) {
const GLint x = ctx->DrawBuffer->_Xmin;
const GLint y = ctx->DrawBuffer->_Ymin;