[gl] Clear the current_target cache when binding a framebuffer in creation.

Failing to do so meant that we might not re-bind the framebuffer to
the correct one if we didn't follow up surface creation with drawing
to it.

Fixes many testcases.  Thanks to T. Zachary Laine for tracking down
that the current_target was the source of these issues.
This commit is contained in:
Eric Anholt 2010-01-13 14:06:23 -08:00
parent ad0f4bee19
commit 6e0a63102e

View file

@ -503,6 +503,7 @@ _cairo_gl_surface_create_scratch (cairo_gl_context_t *ctx,
GL_TEXTURE_2D,
surface->tex,
0);
ctx->current_target = NULL;
while ((err = glGetError ())) {
fprintf (stderr, "GL error in surface create: 0x%08x\n", err);