core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

buffers.h File Reference


Detailed Description

Frame buffer management functions declarations.

#include "mtypes.h"

Functions

void GLAPIENTRY _mesa_DrawBuffer (GLenum mode)
 Called by glDrawBuffer().
void GLAPIENTRY _mesa_DrawBuffersARB (GLsizei n, const GLenum *buffers)
 Called by glDrawBuffersARB; specifies the destination color renderbuffers for N fragment program color outputs.
void _mesa_drawbuffers (GLcontext *ctx, GLuint n, const GLenum *buffers, const GLbitfield *destMask)
 Helper function to set the GL_DRAW_BUFFER state in the context and current FBO.
void _mesa_readbuffer (GLcontext *ctx, GLenum buffer, GLint bufferIndex)
 Like.
void GLAPIENTRY _mesa_ReadBuffer (GLenum mode)
 Called by glReadBuffer to set the source renderbuffer for reading pixels.


Function Documentation

void GLAPIENTRY _mesa_DrawBuffer ( GLenum  buffer  ) 

Called by glDrawBuffer().

Specify which renderbuffer(s) to draw into for the first color output. <buffer> can name zero, one, two or four renderbuffers!

See also:
_mesa_DrawBuffersARB
Parameters:
buffer buffer token such as GL_LEFT or GL_FRONT_AND_BACK, etc.
Note that the behaviour of this function depends on whether the current ctx->DrawBuffer is a window-system framebuffer (Name=0) or a user-created framebuffer object (Name!=0). In the former case, we update the per-context ctx->Color.DrawBuffer state var _and_ the FB's ColorDrawBuffer state. In the later case, we update the FB's ColorDrawBuffer state only.

Furthermore, upon a MakeCurrent() or BindFramebuffer() call, if the new FB is a window system FB, we need to re-update the FB's ColorDrawBuffer state to match the context. This is handled in _mesa_update_framebuffer().

See the GL_EXT_framebuffer_object spec for more info.

void _mesa_drawbuffers ( GLcontext ctx,
GLuint  n,
const GLenum *  buffers,
const GLbitfield *  destMask 
)

Helper function to set the GL_DRAW_BUFFER state in the context and current FBO.

All error checking will have been done prior to calling this function so nothing should go wrong at this point.

Parameters:
ctx current context
n number of color outputs to set
buffers array[n] of colorbuffer names, like GL_LEFT.
destMask array[n] of BUFFER_BIT_* bitmasks which correspond to the colorbuffer names. (i.e. GL_FRONT_AND_BACK => BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT).

void GLAPIENTRY _mesa_DrawBuffersARB ( GLsizei  n,
const GLenum *  buffers 
)

Called by glDrawBuffersARB; specifies the destination color renderbuffers for N fragment program color outputs.

See also:
_mesa_DrawBuffer
Parameters:
n number of outputs
buffers array [n] of renderbuffer names. Unlike glDrawBuffer, the names cannot specify more than one buffer. For example, GL_FRONT_AND_BACK is illegal.

void GLAPIENTRY _mesa_ReadBuffer ( GLenum  buffer  ) 

Called by glReadBuffer to set the source renderbuffer for reading pixels.

Parameters:
mode color buffer such as GL_FRONT, GL_BACK, etc.

void _mesa_readbuffer ( GLcontext ctx,
GLenum  buffer,
GLint  bufferIndex 
)

Like.

See also:
_mesa_drawbuffers(), this is a helper function for setting GL_READ_BUFFER state in the context and current FBO.
Parameters:
ctx the rendering context
buffer GL_FRONT, GL_BACK, GL_COLOR_ATTACHMENT0, etc.
bufferIndex the numerical index corresponding to 'buffer'


Generated on Sun Sep 27 06:47:45 2009 for Mesa Main by  doxygen 1.5.4