void glDrawBuffers(GLsizei n, const GLenum *bufs);
void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs);
For glDrawBuffers, the framebuffer object that is bound to the GL_DRAW_FRAMEBUFFER binding will be used. For glNamedFramebufferDrawBuffers, framebuffer is the name of the framebuffer object. If framebuffer is zero, then the default framebuffer is affected.
The symbolic constants contained in bufs may be any of the following:
Except for GL_NONE, the preceding symbolic constants may not appear more than once in bufs. The maximum number of draw buffers supported is implementation dependent and can be queried by calling glGet() with the argument GL_MAX_DRAW_BUFFERS.
If a fragment shader does not write to a user defined output variable, the values of the fragment colors following shader execution are undefined. For each fragment generated in this situation, a different value may be written into each of the buffers specified by bufs.
GL_INVALID_ENUM is generated if one of the values in bufs is not an accepted value.
GL_INVALID_ENUM is generated if the API call refers to the default framebuffer and one or more of the values in bufs is one of the GL_COLOR_ATTACHMENTn tokens.
GL_INVALID_ENUM is generated if the API call refers to a framebuffer object and one or more of the values in bufs is anything other than GL_NONE or one of the GL_COLOR_ATTACHMENTn tokens.
GL_INVALID_ENUM is generated if n is less than 0.
GL_INVALID_OPERATION is generated if a symbolic constant other than GL_NONE appears more than once in bufs.
GL_INVALID_OPERATION is generated if any of the entries in bufs (other than GL_NONE ) indicates a color buffer that does not exist in the current GL context.
GL_INVALID_OPERATION is generated if any value in bufs is GL_BACK, and n is not one.
GL_INVALID_VALUE is generated if n is greater than GL_MAX_DRAW_BUFFERS.
glGet() with argument GL_DRAW_BUFFERi where i indicates the number of the draw buffer whose value is to be queried.
|Function / Feature Name||2.0||2.1||3.0||3.1||3.2||3.3||4.0||4.1||4.2||4.3||4.4||4.5|
Copyright © 2010-2014 Khronos Group