diff options
author | brian <brian@cvp965.(none)> | 2009-11-10 16:00:35 -0700 |
---|---|---|
committer | brian <brian@cvp965.(none)> | 2009-11-10 18:09:13 -0700 |
commit | bc569cd6bee0550c7f83412476b6b39e89c51ac3 (patch) | |
tree | de97431ac6f8c53afdf71435608cfc721782673d /src/mesa | |
parent | d96e55fa7bbbc033f47dbeb942b872c6d21eb42d (diff) | |
download | external_mesa3d-bc569cd6bee0550c7f83412476b6b39e89c51ac3.zip external_mesa3d-bc569cd6bee0550c7f83412476b6b39e89c51ac3.tar.gz external_mesa3d-bc569cd6bee0550c7f83412476b6b39e89c51ac3.tar.bz2 |
mesa: move check_begin/end_texture_render() calls
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/fbobject.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 9bf4341..6d8d187 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1288,26 +1288,28 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) } else { FLUSH_VERTICES(ctx, _NEW_BUFFERS); + _mesa_reference_framebuffer(&ctx->ReadBuffer, newReadFb); } } if (bindDrawBuf) { - if (oldDrawFb->Name != 0) { - check_end_texture_render(ctx, ctx->DrawBuffer); - } - if (oldDrawFb == newDrawFb) { bindDrawBuf = GL_FALSE; /* no change */ } else { FLUSH_VERTICES(ctx, _NEW_BUFFERS); - _mesa_reference_framebuffer(&ctx->DrawBuffer, newDrawFb); - } - if (newDrawFb->Name != 0) { - /* check if newly bound framebuffer has any texture attachments */ - check_begin_texture_render(ctx, newDrawFb); + if (oldDrawFb->Name != 0) { + check_end_texture_render(ctx, oldDrawFb); + } + + if (newDrawFb->Name != 0) { + /* check if newly bound framebuffer has any texture attachments */ + check_begin_texture_render(ctx, newDrawFb); + } + + _mesa_reference_framebuffer(&ctx->DrawBuffer, newDrawFb); } } |