mesa: handle GL_NONE draw buffers correctly in glClear
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -179,7 +179,11 @@ _mesa_Clear( GLbitfield mask )
|
||||
if (mask & GL_COLOR_BUFFER_BIT) {
|
||||
GLuint i;
|
||||
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
|
||||
bufferMask |= (1 << ctx->DrawBuffer->_ColorDrawBufferIndexes[i]);
|
||||
GLint buf = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
|
||||
|
||||
if (buf >= 0) {
|
||||
bufferMask |= 1 << buf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user