glDrawBuffer − specify which color buffers are to be drawn into


void glDrawBuffer( GLenum mode )



Specifies up to four color buffers to be drawn into. Symbolic constants GL_NONE, GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK, and GL_AUXi, where i is between 0 and

‘‘GL_AUX_BUFFERS’’ −1, are accepted (GL_AUX_BUFFERS is not the upper limit; use glGet to query the number of available aux buffers.) The initial value is GL_FRONT for single-buffered contexts, and GL_BACK for double-buffered contexts.


When colors are written to the frame buffer, they are written into the color buffers specified by glDrawBuffer. The specifications are as follows:


No color buffers are written.


Only the front left color buffer is written.


Only the front right color buffer is written.


Only the back left color buffer is written.


Only the back right color buffer is written.


Only the front left and front right color buffers are written. If there is no front right color buffer, only the front left color buffer is written.


Only the back left and back right color buffers are written. If there is no back right color buffer, only the back left color buffer is written.


Only the front left and back left color buffers are written. If there is no back left color buffer, only the front left color buffer is written.


Only the front right and back right color buffers are written. If there is no back right color buffer, only the front right color buffer is written.


All the front and back color buffers (front left, front right, back left, back right) are written. If there are no back color buffers, only the front left and front right color buffers are written. If there are no right color buffers, only the front left and back left color buffers are written. If there are no right or back color buffers, only the front left color buffer is written.


Only auxiliary color buffer i is written.

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.


It is always the case that GL_AUX$i$ = GL_AUX0 + $i$.


GL_INVALID_ENUM is generated if mode is not an accepted value.

GL_INVALID_OPERATION is generated if none of the buffers indicated by mode exists.

GL_INVALID_OPERATION is generated if glDrawBuffer is executed between the execution of glBegin and the corresponding execution of glEnd.


glGet with argument GL_DRAW_BUFFER
with argument GL_AUX_BUFFERS


glBlendFunc(3G), glColorMask(3G), glIndexMask(3G), glLogicOp(3G), glReadBuffer(3G)

Open Source

find - The find program searches for files that match the specified criteria and optionally executes some function on those files. Find can compare or identify files based on name, location, type, size, creation and many more attributes. find is a very useful and powerful command line utility.

bash - Bash is both a command interpreter and a programming language. As a command interpreter, bash provides the user interface to the rich set of GNU utilities. The programming language features allow these utilities to be combined. Mastering a shell such as bash is important for anyone learning Linux.

College Prep - Get ready for college or earn college credit. EdX provides more than 40 High School and AP Exam Preparation Courses. Subjects range from mathematics to science, English and history. EdX courses help students succeed in High School and prepare for college. pre-calc calculus

ConnectED and edX - President Obama announced on November 2014, that edX and ConnectED will partner to deliver teacher training and AP courses. ConnectED is the President's initiative to enhance K-12 through the delivery of broadband access and digital content.

Open License - On October 29, 2015 the Department of Education announced a proposed regulation to require that all copyrightable intellectual property created with grant funds have an open license. Openly licensed materials can be modified and redistributed without violating copyright laws.

Open Government - NASA, The White House and the Department of Defense are among government organizations with major open source deployments. Through the website which is part of the open government initiative, agencies deliver 180,000 data sets with open source access.

What is Linux - Linux is a computer operating system (OS) that is free and open-source software. The software that runs the computer and the source code used to create it are both available to you at no cost. Linux is used on games, watches, laptops, desktops and super computers. The capability to operate and create on these devices is available to you.

More Linux Commands

cachemgr.cgi (8)     - squid HTTP proxy manager interface
The cache manager (cachemgr.cgi) is a CGI utility for displaying statistics about the Squid HTTP proxy process as it runs. The cache manager is a convenient way...

rand (3ssl)          - pseudo-random number generator
Since the introduction of the ENGINE API , the recommended way of controlling default implementations is by using the ENGINE API functions. The default RAND_MET...

XvStopVideo (3)      - stop active video
XvStopVideo(3) stops active video for the specified port and drawable. If the port is not processing video, or if it is processing video in a different drawable...

XtAppCreateShell (3) - create top-level widget instance
The XtAppCreateShell function saves the specified application name and application class for qualifying all widget resource specifiers. The application name and...

XtAppAddActionHook (3) - register an action hook procedure
XtAppAddActionHook adds the specified procedure to the front of a list maintained in the application context. In the future, when an action routine is about to...

regsvr32 (1)         - Wine DLL Registration Server
regsvr32 is the Wine dll registration server, designed to be compatible with its Microsoft Windows counterpart. By default, it will register the given dll. COMM...

sane-apple (5)       - SANE backend for Apple flatbed scanners
The sane-apple library implements a SANE (Scanner Access Now Easy) backend that provides access to Apple flatbed scanners. At present, the following scanners ar...

gnutls_pkcs11_obj_export (3) - API function
This function will export the PKCS11 object data. It is normal for data to be inaccesible and in that case GNUTLS_E_INVALID_REQUEST will be returned. If the buf...

usb_modeswitch (1)   - control the mode of ’multi-state’ USB devices
Several new USB devices have their proprietary Windows drivers onboard, most of them WWAN and WLAN dongles. When plugged in for the first time, they act like a...

nohup (1)            - run a command immune to hangups, with output to a non-tty
Run COMMAND, ignoring hangup signals. --help display this help and exit --version output version information and exit If standard input is a terminal, redirect...

_nc_tracebits (3ncurses) - curses debugging routines
The trace routines are used for debugging the ncurses libraries, as well as applications which use the ncurses libraries. These functions are normally available...

cacos (3)            - complex arc cosine
The cacos() function calculates the complex arc cosine of z. If y = cacos(z), then z = ccos(y). The real part of y is chosen in the interval [0,pi]. One has: ca...

sendinpaths (8)      - Send Usenet Path: statistics via e-mail
sendinpaths checks pathlog/path for ninpaths dump files, finds dump files generated in the past 30 days, makes sure they are valid by running ninpaths on each o...

listen (2)           - listen for connections on a socket
listen() marks the socket referred to by sockfd as a passive socket, that is, as a socket that will be used to accept incoming connection requests using accept(...

fnmatch (3am)        - compare a string against a filename wildcard
The fnmatch extension provides an AWK interface to the fnmatch(3) routine. It adds a single function named fnmatch(), one predefined variable (FNM_NOMATCH), and...