summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-05-28 21:46:52 +0200
committerBenjamin Otte <otte@redhat.com>2010-06-07 13:37:48 +0200
commit8f675fb801f7864aa52778d4d53d7ab68f4e664b (patch)
tree3063f447c904a8e49f8af444472d6fe3d8f2dfb3
parentbef0b541497eb5a621df0b5528e08adb0beff961 (diff)
gl: Stop disabling the vertex array and the array buffer
-rw-r--r--src/cairo-gl-composite.c12
-rw-r--r--src/cairo-gl-device.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index 52d265a4..ff8fc0c0 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -1023,12 +1023,12 @@ _cairo_gl_composite_begin (cairo_gl_composite_t *setup,
}
_cairo_gl_set_shader (ctx, shader);
_cairo_gl_composite_bind_to_shader (ctx, setup);
- }
- glBindBufferARB (GL_ARRAY_BUFFER_ARB, ctx->vbo);
+ glBindBufferARB (GL_ARRAY_BUFFER_ARB, ctx->vbo);
- glVertexPointer (2, GL_FLOAT, ctx->vertex_size, NULL);
- glEnableClientState (GL_VERTEX_ARRAY);
+ glVertexPointer (2, GL_FLOAT, ctx->vertex_size, NULL);
+ glEnableClientState (GL_VERTEX_ARRAY);
+ }
_cairo_gl_context_setup_operand (ctx, CAIRO_GL_TEX_SOURCE, &setup->src, dst_size);
_cairo_gl_context_setup_operand (ctx, CAIRO_GL_TEX_MASK, &setup->mask, dst_size + src_size);
@@ -1242,10 +1242,6 @@ _cairo_gl_composite_end (cairo_gl_context_t *ctx,
{
_cairo_gl_composite_flush (ctx);
- glBindBufferARB (GL_ARRAY_BUFFER_ARB, 0);
-
- glDisableClientState (GL_VERTEX_ARRAY);
-
_cairo_gl_context_destroy_operand (ctx, CAIRO_GL_TEX_SOURCE);
_cairo_gl_context_destroy_operand (ctx, CAIRO_GL_TEX_MASK);
diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c
index d7a06946..603de6cf 100644
--- a/src/cairo-gl-device.c
+++ b/src/cairo-gl-device.c
@@ -83,6 +83,10 @@ _gl_flush (void *device)
ctx->pre_shader = NULL;
_cairo_gl_set_shader (ctx, NULL);
+ glBindBufferARB (GL_ARRAY_BUFFER_ARB, 0);
+
+ glDisableClientState (GL_VERTEX_ARRAY);
+
glDisable (GL_SCISSOR_TEST);
glDisable (GL_BLEND);