FramebuffersGL 1.0

glReadBuffer

Chooses which color buffer is the source for read operations.

Signature

void glReadBuffer(GLenum src);

How it works

Affects glReadPixels, glBlitFramebuffer and glCopyTexSubImage. Like glDrawBuffer, it is set to GL_NONE on depth-only framebuffers so they are complete without a color attachment.

Parameters

srcGLenum

GL_NONE, GL_COLOR_ATTACHMENTi, or GL_BACK / GL_FRONT for the window.

Example

example.cpp
1glReadBuffer(GL_NONE);
Official Khronos documentation