Skip to content
Snippets Groups Projects
Commit 70207b70 authored by Brian Paul's avatar Brian Paul
Browse files

check for incomplete FBO in _mesa_Clear()

parent 1bbc203c
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Mesa 3-D graphics library * Mesa 3-D graphics library
* Version: 6.5 * 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 * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
...@@ -132,6 +132,12 @@ _mesa_Clear( GLbitfield mask ) ...@@ -132,6 +132,12 @@ _mesa_Clear( GLbitfield mask )
_mesa_update_state( ctx ); /* update _Xmin, etc */ _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) { if (ctx->RenderMode == GL_RENDER) {
const GLint x = ctx->DrawBuffer->_Xmin; const GLint x = ctx->DrawBuffer->_Xmin;
const GLint y = ctx->DrawBuffer->_Ymin; const GLint y = ctx->DrawBuffer->_Ymin;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment