diff options
author | marha <marha@users.sourceforge.net> | 2011-06-17 07:54:43 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-06-17 07:54:43 +0200 |
commit | 743d2ab8160b84c62106467c50ec3871adbf5e75 (patch) | |
tree | f1118aa7870a2bd901ffcaa0d229a198fed3e93f /mesalib/src/mesa/main/buffers.c | |
parent | 26686c98bac306ee4e6502850e2dc8afbe4a496a (diff) | |
download | vcxsrv-743d2ab8160b84c62106467c50ec3871adbf5e75.tar.gz vcxsrv-743d2ab8160b84c62106467c50ec3871adbf5e75.tar.bz2 vcxsrv-743d2ab8160b84c62106467c50ec3871adbf5e75.zip |
mesa git update 17 June 2011
Diffstat (limited to 'mesalib/src/mesa/main/buffers.c')
-rw-r--r-- | mesalib/src/mesa/main/buffers.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/buffers.c b/mesalib/src/mesa/main/buffers.c index 63f53e2b0..a75c9c2e7 100644 --- a/mesalib/src/mesa/main/buffers.c +++ b/mesalib/src/mesa/main/buffers.c @@ -462,6 +462,27 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, /** + * Update the current drawbuffer's _ColorDrawBufferIndex[] list, etc. + * from the context's Color.DrawBuffer[] state. + * Use when changing contexts. + */ +void +_mesa_update_draw_buffers(struct gl_context *ctx) +{ + GLenum buffers[MAX_DRAW_BUFFERS]; + GLuint i; + + /* should be a window system FBO */ + assert(ctx->DrawBuffer->Name == 0); + + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) + buffers[i] = ctx->Color.DrawBuffer[i]; + + _mesa_drawbuffers(ctx, ctx->Const.MaxDrawBuffers, buffers, NULL); +} + + +/** * Like \sa _mesa_drawbuffers(), this is a helper function for setting * GL_READ_BUFFER state in the context and current FBO. * \param ctx the rendering context |