mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
mesa: handle GL_NONE draw buffers correctly in glClear
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
4e549ddb50
commit
9bf9578c1b
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue