Instead of requiring every user of this function to know to do this magic, do it in a common place.
Signed-off-by: Keith Packard <[email protected]> --- glamor/glamor_fill.c | 1 - glamor/glamor_glyphblt.c | 2 -- glamor/glamor_vbo.c | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/glamor/glamor_fill.c b/glamor/glamor_fill.c index a0c8d99..ec11c9f 100644 --- a/glamor/glamor_fill.c +++ b/glamor/glamor_fill.c @@ -248,7 +248,6 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color) box += box_cnt; } - glBindBuffer(GL_ARRAY_BUFFER, 0); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glUseProgram(0); glamor_put_context(glamor_priv); diff --git a/glamor/glamor_glyphblt.c b/glamor/glamor_glyphblt.c index 6328d4c..4e1f744 100644 --- a/glamor/glamor_glyphblt.c +++ b/glamor/glamor_glyphblt.c @@ -156,7 +156,6 @@ glamor_poly_glyph_blt_pixels(DrawablePtr drawable, GCPtr gc, } glDisableVertexAttribArray(GLAMOR_VERTEX_POS); - glBindBuffer(GL_ARRAY_BUFFER, 0); glUseProgram(0); glamor_put_context(glamor_priv); @@ -329,7 +328,6 @@ glamor_push_pixels_points(GCPtr gc, PixmapPtr bitmap, glDrawArrays(GL_POINTS, 0, num_points); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); - glBindBuffer(GL_ARRAY_BUFFER, 0); glUseProgram(0); glamor_put_context(glamor_priv); diff --git a/glamor/glamor_vbo.c b/glamor/glamor_vbo.c index 5e98bfe..31e0730 100644 --- a/glamor/glamor_vbo.c +++ b/glamor/glamor_vbo.c @@ -153,6 +153,7 @@ glamor_put_vbo_space(ScreenPtr screen) glBufferData(GL_ARRAY_BUFFER, glamor_priv->vbo_offset, glamor_priv->vb, GL_DYNAMIC_DRAW); } + glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); -- 1.9.0 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
