diff options
author | Martin Robinson <mrobinson@igalia.com> | 2013-05-06 10:56:26 -0700 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2013-05-06 10:56:26 -0700 |
commit | e83943ec9a06f20572e22105f4e6e44740893eb9 (patch) | |
tree | 2c4043d1a09dc7c3ff4f30cd96d722cfd3221b86 | |
parent | 32bd6aa46dc77c497f06d2ab3bf0c2ec218d9e19 (diff) |
gl: Bind the default framebuffer before calling gl{Read|Draw}Buffer
Fix more fallout from separating framebuffer binding from setting the
destination. In some cases it is sufficient to call
glDrawBuffer/glReadBuffer before binding the framebuffer, but the
masking-filling-stroking test of cairo-gl-smoke-tests fails if the order
is incorrect.
-rw-r--r-- | src/cairo-gl-device.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c index 942eb2afb..0166c1013 100644 --- a/src/cairo-gl-device.c +++ b/src/cairo-gl-device.c @@ -733,15 +733,17 @@ _cairo_gl_context_set_destination (cairo_gl_context_t *ctx, if (! _cairo_gl_surface_is_texture (surface)) { ctx->make_current (ctx, surface); + } + + _cairo_gl_context_bind_framebuffer (ctx, surface, multisampling); + if (! _cairo_gl_surface_is_texture (surface)) { #if CAIRO_HAS_GL_SURFACE glDrawBuffer (GL_BACK_LEFT); glReadBuffer (GL_BACK_LEFT); #endif } - _cairo_gl_context_bind_framebuffer (ctx, surface, multisampling); - glDisable (GL_DITHER); glViewport (0, 0, surface->width, surface->height); |