drawBuffer :: StateVar BufferMode
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
When colors are written to the framebuffer, they are written into the color buffers specified by drawBuffer. If more than one color buffer is selected for drawing, then blending or logical operations are computed and applied independently for each color buffer and can produce different results in each buffer. Monoscopic contexts include only left buffers, and stereoscopic contexts include both left and right buffers. Likewise, single-buffered contexts include only front buffers, and double-buffered contexts include both front and back buffers. The context is selected at GL initialization. The initial value is FrontBuffers for single-buffered contexts, and BackBuffers for double-buffered contexts.
drawBufferi :: DrawBufferIndex -> GettableStateVar BufferMode
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
drawBufferi is a fast query function. For indices in the range 0..maxDrawBuffers it's results are the same as selection the index from the list returned by drawBuffers. Though this function only uses one gl-function call instead of maxDrawBuffers + 1.
drawBuffers :: StateVar [BufferMode]
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
drawBuffers defines the draw buffers to which all fragment colors are written. The draw buffers being defined correspond in order to the respective fragment colors. The draw buffer for fragment colors beyond those specified is set to NoBuffers. Except for NoBuffers, a buffer may not appear more then once in the given list. Specifying a buffer more then once will result in an InvalidOperation. If fixed-function fragment shading is being performed, drawBuffers specifies a set of draw buffers into which the fragment color is written. If a fragment shader writes to gl_FragColor, drawBuffers specifies a set of draw buffers into which the single fragment color defined by gl_FragColor is written. If a fragment shader writes to gl_FragData, drawBuffers specifies a set of draw buffers into which each of the multiple fragment colors defined by gl_FragData are separately written. If a fragment shader writes to neither gl_FragColor nor gl_FragData, the values of the fragment colors following shader execution are undefined, and may differ for each fragment color.
type DrawBufferIndex = GLuint
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
IncompleteDrawBuffer :: FramebufferStatus
OpenGL Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferObjects
maxDrawBuffers :: GettableStateVar GLsizei
OpenGL Graphics.Rendering.OpenGL.GL.Framebuffer
Contains the maximum number of buffers that can activated via drawBuffers or which can be simultaneously written into from within a fragment shader using the special output variable array gl_FragData. This constant effectively defines the size of the gl_FragData array. The minimum legal value is 1.