summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrian <brian@cvp965.(none)>2009-11-10 15:50:22 -0700
committerbrian <brian@cvp965.(none)>2009-11-10 18:09:13 -0700
commitd96e55fa7bbbc033f47dbeb942b872c6d21eb42d (patch)
tree6b4074b986ee3b7ace20fe9b7896210d9cebd7ff /src
parente6f60d30375c637c0823a9aade8098a45f70d6a7 (diff)
mesa: new vars: oldDrawFb, oldReadFb in _mesa_BindFramebufferEXT()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 5896f1b95f..9bf43416a6 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1194,6 +1194,7 @@ void GLAPIENTRY
_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
{
struct gl_framebuffer *newDrawFb, *newReadFb;
+ struct gl_framebuffer *oldDrawFb, *oldReadFb;
GLboolean bindReadBuf, bindDrawBuf;
GET_CURRENT_CONTEXT(ctx);
@@ -1275,11 +1276,14 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
ASSERT(newDrawFb);
ASSERT(newDrawFb != &DummyFramebuffer);
+ oldDrawFb = ctx->DrawBuffer;
+ oldReadFb = ctx->ReadBuffer;
+
/*
* OK, now bind the new Draw/Read framebuffers, if they're changing.
*/
if (bindReadBuf) {
- if (ctx->ReadBuffer == newReadFb) {
+ if (oldReadFb == newReadFb) {
bindReadBuf = GL_FALSE; /* no change */
}
else {
@@ -1289,11 +1293,11 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
}
if (bindDrawBuf) {
- if (ctx->DrawBuffer->Name != 0) {
+ if (oldDrawFb->Name != 0) {
check_end_texture_render(ctx, ctx->DrawBuffer);
}
- if (ctx->DrawBuffer == newDrawFb) {
+ if (oldDrawFb == newDrawFb) {
bindDrawBuf = GL_FALSE; /* no change */
}
else {