The GL_COLOR_BUFFER_BIT
in the glClear
call will clear all of the active draw color buffers, as specified via glDrawBuffers
. So you could change the draw buffers before executing a clear.
But that's needless state changing. You can simply call glClearBuffer
, which will clear a particular buffer.