[performance] Use vertex array objects where available

Bug #1051299 reported by Sam Spilsbury
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Triaged
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)
Changed in compiz:
milestone: 0.9.10.0 → 0.9.11.0
Stephen M. Webb (bregma)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.