[performance] Use vertex array objects where available

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

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)
glDrawArrays

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

tags: added: gdebugger performance
Changed in compiz:
milestone: none → 0.9.8.4
Changed in compiz:
milestone: 0.9.8.4 → 0.9.9.0
Changed in compiz:
milestone: 0.9.9.0 → 0.9.9.2
Changed in compiz:
milestone: 0.9.9.2 → 0.9.10.0
MC Return (mc-return) on 2013-07-24
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
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