compositor: disable attrib arrays after use

Not strictly necessary right now, but nice to clean up.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
dev
Pekka Paalanen 13 years ago
parent 74abeac2f6
commit 3df327f4c9
  1. 4
      src/compositor.c

@ -690,8 +690,12 @@ weston_surface_draw(struct weston_surface *es, struct weston_output *output)
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof *v, &v[2]); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 4 * sizeof *v, &v[2]);
glEnableVertexAttribArray(0); glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1); glEnableVertexAttribArray(1);
glDrawElements(GL_TRIANGLES, n * 6, GL_UNSIGNED_INT, ec->indices.data); glDrawElements(GL_TRIANGLES, n * 6, GL_UNSIGNED_INT, ec->indices.data);
glDisableVertexAttribArray(1);
glDisableVertexAttribArray(0);
ec->vertices.size = 0; ec->vertices.size = 0;
ec->indices.size = 0; ec->indices.size = 0;
pixman_region32_fini(&repaint); pixman_region32_fini(&repaint);

Loading…
Cancel
Save