[performance] Use vertex array objects where available

Bug #1051299 reported by Sam Spilsbury on 2012-09-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Currently, every time we want to render something we have to do something like this:

glBindBuffer (GL_ARRAY_BUFFER, vertices);
glEnableVertexAttribArray (verticesLocation);
glBindBuffer (GL_ARRAY_BUFFER, colors);
glEnableVertexAttribArray (colorLocation);
glBindBuffer (GL_ARRAY_BUFFER, texcoords);
glEnableVertexAttribArray (texcoordsLocation);

glDrawArrays ...

glDisableVertexAttribArray ...

glBindBuffer (GL_ARRAY_BUFFER, 0);

With vertex array objects we can do this:

glBindVertexArray (vArray)

Much fewer calls into openGL! And much fewer expensive ones too.

tags: added: gdebugger performance
Changed in compiz:
milestone: none →
Changed in compiz:
milestone: →
Changed in compiz:
milestone: →
Changed in compiz:
milestone: →
MC Return (mc-return) on 2013-07-24
Changed in compiz:
milestone: →
Stephen M. Webb (bregma) on 2013-10-13
Changed in compiz:
importance: Undecided → Medium
status: New → Confirmed
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers