diff options
author | marha <marha@users.sourceforge.net> | 2011-06-17 07:56:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-06-17 07:56:55 +0200 |
commit | 9bea2bf9069195c27824644331d4a275ea3df9f4 (patch) | |
tree | 06dcb54a49f89b8ceca5d10aa99351998071615a /mesalib/src/mesa/main/buffers.c | |
parent | aa5db0c31378f6dee271da6cf24f7e4da55fe9ef (diff) | |
parent | 743d2ab8160b84c62106467c50ec3871adbf5e75 (diff) | |
download | vcxsrv-9bea2bf9069195c27824644331d4a275ea3df9f4.tar.gz vcxsrv-9bea2bf9069195c27824644331d4a275ea3df9f4.tar.bz2 vcxsrv-9bea2bf9069195c27824644331d4a275ea3df9f4.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/main/context.c
mesalib/src/mesa/main/fbobject.c
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 |